Commit Graph

91 Commits

Author SHA1 Message Date
Sebastián Estrella
32ecbd056d Customize areq and wreq error message 2019-09-10 00:42:21 -05:00
Jezen Thomas
e5e39f353d
Implement mreq in terms of mreqMsg 2019-07-18 13:56:19 +03:00
Jezen Thomas
14ade1ad98
Add mreqMsg
When a form has multiple `mreq` fields and the user submits a form with
more than one of these values missing, they see an ambiguous collection
of "Value is required" messages. The `mreqMsg` function allows you to
provide your own MsgValueRequired message for a better UX.
2019-07-18 11:11:02 +03:00
Ben Sima
1d95f8315b Remove unnecessary type annotation 2018-05-15 12:51:14 -07:00
Ben Sima
e906768ee9 Replace addClass/removeClass examples with ghci-driven examples 2018-05-15 12:50:39 -07:00
Ben Sima
e8a145ae88 Add examples to addClass and removeClass 2018-05-14 08:45:09 -07:00
Ben Sima
c57ba49472 Add @since documentation 2018-05-11 13:31:25 -07:00
Ben Sima
56ca6d7914 Move 'addClass' to Yesod.Form.Functions and add 'removeClass'
'addClass' is more general than just Bootstrap forms. In particular, it is
copied into the yesod-form-bootstrap4 project and I found myself using it in my
custom forms. It would be useful to have it exported for use elsewhere.

I added 'removeClass' because I needed it while creating a custom 'readonly'
input in a form and thought it might be generally useful.
2018-05-11 13:23:31 -07:00
Michael Snoyman
6830a9840c
Merge branch 'better-monads' into no-transformers 2018-01-17 06:43:52 +02:00
Sebastián Estrella
0f28604cfe Reduce verbosity using Monadic Forms 2017-08-22 02:24:26 -05:00
Isaac Elliott
b76d9c3090 Fixed spelling and wording for Yesod.Form.Functions.convertField's docs 2017-02-28 17:50:20 +10:00
Michael Snoyman
aefd074efa Cleanup GHC 8 redundant constraints 2017-02-05 13:35:12 +02:00
Michael Snoyman
3dc2d10b30 Compile with -Wall -Werror 2017-02-05 12:09:18 +02:00
James Parker
d59344b78b housekeeping 2017-02-02 01:55:00 -05:00
James Parker
ef22b131f1 Fix for bug in identifyForm with empty forms. #1072 2017-01-31 16:06:40 -05:00
Maximilian Tagher
d39ce44c21 Use defaultCsrfParamName instead of hard-coding its value
* Up version bounds so that `defaultCsrfParamName` is available.
* I didn't bump the yesod-form version. It seemed unnecessary to do a new release just for this.
2016-02-15 23:59:24 -08:00
Maximilian Tagher
949fa2d426 Slightly improve comment about constant time comparison 2015-08-16 20:50:29 -04:00
Michael Snoyman
f8847bd231 runFormPost: proper behavior for missing input #950 2015-03-11 07:25:53 +02:00
Maximilian Tagher
f1bdd0ace8 Fix typos; verison => version 2014-11-28 17:02:10 -05:00
Michael Snoyman
4ee1eb17cd Generalize a type signature a bit 2014-11-25 12:03:54 +02:00
Michael Snoyman
c629cba207 Version bump 2014-09-20 23:34:38 +03:00
João Cristóvão
13bc55969a Added convertField function to ease the generation of new fields 2014-09-17 18:08:06 +01:00
Michael Snoyman
7f5ed740a9 renderBootstrap2 2014-07-30 11:52:04 +03:00
Michael Snoyman
99621c17b0 Generate valid HTML from renderTable 2014-07-24 10:45:06 +03:00
Michael Snoyman
9a583e5af3 Version bumps 2014-06-18 06:59:23 +03:00
Axel Angel
bfe0b2867a Adapt generateFormGet to follow the post variant (deprecate non-prime)
To stay backward compatible, we fix this in generateFormGet'

From discussion:
https://groups.google.com/forum/#!topic/yesodweb/lWKFzJDOnnY
2014-06-15 20:30:18 +02:00
Michael Snoyman
c8f7e34b2f Merge pull request #731 from andrewthad/master
Fix starting field number
2014-05-09 18:28:07 +03:00
andrewthad
9f379bc219 Fix starting field number
This commit makes starts the counter as `IntSingle 0` instead of `IntSingle 1`. This is needed because `newFormIdent` yield the incremented state value. Meaning: right now, all of my forms start at f2 instead of f1. This commit will make them start at f1 like I would expect them to.
2014-05-06 09:34:56 -04:00
Vincent Hanquez
8d07d1fa72 Use const time equality from byteable instead of crypto-api 2014-03-18 08:29:47 +00:00
Felipe Lessa
969496b9f1 Golf around on identifyForm :). 2014-03-12 11:32:46 -03:00
Felipe Lessa
3d2253d5d3 Typo. 2014-03-12 11:23:32 -03:00
Felipe Lessa
68d0142dda New identifyForm function (fixes #649).
Based on code from @axel-angel but rewritten in a more lightweight
style (IMHO, at least :).
2014-03-12 11:20:31 -03:00
Felipe Lessa
59402da412 Deprecate the original renderBootstrap. 2014-03-11 17:09:27 -03:00
Michael Snoyman
bcff12bed1 parseHelperGen 2014-03-05 06:59:57 +02:00
Michael Snoyman
8376f4da9e Revert "Update Functions.hs"
This reverts commit 78913a2cfb.
2013-12-22 16:29:12 +02:00
andrewthad
78913a2cfb Update Functions.hs
Generalize parseHelper to work with types of messages other than FormMessage.
2013-12-20 12:01:55 -05:00
Lubomír Sedlář
1ea61ddfc7 Add more documentation to Yesod.Form.Functions 2013-08-23 16:44:21 +02:00
Michael Snoyman
fb4045ea45 Warning cleanup 2013-03-20 11:46:32 +02:00
Michael Snoyman
a2c4f1f3b7 MonadHandler/MonadWidget 2013-03-17 10:10:39 +02:00
Michael Snoyman
9c4cd573b4 Everything compiles 2013-03-14 09:28:51 +02:00
Michael Snoyman
099b96f178 Everything compiles 2013-03-13 13:35:11 +02:00
Michael Snoyman
8246aa4c1e Whole repo compiles 2013-03-11 11:25:26 +02:00
Michael Snoyman
617c1d724e Removed some FIXMEs 2013-01-02 14:26:56 +02:00
Michael Snoyman
7e17a8df50 Merge branch 'fileField'
Conflicts:
	yesod-form/Yesod/Form/Types.hs
2012-11-15 09:14:07 +02:00
Michael Snoyman
a35161cf6e Haddock fixes 2012-11-12 17:51:41 +02:00
Michael Snoyman
2ea1bcb5c8 fileField unabled
Boils down to two changes:

* fieldParse takes a list of FileInfos
* fieldEnctype added
2012-11-09 08:58:03 +02:00
Michael Snoyman
363e4afeee Allow multiple files (#448) 2012-11-07 09:08:29 +02:00
Michael
498d22714b checkMMod to checkMMap (#416) 2012-09-04 17:57:05 +03:00
Michael Snoyman
6b31b583f2 checkMMod 2012-08-22 20:05:34 +03:00
Michael Snoyman
5bc6b501b2 Removed blaze-html 0.5 conditionals 2012-08-08 17:03:59 +03:00