mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-02 03:47:34 -05:00
16 lines
500 B
JavaScript
16 lines
500 B
JavaScript
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);
|
|
}
|
|
}
|
|
});
|