runFormPostTable -> runFormTable
This commit is contained in:
parent
0b5b132fa3
commit
ae69262ab3
@ -30,8 +30,8 @@ module Yesod.Form
|
|||||||
, runFormGet'
|
, runFormGet'
|
||||||
, runFormPost'
|
, runFormPost'
|
||||||
-- ** High-level form post unwrappers
|
-- ** High-level form post unwrappers
|
||||||
, runFormPostTable
|
, runFormTable
|
||||||
, runFormPostDivs
|
, runFormDivs
|
||||||
-- * Field/form helpers
|
-- * Field/form helpers
|
||||||
, fieldsToTable
|
, fieldsToTable
|
||||||
, fieldsToDivs
|
, fieldsToDivs
|
||||||
@ -154,9 +154,9 @@ runFormPost' f = do
|
|||||||
-- some of the boiler-plate in creating forms. In particular, is automatically
|
-- some of the boiler-plate in creating forms. In particular, is automatically
|
||||||
-- creates the form element, sets the method, action and enctype attributes,
|
-- creates the form element, sets the method, action and enctype attributes,
|
||||||
-- adds the CSRF-protection nonce hidden field and inserts a submit button.
|
-- adds the CSRF-protection nonce hidden field and inserts a submit button.
|
||||||
runFormPostTable :: Route m -> String -> FormField s m a
|
runFormTable :: Route m -> String -> FormField s m a
|
||||||
-> GHandler s m (FormResult a, GWidget s m ())
|
-> GHandler s m (FormResult a, GWidget s m ())
|
||||||
runFormPostTable dest inputLabel form = do
|
runFormTable dest inputLabel form = do
|
||||||
(res, widget, enctype, nonce) <- runFormPost $ fieldsToTable form
|
(res, widget, enctype, nonce) <- runFormPost $ fieldsToTable form
|
||||||
let widget' = [$hamlet|
|
let widget' = [$hamlet|
|
||||||
%form!method=post!action=@dest@!enctype=$enctype$
|
%form!method=post!action=@dest@!enctype=$enctype$
|
||||||
@ -170,9 +170,9 @@ runFormPostTable dest inputLabel form = do
|
|||||||
return (res, widget')
|
return (res, widget')
|
||||||
|
|
||||||
-- | Same as 'runFormPostTable', but uses 'fieldsToDivs' for styling.
|
-- | Same as 'runFormPostTable', but uses 'fieldsToDivs' for styling.
|
||||||
runFormPostDivs :: Route m -> String -> FormField s m a
|
runFormDivs :: Route m -> String -> FormField s m a
|
||||||
-> GHandler s m (FormResult a, GWidget s m ())
|
-> GHandler s m (FormResult a, GWidget s m ())
|
||||||
runFormPostDivs dest inputLabel form = do
|
runFormDivs dest inputLabel form = do
|
||||||
(res, widget, enctype, nonce) <- runFormPost $ fieldsToDivs form
|
(res, widget, enctype, nonce) <- runFormPost $ fieldsToDivs form
|
||||||
let widget' = [$hamlet|
|
let widget' = [$hamlet|
|
||||||
%form!method=post!action=@dest@!enctype=$enctype$
|
%form!method=post!action=@dest@!enctype=$enctype$
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user