mirror of
https://github.com/discourse/discourse.git
synced 2025-04-28 14:54:35 +08:00
Boolean site settings don't save immediately
This commit is contained in:
parent
e114e47533
commit
cc257e1f5c
@ -23,10 +23,6 @@ Discourse.SiteSetting = Discourse.Model.extend({
|
|||||||
} else {
|
} else {
|
||||||
// set the boolean value of the setting
|
// set the boolean value of the setting
|
||||||
this.set('value', value ? 'true' : 'false');
|
this.set('value', value ? 'true' : 'false');
|
||||||
|
|
||||||
// We save booleans right away, it's not like a text field where it makes sense to
|
|
||||||
// undo what you typed in.
|
|
||||||
this.save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}.property('value'),
|
}.property('value'),
|
||||||
|
@ -7,3 +7,13 @@
|
|||||||
{{unbound description}}
|
{{unbound description}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
{{#if dirty}}
|
||||||
|
<div class='setting-controls'>
|
||||||
|
<button class='btn ok no-text' {{action save this}}><i class='fa fa-check'></i></button>
|
||||||
|
<button class='btn cancel no-text' {{action cancel this}}><i class='fa fa-times'></i></button>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
{{#if overridden}}
|
||||||
|
<button class='btn' href='#' {{action resetDefault this}}><i class="fa fa-undo"></i>{{i18n admin.site_settings.reset}}</button>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user