feat(course-events): course event note text -> html
This commit is contained in:
parent
b2c4125ca3
commit
c8904d10b6
@ -30,7 +30,7 @@ CourseEvent
|
||||
course CourseId
|
||||
room Text
|
||||
time Occurrences
|
||||
note Text Maybe
|
||||
note Html Maybe
|
||||
lastChanged UTCTime default=now()
|
||||
|
||||
CourseAppInstructionFile
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user