mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-29 18:46:23 -05:00
14 lines
387 B
JavaScript
14 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));
|
|
}
|
|
}
|
|
});
|