minor refactor
This commit is contained in:
parent
76ac563627
commit
ad5741e4ae
@ -430,20 +430,18 @@ optionsFinite = do
|
||||
-- Special Forms --
|
||||
-------------------
|
||||
|
||||
aformSection' :: (MonadHandler m, site ~ HandlerSite m, RenderMessage site FormMessage) => SomeMessage site -> AForm m ()
|
||||
-- | Alternative implementation for 'aformSection' in a more standard that
|
||||
-- allows tooltips and arbitrary attributs. Section header must be given through `fsLabel`
|
||||
aformSection' :: (MonadHandler m, site ~ HandlerSite m, RenderMessage site FormMessage) => FieldSettings site -> AForm m ()
|
||||
aformSection' = formToAForm . fmap (second pure) . formSection'
|
||||
|
||||
-- | Alternative implementation for 'formSection' in a more standard that shows how allows tooltips and attributs
|
||||
formSection' :: (MonadHandler m, site ~ HandlerSite m, RenderMessage site FormMessage) => SomeMessage site -> MForm m (FormResult (), FieldView site) -- TODO: WIP, delete
|
||||
formSection' formSectionTitle = mreq noinputField sectionSettings Nothing
|
||||
-- | Alternative implementation for 'formSection' in a more standard that
|
||||
-- allows tooltips and arbitrary attributs. Section header must be given through `fsLabel`
|
||||
formSection' :: (MonadHandler m, site ~ HandlerSite m, RenderMessage site FormMessage) =>
|
||||
FieldSettings site -> MForm m (FormResult (), FieldView site) -- TODO: WIP, delete
|
||||
formSection' formSectionTitleSettings = mreq noinputField sectionSettings Nothing
|
||||
where
|
||||
sectionSettings = FieldSettings
|
||||
{ fsLabel = formSectionTitle
|
||||
, fsTooltip = Nothing
|
||||
, fsId = Just idFormSectionNoinput
|
||||
, fsName = Nothing
|
||||
, fsAttrs = [("class",idFormSectionNoinput)] -- TODO: check if this it useful at all
|
||||
}
|
||||
sectionSettings = formSectionTitleSettings { fsId = Just idFormSectionNoinput }
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user