Skip to content

Commit

Permalink
Add separate "Save" and "Save and close" buttons to the setting window [
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-H committed Oct 24, 2019
1 parent 5dac354 commit 9e6db4b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion assets/components/clientconfig/js/mgr/widgets/window.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,24 @@ ClientConfig.window.Setting = function(config) {
}]
}]
}],
keys: [] //prevent enter in textarea from firing submit
keys: [], //prevent enter in textarea from firing submit
buttons: [{
text: _('cancel'),
scope: this,
handler: function() { this.hide(); }
},'-',{
text: _('save'),
scope: this,
handler: function () {
this.submit(false);
},
cls: 'primary-button'
}, {
text: _('save_and_close'),
scope: this,
handler: this.submit,
cls: 'primary-button'
}]
});
ClientConfig.window.Setting.superclass.constructor.call(this,config);
};
Expand Down
1 change: 1 addition & 0 deletions core/components/clientconfig/docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Add a code field type (requires Ace editor) for things like custom CSS or other markup [#144]
- Add an email field type which validates the value to be an email address [#65]
- Include OnHandleRequest plugin event (alongside OnMODXInit), to make ClientConfig play nicer with various context routing and other solutions that don't use OnMODXInit [#140]
- Add separate "Save" and "Save and close" buttons to the setting window [#135]

ClientConfig 2.2.0-pl
---------------------
Expand Down

0 comments on commit 9e6db4b

Please sign in to comment.