FEATURE: Admin interface for editing email templates

This commit is contained in:
Robin Ward
2015-11-12 16:08:19 -05:00
parent e168c5fde3
commit f5b34d5f53
26 changed files with 240 additions and 60 deletions

View File

@ -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);
}
}
});