Course editing works now, deletion not due to SQLconstraints (lecturers need deletion).

This commit is contained in:
SJost 2017-10-10 00:24:25 +02:00
parent 00c0e1fbfe
commit 77e7e77e74

View File

@ -177,7 +177,8 @@ courseToForm cEntity = CourseForm
newCourseForm :: Maybe CourseForm -> Form CourseForm newCourseForm :: Maybe CourseForm -> Form CourseForm
newCourseForm template html = do newCourseForm template html = do
(result, widget) <- flip (renderBootstrap3 bsHorizontalDefault) html $ CourseForm (result, widget) <- flip (renderBootstrap3 bsHorizontalDefault) html $ CourseForm
<$> pure cid -- $ join $ cfCourseId <$> template -- why doesnt this work? -- <$> pure cid -- $ join $ cfCourseId <$> template -- why doesnt this work?
<$> aopt hiddenField "courseId" (cfCourseId <$> template)
<*> areq textField (set "Name") (cfName <$> template) <*> areq textField (set "Name") (cfName <$> template)
<*> aopt htmlField (set "Beschreibung") (cfDesc <$> template) <*> aopt htmlField (set "Beschreibung") (cfDesc <$> template)
<*> aopt urlField (set "Homepage") (cfLink <$> template) <*> aopt urlField (set "Homepage") (cfLink <$> template)