From 2c12260cee05ccee57afca4026e1bdd295a8a7af Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Thu, 10 Nov 2022 15:57:38 +0100 Subject: [PATCH] chore(print): test print option for supervisor --- .../categories/qualification/de-de-formal.msg | 1 + .../categories/qualification/en-eu.msg | 1 + src/Handler/PrintCenter.hs | 4 ++ templates/mail/qualificationRenewal.hamlet | 41 ------------------- 4 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 templates/mail/qualificationRenewal.hamlet diff --git a/messages/uniworx/categories/qualification/de-de-formal.msg b/messages/uniworx/categories/qualification/de-de-formal.msg index a2c00de7a..66318e9ef 100644 --- a/messages/uniworx/categories/qualification/de-de-formal.msg +++ b/messages/uniworx/categories/qualification/de-de-formal.msg @@ -68,6 +68,7 @@ LmsPinRenewal n@Int: E-Learning Pin ausgetauscht für #{n} #{pluralDE n "Prüfli LmsActionFailed n@Int: Aktion nicht durchgeführt für #{n} #{pluralDE n "Person" "Personen"}, da diese derzeit nicht an einer Prüfung teilnehmen. MppOpening: Anrede MppClosing: Grußformel +MppSupervisor: Ansprechpartner MppDate: Datum MppURL: Link E-Learning MppLogin !ident-ok: Login diff --git a/messages/uniworx/categories/qualification/en-eu.msg b/messages/uniworx/categories/qualification/en-eu.msg index f92509750..88410dd8e 100644 --- a/messages/uniworx/categories/qualification/en-eu.msg +++ b/messages/uniworx/categories/qualification/en-eu.msg @@ -68,6 +68,7 @@ LmsPinRenewal n@Int: E-learning pin replaced randomly for #{n} #{pluralENs n "ex LmsActionFailed n@Int: No action for #{n} #{pluralENs n "person"}, since there was no ongoing examination. MppOpening: Opening MppClosing: Closing +MppSupervisor: Supervisor MppDate: Date MppURL: Link e-learning MppLogin: Login diff --git a/src/Handler/PrintCenter.hs b/src/Handler/PrintCenter.hs index a4634cc50..62af49bca 100644 --- a/src/Handler/PrintCenter.hs +++ b/src/Handler/PrintCenter.hs @@ -54,6 +54,7 @@ data MetaPinRenewal = MetaPinRenewal , mppLang :: Lang , mppOpening :: Maybe Text , mppClosing :: Maybe Text + , mppSupervisor:: Maybe Text } deriving (Eq, Ord, Show, Generic, Typeable) @@ -69,6 +70,7 @@ instance Default MetaPinRenewal where , mppLang = "de-de" , mppOpening = Just "Lieber Schlumpfi," , mppClosing = Nothing + , mppSupervisor= Nothing } makeRenewalForm :: Maybe MetaPinRenewal -> Form MetaPinRenewal @@ -84,6 +86,7 @@ makeRenewalForm tmpl = identifyForm FIDLmsLetter . validateForm validateMetaPinR <*> areq (langField True) (fslI MsgMppLang) ((mppLang <$> tmpl) <|> Just "de-de") <*> aopt textField (fslI MsgMppOpening) (mppOpening <$> tmpl) <*> aopt textField (fslI MsgMppClosing) (mppClosing <$> tmpl) + <*> aopt textField (fslI MsgMppSupervisor) (mppSupervisor<$> tmpl) validateMetaPinRenewal :: FormValidator MetaPinRenewal Handler () validateMetaPinRenewal = do @@ -103,6 +106,7 @@ mprToMeta MetaPinRenewal{..} = mkMeta , toMeta "lang" mppLang , mbMeta keyOpening mppOpening , mbMeta keyClosing mppClosing + , mbMeta "supervisor" mppSupervisor ] where deOrEn = if isDe mppLang then "de" else "en" diff --git a/templates/mail/qualificationRenewal.hamlet b/templates/mail/qualificationRenewal.hamlet deleted file mode 100644 index a267c73c4..000000000 --- a/templates/mail/qualificationRenewal.hamlet +++ /dev/null @@ -1,41 +0,0 @@ -$newline never - -$# SPDX-FileCopyrightText: 2022 Steffen Jost -$# -$# SPDX-License-Identifier: AGPL-3.0-or-later - -\ - - - -