Do not display FormFailures as they contain duplicates of field failures.
This commit is contained in:
parent
51fbc2a57b
commit
a7a7764c97
@ -155,7 +155,6 @@ renderBootstrap3 formLayout aform fragment = do
|
||||
widget = [whamlet|
|
||||
$newline never
|
||||
#{fragment}
|
||||
^{formFailureWidget res}
|
||||
$forall view <- views
|
||||
<div .form-group :fvRequired view:.required :not $ fvRequired view:.optional :has $ fvErrors view:.has-error>
|
||||
$case formLayout
|
||||
@ -183,16 +182,6 @@ renderBootstrap3 formLayout aform fragment = do
|
||||
return (res, widget)
|
||||
|
||||
|
||||
-- | (Internal) Render form failures via alerts.
|
||||
formFailureWidget :: FormResult a -> WidgetT site IO ()
|
||||
formFailureWidget (FormFailure reasons) =
|
||||
[whamlet|
|
||||
$forall reason <- reasons
|
||||
<div .alert .alert-danger>#{reason}
|
||||
|]
|
||||
formFailureWidget _ = return ()
|
||||
|
||||
|
||||
-- | (Internal) Render a help widget for tooltips and errors.
|
||||
helpWidget :: FieldView site -> WidgetT site IO ()
|
||||
helpWidget view = [whamlet|
|
||||
|
||||
Loading…
Reference in New Issue
Block a user