index.class.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * Loads form customization
  4. *
  5. * @package modx
  6. * @subpackage manager.controllers
  7. */
  8. class SecurityFormsManagerController extends modManagerController {
  9. /**
  10. * Check for any permissions or requirements to load page
  11. * @return bool
  12. */
  13. public function checkPermissions() {
  14. return $this->modx->hasPermission('customize_forms');
  15. }
  16. /**
  17. * Register custom CSS/JS for the page
  18. * @return void
  19. */
  20. public function loadCustomCssJs() {
  21. $mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
  22. $this->addJavascript($mgrUrl.'assets/modext/widgets/fc/modx.grid.fcprofile.js');
  23. $this->addJavascript($mgrUrl.'assets/modext/sections/fc/list.js');
  24. $this->addHtml("<script>
  25. Ext.onReady(function() {
  26. MODx.add('modx-page-form-customization');
  27. });</script>");
  28. }
  29. /**
  30. * Custom logic code here for setting placeholders, etc
  31. * @param array $scriptProperties
  32. * @return mixed
  33. */
  34. public function process(array $scriptProperties = array()) {}
  35. /**
  36. * Return the pagetitle
  37. *
  38. * @return string
  39. */
  40. public function getPageTitle() {
  41. return $this->modx->lexicon('form_customization');
  42. }
  43. /**
  44. * Return the location of the template file
  45. * @return string
  46. */
  47. public function getTemplateFile() {
  48. return '';
  49. }
  50. /**
  51. * Specify the language topics to load
  52. * @return array
  53. */
  54. public function getLanguageTopics() {
  55. return array('user','access','policy','formcustomization');
  56. }
  57. /**
  58. * Get the Help URL
  59. * @return string
  60. */
  61. public function getHelpUrl() {
  62. return 'Customizing+The+Manager';
  63. }
  64. }