From 9290052fe791a578f8d7d87e2b071d1984b8b334 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 29 Jun 2018 09:32:37 +0200 Subject: [PATCH] Use fieldests for what they're meant to do --- src/Handler/Utils/Form.hs | 2 +- templates/widgets/multiAction.hamlet | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Handler/Utils/Form.hs b/src/Handler/Utils/Form.hs index 9e70fbfc5..cce41766c 100644 --- a/src/Handler/Utils/Form.hs +++ b/src/Handler/Utils/Form.hs @@ -527,6 +527,6 @@ multiAction acts = do options = OptionList [ Option (mr a) a (toPathPiece a) | a <- Map.keys acts ] fromPathPiece (actionRes, actionView) <- mreq (selectField $ return options) "" Nothing results <- mapM id acts - let actionWidgets = Map.foldrWithKey (\(toPathPiece -> act) (_, w) -> ($(widgetFile "widgets/multiAction") :)) [] results + let actionWidgets = Map.foldrWithKey (\act (_, w) -> ($(widgetFile "widgets/multiAction") :)) [] results actionResults = Map.map fst results return ((actionResults Map.!) =<< actionRes, $(widgetFile "widgets/multiActionCollect")) diff --git a/templates/widgets/multiAction.hamlet b/templates/widgets/multiAction.hamlet index ff12d8ad3..71e3acf14 100644 --- a/templates/widgets/multiAction.hamlet +++ b/templates/widgets/multiAction.hamlet @@ -1,2 +1,4 @@ -
+
+ + _{act} ^{w}