From f9d933bdacaf21618da9dc74e7bd6bea5e369aa7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 29 Nov 2020 17:25:49 +0100 Subject: [PATCH] fix(admin-workflows): fix workflow definition descriptions forms --- src/Handler/Utils/Workflow/Form.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Handler/Utils/Workflow/Form.hs b/src/Handler/Utils/Workflow/Form.hs index e88fa82f5..5610d5b44 100644 --- a/src/Handler/Utils/Workflow/Form.hs +++ b/src/Handler/Utils/Workflow/Form.hs @@ -177,9 +177,11 @@ data WorkflowDescriptionsFormScope | WorkflowDescriptionsFormInstance deriving (Eq, Ord, Bounded, Enum, Read, Show, Generic, Typeable) deriving (Universe, Finite) + +nullaryPathPiece ''WorkflowDescriptionsFormScope $ camelToPathPiece' 3 workflowDescriptionsForm :: WorkflowDescriptionsFormScope -> Maybe (Map Lang (Text, Maybe StoredMarkup)) -> AForm Handler (Map Lang (Text, Maybe StoredMarkup)) -workflowDescriptionsForm scope template = Map.fromList <$> massInputAccumEditA descrAdd descrEdit (const Nothing) descrLayout ("workflow-descriptions" :: Text) (fslI msgWorkflowDescriptions) False (Map.toList <$> template) +workflowDescriptionsForm scope template = Map.fromList <$> massInputAccumEditA descrAdd descrEdit (const Nothing) descrLayout ("workflow-descriptions--" <> toPathPiece scope :: Text) (fslI msgWorkflowDescriptions) False (Map.toList <$> template) where descrAdd nudge submitView csrf = do (formRes, formView) <- descrForm nudge Nothing csrf