mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 16:52:45 +08:00
FIX: theme component setting was not getting updated in the UI (#8247)
This commit is contained in:
parent
af841fa883
commit
88df84bf2b
|
@ -6,13 +6,16 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
|
|||
|
||||
export default Component.extend(BufferedContent, SettingComponent, {
|
||||
layoutName: "admin/templates/components/site-setting",
|
||||
_save() {
|
||||
return ajax(`/admin/themes/${this.model.id}/setting`, {
|
||||
type: "PUT",
|
||||
data: {
|
||||
name: this.setting.setting,
|
||||
value: this.get("buffered.value")
|
||||
}
|
||||
}).catch(popupAjaxError);
|
||||
|
||||
_save(callback) {
|
||||
callback(
|
||||
ajax(`/admin/themes/${this.model.id}/setting`, {
|
||||
type: "PUT",
|
||||
data: {
|
||||
name: this.setting.setting,
|
||||
value: this.get("buffered.value")
|
||||
}
|
||||
}).catch(popupAjaxError)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user