fix(exams): set use-custom correctly if forced

This commit is contained in:
Sarah Vaupel 2021-06-09 16:56:25 +02:00 committed by Gregor Kleen
parent abd68ac032
commit 8bb61401a7

View File

@ -150,9 +150,7 @@ examForm (Entity _ Course{..}) template csrf = hoist liftHandler $ do
<* aformSection MsgExamAuthorshipStatementSection
<* optionalActionA
( aopt htmlField
( fslI MsgExamAuthorshipStatementSchoolDefinition
& addAttr "disabled" "disabled"
)
(fslI MsgExamAuthorshipStatementSchoolDefinition & addAttr "disabled" "disabled")
((Just . authorshipStatementDefinitionContent . entityVal) <$> mSchoolAuthorshipStatement)
<* optionalActionA
( apreq htmlField
@ -170,7 +168,7 @@ examForm (Entity _ Course{..}) template csrf = hoist liftHandler $ do
& addAttr "disabled" "disabled"
& setTooltip MsgExamAuthorshipStatementUseCustomDefinitionDisabledTip
)
( bool (Just True)
( bool (Just False)
(Just True) -- TODO: set according to template, if template is empty `Just True`
schoolSheetExamAuthorshipStatementAllowOther
)