mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 14:15:40 +08:00
15 lines
387 B
JavaScript
15 lines
387 B
JavaScript
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'),
|
|
|
|
actions: {
|
|
saveChanges() {
|
|
const model = this.get('model');
|
|
model.save(model.getProperties('value')).then(() => this.set('saved', true));
|
|
}
|
|
}
|
|
});
|