feat(course-events): course event note text -> html
This commit is contained in:
parent
b2c4125ca3
commit
c8904d10b6
@ -30,7 +30,7 @@ CourseEvent
|
|||||||
course CourseId
|
course CourseId
|
||||||
room Text
|
room Text
|
||||||
time Occurrences
|
time Occurrences
|
||||||
note Text Maybe
|
note Html Maybe
|
||||||
lastChanged UTCTime default=now()
|
lastChanged UTCTime default=now()
|
||||||
|
|
||||||
CourseAppInstructionFile
|
CourseAppInstructionFile
|
||||||
|
|||||||
@ -15,7 +15,7 @@ data CourseEventForm = CourseEventForm
|
|||||||
{ cefType :: CI Text
|
{ cefType :: CI Text
|
||||||
, cefRoom :: Text
|
, cefRoom :: Text
|
||||||
, cefTime :: Occurrences
|
, cefTime :: Occurrences
|
||||||
, cefNote :: Maybe Text
|
, cefNote :: Maybe Html
|
||||||
}
|
}
|
||||||
|
|
||||||
courseEventForm :: Maybe CourseEventForm -> Form CourseEventForm
|
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)
|
cefType' <- wreq (textField & cfStrip & cfCI & addDatalist courseEventTypes) (fslI MsgCourseEventType & addPlaceholder (mr MsgCourseEventTypePlaceholder)) (cefType <$> template)
|
||||||
cefRoom' <- wreq (textField & cfStrip & addDatalist courseEventRooms) (fslI MsgCourseEventRoom) (cefRoom <$> template)
|
cefRoom' <- wreq (textField & cfStrip & addDatalist courseEventRooms) (fslI MsgCourseEventRoom) (cefRoom <$> template)
|
||||||
cefTime' <- aFormToWForm $ occurrencesAForm ("time" :: Text) (cefTime <$> template)
|
cefTime' <- aFormToWForm $ occurrencesAForm ("time" :: Text) (cefTime <$> template)
|
||||||
cefNote' <- wopt textField (fslI MsgCourseEventNote) (cefNote <$> template)
|
cefNote' <- wopt htmlField (fslI MsgCourseEventNote) (cefNote <$> template)
|
||||||
|
|
||||||
return $ CourseEventForm
|
return $ CourseEventForm
|
||||||
<$> cefType'
|
<$> cefType'
|
||||||
|
|||||||
Reference in New Issue
Block a user