fix(exams): prefill with school authship statement in optional mode
This commit is contained in:
parent
bf059a1320
commit
0cd8f4c02f
@ -151,13 +151,13 @@ examForm (Entity _ Course{..}) template csrf = hoist liftHandler $ do
|
||||
<*> let
|
||||
reqContentField :: (FieldSettings UniWorX -> FieldSettings UniWorX) -> AForm Handler StoredMarkup
|
||||
reqContentField ttip = areq htmlField
|
||||
(fslI MsgExamAuthorshipStatementContent & ttip)
|
||||
( join $ (efAuthorshipStatement <$> template)
|
||||
<|> (pure . authorshipStatementDefinitionContent . entityVal <$> mSchoolAuthorshipStatement)
|
||||
)
|
||||
forcedContentField = aforced htmlField
|
||||
(fslI MsgExamAuthorshipStatementContent & setTooltip MsgExamAuthorshipStatementAllowOtherFalseTip)
|
||||
(maybe mempty (authorshipStatementDefinitionContent . entityVal) mSchoolAuthorshipStatement)
|
||||
(fslI MsgExamAuthorshipStatementContent & ttip)
|
||||
( (join $ efAuthorshipStatement <$> template)
|
||||
<|> (authorshipStatementDefinitionContent . entityVal <$> mSchoolAuthorshipStatement)
|
||||
)
|
||||
forcedContentField = aforced htmlField
|
||||
(fslI MsgExamAuthorshipStatementContent & setTooltip MsgExamAuthorshipStatementAllowOtherFalseTip)
|
||||
(maybe mempty (authorshipStatementDefinitionContent . entityVal) mSchoolAuthorshipStatement)
|
||||
contentField ttipReq = bool forcedContentField (reqContentField ttipReq) schoolSheetExamAuthorshipStatementAllowOther
|
||||
in case schoolSheetExamAuthorshipStatementMode of
|
||||
SchoolAuthorshipStatementModeNone -> pure Nothing -- suppress display of whole section incl. header
|
||||
|
||||
Loading…
Reference in New Issue
Block a user