diff --git a/nix/docker/default.nix b/nix/docker/default.nix index 65e94c654..43617b798 100644 --- a/nix/docker/default.nix +++ b/nix/docker/default.nix @@ -27,7 +27,7 @@ let #texlive.combined.scheme-medium # too large for container in LMU build environment. (texlive.combine { inherit (texlive) scheme-basic - babel-german babel-english booktabs + babel-german babel-english booktabs textpos enumitem eurosym koma-script parskip xcolor # required fro LuaTeX luatexbase lualatex-math unicode-math selnolig diff --git a/shell.nix b/shell.nix index 6522c94a7..5a22827d5 100644 --- a/shell.nix +++ b/shell.nix @@ -2,7 +2,7 @@ let inherit (pkgs.lib) optionalString; - + haskellPackages = pkgs.haskellPackages; develop = pkgs.writeScriptBin "develop" (import ./nix/develop.nix { inherit pkgs; } '' @@ -71,19 +71,19 @@ let in pkgs.mkShell { name = "uni2work"; nativeBuildInputs = [develop inDevelop killallUni2work diffRunning] - ++ (with pkgs; - [ nodejs-14_x postgresql_12 openldap google-chrome exiftool memcached minio minio-client - gup skopeo + ++ (with pkgs; + [ nodejs-14_x postgresql_12 openldap google-chrome exiftool memcached minio minio-client + gup skopeo #texlive.combined.scheme-full # works #texlive.combined.scheme-medium - # texlive.combined.scheme-small + # texlive.combined.scheme-small (texlive.combine { - inherit (texlive) scheme-basic - babel-german babel-english booktabs - enumitem eurosym koma-script parskip xcolor - # required fro LuaTeX + inherit (texlive) scheme-basic + babel-german babel-english booktabs textpos + enumitem eurosym koma-script parskip xcolor + # required fro LuaTeX luatexbase lualatex-math unicode-math selnolig - ; + ; }) ] ) diff --git a/src/Handler/Admin/Apc.hs b/src/Handler/Admin/Apc.hs index 0f6e2881d..0857cbf68 100644 --- a/src/Handler/Admin/Apc.hs +++ b/src/Handler/Admin/Apc.hs @@ -10,35 +10,34 @@ import Import -- import qualified Data.Set as Set -- import Handler.Utils - {- data MetaPinRenewal = MetaPinRenewal - { mppOpening - , mppClosing - , mppDate - , mppURL - , mppLogin - , mppPin + { mppOpening :: Maybe Text + , mppClosing :: Maybe Text + , mppDate :: Maybe Text + , mppURL :: Maybe Text + , mppLogin :: Text + , mppPin :: Text , mppRecipient :: Text , mppAdress :: [Text] , mppLang :: Text , mppIsDe :: Bool } + deriving (Eq, Ord, Read, Show, Generic, Typeable) --} -{- -makePrintForm :: Maybe AvsQueryPerson -> Form AvsQueryPerson -makeAvsPersonForm tmpl = identifyForm FIDAvsQueryPerson . validateForm validateAvsQueryPerson $ \html -> - flip (renderAForm FormStandard) html $ AvsQueryPerson - <$> aopt textField (fslI MsgAvsCardNo) (avsPersonQueryCardNo <$> tmpl) - <*> aopt textField (fslI MsgAvsFirstName) (avsPersonQueryFirstName <$> tmpl) - <*> aopt textField (fslI MsgAvsLastName) (avsPersonQueryLastName <$> tmpl) - <*> aopt textField (fslI MsgAvsInternalPersonalNo) (avsPersonQueryInternalPersonalNo <$> tmpl) - <*> aopt textField (fslI MsgAvsVersionNo) (avsPersonQueryVersionNo <$> tmpl) -validateAvsQueryPerson :: FormValidator AvsQueryPerson Handler () -validateAvsQueryPerson = do - AvsQueryPerson{..} <- State.get +makePrintForm :: Maybe MetaPinRenewal -> Form MetaPinRenewal +makePrintForm tmpl = identifyForm FIDLmsLetter . validateForm validateMetaPinRenewal $ \html -> + flip (renderAForm FormStandard) html $ MetaPinRenewal + <$> aopt textField (fslI MsgMppOpening) (mppOpening <$> tmpl) + <*> aopt textField (fslI MsgMppClosing) (mppClosing <$> tmpl) + <*> aopt textField (fslI MsgMppDate) (mppDate <$> tmpl) + <*> aopt textField (fslI MsgMppURL) (mppURL <$> tmpl) + <*> aopt textField (fslI MsgMppnNo) (mppRecipient <$> tmpl) + +validateMetaPinReneqal :: FormValidator MetaPinRenewal Handler () +validateMetaPinReneqal = do + AvsQueryPeMetaPinRenewalate.get guardValidation MsgAvsQueryEmpty $ is _Just avsPersonQueryCardNo || is _Just avsPersonQueryFirstName || diff --git a/src/Utils/Form.hs b/src/Utils/Form.hs index 8b4497dcf..ff923d430 100644 --- a/src/Utils/Form.hs +++ b/src/Utils/Form.hs @@ -297,6 +297,7 @@ data FormIdentifier | FIDAllocationNotification | FIDAvsQueryPerson | FIDAvsQueryStatus + | FIDLmsLetter deriving (Eq, Ord, Read, Show) instance PathPiece FormIdentifier where diff --git a/templates/letter/din5008.latex b/templates/letter/din5008.latex index f4e271489..6f863c761 100644 --- a/templates/letter/din5008.latex +++ b/templates/letter/din5008.latex @@ -90,6 +90,10 @@ $endif$ \addtolength{\oddsidemargin}{-1in} \setlength{\textwidth}{\useplength{firstheadwidth}} +\usepackage[absolute,showboxes,quiet]{textpos} +\setlength{\TPHorizModule}{5mm} +\setlength{\TPVertModule}{\TPHorizModule} + \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} @@ -118,8 +122,13 @@ $endif$ \opening{$opening$} - $body$ + \begin{textblock}{13}(15,45) + $pin$ + \end{textblock} + $body$ + + \vspace{1.2cm} \closing{$closing$} \ps $postskriptum$