feat(course-events): course event note text -> html

This commit is contained in:
Sarah Vaupel 2020-03-31 14:22:42 +02:00
parent b2c4125ca3
commit c8904d10b6
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ CourseEvent
course CourseId
room Text
time Occurrences
note Text Maybe
note Html Maybe
lastChanged UTCTime default=now()
CourseAppInstructionFile

View File

@ -15,7 +15,7 @@ data CourseEventForm = CourseEventForm
{ cefType :: CI Text
, cefRoom :: Text
, cefTime :: Occurrences
, cefNote :: Maybe Text
, cefNote :: Maybe Html
}
courseEventForm :: Maybe CourseEventForm -> Form CourseEventForm
@ -35,7 +35,7 @@ courseEventForm template = identifyForm FIDCourseEvent . renderWForm FormStandar
cefType' <- wreq (textField & cfStrip & cfCI & addDatalist courseEventTypes) (fslI MsgCourseEventType & addPlaceholder (mr MsgCourseEventTypePlaceholder)) (cefType <$> template)
cefRoom' <- wreq (textField & cfStrip & addDatalist courseEventRooms) (fslI MsgCourseEventRoom) (cefRoom <$> template)
cefTime' <- aFormToWForm $ occurrencesAForm ("time" :: Text) (cefTime <$> template)
cefNote' <- wopt textField (fslI MsgCourseEventNote) (cefNote <$> template)
cefNote' <- wopt htmlField (fslI MsgCourseEventNote) (cefNote <$> template)
return $ CourseEventForm
<$> cefType'