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