update.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * Loads the chunk update page
  3. *
  4. * @class MODx.page.UpdateFCProfile
  5. * @extends MODx.Component
  6. * @param {Object} config An object of config properties
  7. * @xtype modx-page-fc-profile-update
  8. */
  9. MODx.page.UpdateFCProfile = function(config) {
  10. config = config || {};
  11. Ext.applyIf(config,{
  12. formpanel: 'modx-panel-fc-profile'
  13. ,actions: {
  14. 'new': 'security/forms/profile/create'
  15. ,edit: 'security/forms/profile/update'
  16. ,cancel: 'security/forms'
  17. }
  18. ,buttons: [{
  19. process: 'security/forms/profile/update'
  20. ,text: _('save')
  21. ,id: 'modx-abtn-save'
  22. ,cls:'primary-button'
  23. ,method: 'remote'
  24. // ,checkDirty: false
  25. ,keys: [{
  26. key: MODx.config.keymap_save || 's'
  27. ,ctrl: true
  28. }]
  29. },{
  30. process: 'cancel'
  31. ,text: _('cancel')
  32. ,id: 'modx-abtn-cancel'
  33. ,params: {a:'security/forms'}
  34. },{
  35. text: _('help_ex')
  36. ,id: 'modx-abtn-help'
  37. ,handler: MODx.loadHelpPane
  38. }]
  39. ,components: [{
  40. xtype: 'modx-panel-fc-profile'
  41. ,record: config.record || {}
  42. //,baseParams: { action: 'update' ,id: config.id }
  43. }]
  44. });
  45. MODx.page.UpdateFCProfile.superclass.constructor.call(this,config);
  46. };
  47. Ext.extend(MODx.page.UpdateFCProfile,MODx.Component);
  48. Ext.reg('modx-page-fc-profile-update',MODx.page.UpdateFCProfile);