mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:30:35 +08:00
e51de4cc25
- also adds a new staff action type called "change theme setting" for easier logging of staff changes to theme settings
18 lines
592 B
JavaScript
18 lines
592 B
JavaScript
import BufferedContent from "discourse/mixins/buffered-content";
|
|
import SettingComponent from "admin/mixins/setting-component";
|
|
import { ajax } from "discourse/lib/ajax";
|
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
|
|
|
export default Ember.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);
|
|
}
|
|
});
|