BxDolStudioApiOrigins.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaStudio UNA Studio
  7. * @{
  8. */
  9. class BxDolStudioApiOrigins extends BxDolStudioApiKeys
  10. {
  11. public function __construct ($aOptions, $oTemplate = false)
  12. {
  13. parent::__construct ($aOptions, $oTemplate);
  14. }
  15. public function performActionAdd()
  16. {
  17. $aForm = array(
  18. 'form_attrs' => array(
  19. 'id' => 'bx_studio_api_origins',
  20. 'action' => BX_DOL_URL_ROOT . 'grid.php?o=sys_studio_api_origins&a=add',
  21. 'method' => 'post',
  22. ),
  23. 'params' => array (
  24. 'db' => array(
  25. 'table' => 'sys_api_origins',
  26. 'key' => 'id',
  27. 'submit_name' => 'do_submit',
  28. ),
  29. ),
  30. 'inputs' => array(
  31. 'url' => array(
  32. 'type' => 'text',
  33. 'name' => 'url',
  34. 'caption' => _t('_sys_txt_url'),
  35. 'db' => array (
  36. 'pass' => 'Xss',
  37. ),
  38. ),
  39. 'submit' => array(
  40. 'type' => 'input_set',
  41. 0 => array (
  42. 'type' => 'submit',
  43. 'name' => 'do_submit',
  44. 'value' => _t('_sys_submit'),
  45. ),
  46. 1 => array (
  47. 'type' => 'reset',
  48. 'name' => 'close',
  49. 'value' => _t('_sys_close'),
  50. 'attrs' => array('class' => 'bx-def-margin-sec-left', 'onclick' => '$(\'.bx-popup-applied:visible\').dolPopupHide();'),
  51. ),
  52. ),
  53. ),
  54. );
  55. return $this->_performActionAdd($aForm);
  56. }
  57. }
  58. /** @} */