mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 11:48:08 +08:00
Revert "FEATURE: Site settings defaults per locale"
This reverts commit 468a8fcd206d14ff4421758e840d63a27c246254.
This commit is contained in:
@ -64,16 +64,16 @@ export default Ember.Component.extend(BufferedContent, {
|
||||
}.on("willDestroyElement"),
|
||||
|
||||
_save() {
|
||||
const setting = this.get('buffered'),
|
||||
action = SiteSetting.update(setting.get('setting'), setting.get('value'));
|
||||
action.then(() => {
|
||||
this.set('validationMessage', null);
|
||||
this.commitBuffer();
|
||||
}).catch((e) => {
|
||||
const self = this,
|
||||
setting = this.get('buffered');
|
||||
SiteSetting.update(setting.get('setting'), setting.get('value')).then(function() {
|
||||
self.set('validationMessage', null);
|
||||
self.commitBuffer();
|
||||
}).catch(function(e) {
|
||||
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||
this.set('validationMessage', e.jqXHR.responseJSON.errors[0]);
|
||||
self.set('validationMessage', e.jqXHR.responseJSON.errors[0]);
|
||||
} else {
|
||||
this.set('validationMessage', I18n.t('generic_error'));
|
||||
self.set('validationMessage', I18n.t('generic_error'));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user