Created
July 24, 2013 00:05
-
-
Save carlohamalainen/6067156 to your computer and use it in GitHub Desktop.
applicative recaptcha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Before: | |
commentForm :: EntryId -> Form Comment | |
commentForm entryId = renderDivs $ Comment | |
<$> pure entryId | |
<*> aformM (liftIO getCurrentTime) | |
<*> aformM requireAuthId | |
<*> areq textField (fieldSettingsLabel MsgCommentName) Nothing | |
<*> areq textareaField (fieldSettingsLabel MsgCommentText) Nothing | |
-- Adding the ReCAPTCHA form, we just append "<* recaptchaAForm": | |
commentForm :: EntryId -> Form Comment | |
commentForm entryId = renderDivs $ Comment | |
<$> pure entryId | |
<*> aformM (liftIO getCurrentTime) | |
<*> aformM requireAuthId | |
<*> areq textField (fieldSettingsLabel MsgCommentName) Nothing | |
<*> areq textareaField (fieldSettingsLabel MsgCommentText) Nothing <* recaptchaAForm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment