2023-02-13 05:53:15 -05:00
|
|
|
import SiteSettingComponent from "./site-setting";
|
2019-06-21 13:49:14 -04:00
|
|
|
import { ajax } from "discourse/lib/ajax";
|
2020-02-04 04:49:17 -05:00
|
|
|
import { url } from "discourse/lib/computed";
|
2018-03-04 19:04:23 -05:00
|
|
|
|
2023-02-13 05:53:15 -05:00
|
|
|
export default class extends SiteSettingComponent {
|
|
|
|
@url("model.id", "/admin/themes/%@/setting") updateUrl;
|
2019-10-28 05:33:31 -04:00
|
|
|
|
2019-10-29 13:01:45 -04:00
|
|
|
_save() {
|
2020-02-04 04:49:17 -05:00
|
|
|
return ajax(this.updateUrl, {
|
2019-10-29 13:01:45 -04:00
|
|
|
type: "PUT",
|
|
|
|
data: {
|
|
|
|
name: this.setting.setting,
|
|
|
|
value: this.get("buffered.value"),
|
|
|
|
},
|
|
|
|
});
|
2023-02-13 05:53:15 -05:00
|
|
|
}
|
|
|
|
}
|