feat(course-visibility): reorder course form
This commit is contained in:
parent
6c0adde5db
commit
7af82bcb67
@ -36,6 +36,8 @@ data CourseForm = CourseForm
|
|||||||
, cfTerm :: TermId
|
, cfTerm :: TermId
|
||||||
, cfDesc :: Maybe Html
|
, cfDesc :: Maybe Html
|
||||||
, cfLink :: Maybe Text
|
, cfLink :: Maybe Text
|
||||||
|
, cfVisFrom :: Maybe UTCTime
|
||||||
|
, cfVisTo :: Maybe UTCTime
|
||||||
, cfMatFree :: Bool
|
, cfMatFree :: Bool
|
||||||
, cfAllocation :: Maybe AllocationCourseForm
|
, cfAllocation :: Maybe AllocationCourseForm
|
||||||
, cfAppRequired :: Bool
|
, cfAppRequired :: Bool
|
||||||
@ -46,8 +48,6 @@ data CourseForm = CourseForm
|
|||||||
, cfAppRatingsVisible :: Bool
|
, cfAppRatingsVisible :: Bool
|
||||||
, cfCapacity :: Maybe Int
|
, cfCapacity :: Maybe Int
|
||||||
, cfSecret :: Maybe Text
|
, cfSecret :: Maybe Text
|
||||||
, cfVisFrom :: Maybe UTCTime
|
|
||||||
, cfVisTo :: Maybe UTCTime
|
|
||||||
, cfRegFrom :: Maybe UTCTime
|
, cfRegFrom :: Maybe UTCTime
|
||||||
, cfRegTo :: Maybe UTCTime
|
, cfRegTo :: Maybe UTCTime
|
||||||
, cfDeRegUntil :: Maybe UTCTime
|
, cfDeRegUntil :: Maybe UTCTime
|
||||||
@ -277,7 +277,11 @@ makeCourseForm miButtonAction template = identifyForm FIDcourse . validateFormDB
|
|||||||
(cfDesc <$> template)
|
(cfDesc <$> template)
|
||||||
<*> aopt (urlField & cfStrip) (fslpI MsgCourseHomepageExternal (mr MsgCourseHomepageExternalPlaceholder))
|
<*> aopt (urlField & cfStrip) (fslpI MsgCourseHomepageExternal (mr MsgCourseHomepageExternalPlaceholder))
|
||||||
(cfLink <$> template)
|
(cfLink <$> template)
|
||||||
<*> apopt checkBoxField (fslI MsgMaterialFree) (cfMatFree <$> template)
|
<*> aopt utcTimeField (fslpI MsgCourseVisibleFrom (mr MsgDate)
|
||||||
|
& setTooltip MsgCourseVisibleFromTip) (cfVisFrom <$> template)
|
||||||
|
<*> aopt utcTimeField (fslpI MsgCourseVisibleTo (mr MsgDate)
|
||||||
|
& setTooltip MsgCourseVisibleToTip) (cfVisTo <$> template)
|
||||||
|
<*> apopt checkBoxField (fslI MsgMaterialFree) (cfMatFree <$> template)
|
||||||
<* aformSection MsgCourseFormSectionRegistration
|
<* aformSection MsgCourseFormSectionRegistration
|
||||||
<*> allocationForm
|
<*> allocationForm
|
||||||
<*> apopt checkBoxField (fslI MsgCourseApplicationRequired & setTooltip MsgCourseApplicationRequiredTip) (cfAppRequired <$> template)
|
<*> apopt checkBoxField (fslI MsgCourseApplicationRequired & setTooltip MsgCourseApplicationRequiredTip) (cfAppRequired <$> template)
|
||||||
@ -290,10 +294,6 @@ makeCourseForm miButtonAction template = identifyForm FIDcourse . validateFormDB
|
|||||||
& setTooltip MsgCourseCapacityTip) (cfCapacity <$> template)
|
& setTooltip MsgCourseCapacityTip) (cfCapacity <$> template)
|
||||||
<*> aopt (textField & cfStrip) (fslpI MsgCourseSecret (mr MsgCourseSecretFormat)
|
<*> aopt (textField & cfStrip) (fslpI MsgCourseSecret (mr MsgCourseSecretFormat)
|
||||||
& setTooltip MsgCourseSecretTip) (cfSecret <$> template)
|
& setTooltip MsgCourseSecretTip) (cfSecret <$> template)
|
||||||
<*> aopt utcTimeField (fslpI MsgCourseVisibleFrom (mr MsgDate)
|
|
||||||
& setTooltip MsgCourseVisibleFromTip) (cfVisFrom <$> template)
|
|
||||||
<*> aopt utcTimeField (fslpI MsgCourseVisibleTo (mr MsgDate)
|
|
||||||
& setTooltip MsgCourseVisibleToTip) (cfVisTo <$> template)
|
|
||||||
<*> aopt utcTimeField (fslpI MsgRegisterFrom (mr MsgDate)
|
<*> aopt utcTimeField (fslpI MsgRegisterFrom (mr MsgDate)
|
||||||
& setTooltip MsgCourseRegisterFromTip) (deepAlt (cfRegFrom <$> template) newRegFrom)
|
& setTooltip MsgCourseRegisterFromTip) (deepAlt (cfRegFrom <$> template) newRegFrom)
|
||||||
<*> aopt utcTimeField (fslpI MsgRegisterTo (mr MsgDate)
|
<*> aopt utcTimeField (fslpI MsgRegisterTo (mr MsgDate)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user