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
|
<*> let
|
||||||
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)
|
||||||
(maybe mempty (authorshipStatementDefinitionContent . entityVal) mSchoolAuthorshipStatement)
|
(maybe mempty (authorshipStatementDefinitionContent . entityVal) mSchoolAuthorshipStatement)
|
||||||
contentField ttipReq = bool forcedContentField (reqContentField ttipReq) schoolSheetExamAuthorshipStatementAllowOther
|
contentField ttipReq = bool forcedContentField (reqContentField ttipReq) schoolSheetExamAuthorshipStatementAllowOther
|
||||||
in case schoolSheetExamAuthorshipStatementMode of
|
in case schoolSheetExamAuthorshipStatementMode of
|
||||||
SchoolAuthorshipStatementModeNone -> pure Nothing -- suppress display of whole section incl. header
|
SchoolAuthorshipStatementModeNone -> pure Nothing -- suppress display of whole section incl. header
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user