mirror of
https://github.com/discourse/discourse-signatures.git
synced 2025-12-15 03:13:30 +00:00
FIX: preferences controller override following core change (#85)
This commit is contained in:
parent
f472444ae9
commit
77467c1372
@ -1,3 +1,4 @@
|
|||||||
|
import { action } from "@ember/object";
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
import RawHtml from "discourse/widgets/raw-html";
|
import RawHtml from "discourse/widgets/raw-html";
|
||||||
@ -45,20 +46,21 @@ function attachSignature(api, siteSettings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addSetting(api) {
|
function addSetting(api) {
|
||||||
api.modifyClass("controller:preferences/profile", {
|
api.modifyClass(
|
||||||
pluginId: "discourse-signatures",
|
"controller:preferences/profile",
|
||||||
|
(Superclass) =>
|
||||||
actions: {
|
class extends Superclass {
|
||||||
save() {
|
@action
|
||||||
this.set(
|
save() {
|
||||||
"model.custom_fields.see_signatures",
|
this.set(
|
||||||
this.get("model.see_signatures")
|
"model.custom_fields.see_signatures",
|
||||||
);
|
this.get("model.see_signatures")
|
||||||
this.get("saveAttrNames").push("custom_fields");
|
);
|
||||||
this._super();
|
this.get("saveAttrNames").push("custom_fields");
|
||||||
},
|
super.save();
|
||||||
},
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user