Commit 2cf29b51 authored by Bas Lijnse's avatar Bas Lijnse

Added recursive call when layouting form fields (which happens in nested records).

parent b4072a00
......@@ -328,6 +328,7 @@ toFormItem = layoutSubUIs (SelectAND (SelectByPath []) (SelectOR (SelectByHasAtt
,optAddLabel
//If there is hint attribute, create an extra icon
,optAddIcon
,removeLabelAttribute
]
)
where
......@@ -374,3 +375,7 @@ where
| c == '_' = [' ':addspace cs]
| isUpper c = [' ',toLower c:addspace cs]
| otherwise = [c:addspace cs]
removeLabelAttribute = layoutSubUIs (SelectAND SelectChildren (SelectByHasAttribute "label"))
(delUIAttributes (SelectKeys ["label"]))
......@@ -78,13 +78,17 @@ where
setTitle = copySubUIAttributes (SelectKeys ["title"]) [0] []
layoutEditor = layoutSubUIs (SelectByPath [1]) (sequenceLayouts
[layoutSubUIs SelectFormElement toFormItem
[layoutSubUIs SelectFormElement layoutFormItem
,layoutSubUIs (SelectByType UIRecord) layoutRecord
,layoutSubUIs (SelectByType UICons) layoutCons
,layoutSubUIs (SelectByType UIVarCons) layoutVarCons
,layoutSubUIs (SelectByType UIList) layoutList
,layoutSubUIs (SelectByType UIPair) layoutPair
])
layoutFormItem = sequenceLayouts
[toFormItem
,layoutSubUIs (SelectAND SelectDescendents SelectFormElement) layoutFormItem
]
removePromptIfEmpty = layoutSubUIs withEmptyPrompt removePrompt
where
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment