2019-10-24 00:39:32 +08:00
|
|
|
import Route from "@ember/routing/route";
|
2015-11-13 05:08:19 +08:00
|
|
|
import { scrollTop } from "discourse/mixins/scroll-top";
|
|
|
|
|
2023-03-15 21:17:51 +08:00
|
|
|
export default class AdminCustomizeEmailTemplatesEditRoute extends Route {
|
2015-11-13 05:08:19 +08:00
|
|
|
model(params) {
|
|
|
|
const all = this.modelFor("adminCustomizeEmailTemplates");
|
2016-10-27 03:44:36 +08:00
|
|
|
return all.findBy("id", params.id);
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
2015-11-13 05:08:19 +08:00
|
|
|
|
2015-11-28 01:51:50 +08:00
|
|
|
setupController(controller, emailTemplate) {
|
|
|
|
controller.setProperties({ emailTemplate, saved: false });
|
2015-11-13 05:08:19 +08:00
|
|
|
scrollTop();
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
2020-07-07 17:44:13 +08:00
|
|
|
|
|
|
|
deactivate() {
|
|
|
|
this.controller.set("emailTemplate", null);
|
2023-03-15 21:17:51 +08:00
|
|
|
}
|
|
|
|
}
|