fix(admin-workflows): fix workflow definition descriptions forms

This commit is contained in:
Gregor Kleen 2020-11-29 17:25:49 +01:00
parent 8154384347
commit f9d933bdac

View File

@ -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