From 4f237e19682d489bdfc87ee6a1b18dac7eb99bfa Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 17 Apr 2020 17:25:43 +0200 Subject: [PATCH] fix(course-users): deregistration w/ allocation & w/o reason --- src/Handler/Course/Users.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler/Course/Users.hs b/src/Handler/Course/Users.hs index e95121686..6709350c7 100644 --- a/src/Handler/Course/Users.hs +++ b/src/Handler/Course/Users.hs @@ -475,7 +475,7 @@ courseUserDeregisterForm cid = wFormToAForm $ do E.&&. E.not_ (E.isNothing $ participant E.^. CourseParticipantAllocated) if | allocated -> do wformMessage =<< messageIconI Warning IconEnrolFalse MsgCourseDeregistrationAllocationShouldLogTip - fmap CourseUserDeregisterData <$> optionalActionW (areq (textField & cfStrip & guardField (not . null)) (fslI MsgCourseDeregistrationAllocationReason & setTooltip MsgCourseDeregistrationAllocationReasonTip) Nothing) (fslI MsgCourseDeregistrationAllocationShouldLog) (Just True) + fmap CourseUserDeregisterData <$> optionalActionW (apreq (textField & cfStrip & guardField (not . null)) (fslI MsgCourseDeregistrationAllocationReason & setTooltip MsgCourseDeregistrationAllocationReasonTip) Nothing) (fslI MsgCourseDeregistrationAllocationShouldLog) (Just True) | otherwise -> pure . pure $ CourseUserDeregisterData Nothing getCUsersR, postCUsersR :: TermId -> SchoolId -> CourseShorthand -> Handler Html