mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 18:41:07 +08:00
FEATURE: Admin interface for editing email templates
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
import { popupAjaxError } from 'discourse/lib/ajax-error';
|
||||
import { bufferedProperty } from 'discourse/mixins/buffered-content';
|
||||
|
||||
export default Ember.Controller.extend(bufferedProperty('emailTemplate'), {
|
||||
saved: false,
|
||||
|
||||
actions: {
|
||||
saveChanges() {
|
||||
const model = this.get('emailTemplate');
|
||||
const buffered = this.get('buffered');
|
||||
model.save(buffered.getProperties('subject', 'body')).then(() => {
|
||||
this.set('saved', true);
|
||||
}).catch(popupAjaxError);
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user