fix(exams): prefill with school authship statement in optional mode

This commit is contained in:
Sarah Vaupel 2021-06-19 10:26:35 +02:00 committed by Gregor Kleen
parent bf059a1320
commit 0cd8f4c02f

View File

@ -152,8 +152,8 @@ examForm (Entity _ Course{..}) template csrf = hoist liftHandler $ do
reqContentField :: (FieldSettings UniWorX -> FieldSettings UniWorX) -> AForm Handler StoredMarkup reqContentField :: (FieldSettings UniWorX -> FieldSettings UniWorX) -> AForm Handler StoredMarkup
reqContentField ttip = areq htmlField reqContentField ttip = areq htmlField
(fslI MsgExamAuthorshipStatementContent & ttip) (fslI MsgExamAuthorshipStatementContent & ttip)
( join $ (efAuthorshipStatement <$> template) ( (join $ efAuthorshipStatement <$> template)
<|> (pure . authorshipStatementDefinitionContent . entityVal <$> mSchoolAuthorshipStatement) <|> (authorshipStatementDefinitionContent . entityVal <$> mSchoolAuthorshipStatement)
) )
forcedContentField = aforced htmlField forcedContentField = aforced htmlField
(fslI MsgExamAuthorshipStatementContent & setTooltip MsgExamAuthorshipStatementAllowOtherFalseTip) (fslI MsgExamAuthorshipStatementContent & setTooltip MsgExamAuthorshipStatementAllowOtherFalseTip)