discourse/app/assets/javascripts/admin/controllers/admin-site-text-edit.js.es6

15 lines
387 B
Text
Raw Normal View History

export default Ember.Controller.extend({
saved: false,
saveDisabled: function() {
return ((!this.get('allow_blank')) && Ember.isEmpty(this.get('model.value')));
}.property('model.iSaving', 'model.value'),
2013-09-16 14:08:55 -04:00
actions: {
saveChanges() {
const model = this.get('model');
model.save(model.getProperties('value')).then(() => this.set('saved', true));
2013-09-16 14:08:55 -04:00
}
}
2013-09-16 14:08:55 -04:00
});