FIX: enable button is broken when color scheme is not saved yet
This commit is contained in:
parent
15b0cd5185
commit
57c970b692
|
@ -43,6 +43,10 @@ Discourse.ColorScheme = Discourse.Model.extend(Ember.Copyable, {
|
|||
return !this.get('changed') || this.get('saving') || _.any(this.get('colors'), function(c) { return !c.get('valid'); });
|
||||
}.property('changed'),
|
||||
|
||||
disableEnable: function() {
|
||||
return !this.get('id') || this.get('saving');
|
||||
}.property('id', 'saving'),
|
||||
|
||||
newRecord: function() {
|
||||
return (!this.get('id'));
|
||||
}.property('id'),
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<div class="controls">
|
||||
<button {{action save}} {{bind-attr disabled="disableSave"}} class='btn'>{{i18n admin.customize.save}}</button>
|
||||
<button {{action toggleEnabled}} class="btn">
|
||||
<button {{action toggleEnabled}} {{bind-attr disabled="disableEnable"}} class="btn">
|
||||
{{#if enabled}}
|
||||
{{i18n disable}}
|
||||
{{else}}
|
||||
|
|
Loading…
Reference in New Issue