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