mirror of
https://code.naskya.net/repos/ndqEd
synced 2025-03-20 15:14:54 +09:00
Custom ticket fields specify whether required
This commit is contained in:
parent
17643c6d49
commit
a2ca78c790
4 changed files with 6 additions and 0 deletions
src/Vervis
|
@ -56,6 +56,7 @@ data NewField = NewField
|
|||
, nfName :: Text
|
||||
, nfDesc :: Maybe Text
|
||||
, nfType :: WorkflowFieldType
|
||||
, nfReq :: Bool
|
||||
}
|
||||
|
||||
newFieldAForm :: WorkflowId -> AForm Handler NewField
|
||||
|
@ -64,6 +65,7 @@ newFieldAForm wid = NewField
|
|||
<*> areq textField "Name*" Nothing
|
||||
<*> aopt textField "Description" Nothing
|
||||
<*> areq (selectField optionsEnum) "Type*" Nothing
|
||||
<*> areq checkBoxField "Required*" Nothing
|
||||
|
||||
newFieldForm :: WorkflowId -> Form NewField
|
||||
newFieldForm wid = renderDivs $ newFieldAForm wid
|
||||
|
|
|
@ -149,6 +149,7 @@ postWorkflowFieldsR shr wfl = do
|
|||
, workflowFieldName = nfName nf
|
||||
, workflowFieldDesc = nfDesc nf
|
||||
, workflowFieldType = nfType nf
|
||||
, workflowFieldRequired = nfReq nf
|
||||
}
|
||||
runDB $ insert_ field
|
||||
setMessage "Workflow field added."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue