create.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Ext.onReady(function() {
  2. MODx.load({
  3. xtype: 'page-role-create'
  4. });
  5. });
  6. /**
  7. * @class MODx.page.CreateRole
  8. * @extends MODx.Component
  9. * @param {Object} config An object of configuration properties
  10. * @xtype page-role-create
  11. */
  12. MODx.page.CreateRole = function(config) {
  13. config = config || {};
  14. Ext.applyIf(config,{
  15. form: 'mutate_role'
  16. ,actions: {
  17. 'new': 'security/role/create'
  18. ,edit: 'security/role/update'
  19. ,cancel: 'security/role'
  20. }
  21. ,buttons: [{
  22. process: 'create'
  23. ,text: _('save')
  24. ,id: 'modx-abtn-save'
  25. ,cls: 'primary-button'
  26. ,method: 'remote'
  27. ,keys: [{
  28. key: MODx.config.keymap_save || 's'
  29. ,ctrl: true
  30. }]
  31. },{
  32. process: 'cancel'
  33. ,text: _('cancel')
  34. ,id: 'modx-abtn-cancel'
  35. ,params: {a:'security/role'}
  36. },{
  37. text: _('help_ex')
  38. ,id: 'modx-abtn-help'
  39. ,handler: MODx.loadHelpPane
  40. }]
  41. ,tabs: [
  42. {contentEl: 'tab_information', title: _('settings_general')}
  43. ,{contentEl: 'tab_permissions', title: _('permissions')}
  44. ]
  45. });
  46. MODx.page.CreateRole.superclass.constructor.call(this,config);
  47. };
  48. Ext.extend(MODx.page.CreateRole,MODx.Component);
  49. Ext.reg('page-role-create',MODx.page.CreateRole);