* removed captchas (well, commented them out)
This commit is contained in:
parent
04d549b817
commit
04eb624497
2 changed files with 5 additions and 3 deletions
|
@ -140,7 +140,7 @@ renderCommentBox cLang cId = do
|
|||
H.p $ H.input ! A.name "cname" ! A.placeholder "Name" ! A.class_ "cInput"
|
||||
H.p $ H.label $ H.textarea ! A.name "ctext" ! A.cols "50" ! A.rows "13" ! A.class_ "cInput" !
|
||||
A.placeholder (toValue $ cTextPlaceholder cLang) $ mempty
|
||||
H.p $ H.label $ captcha
|
||||
-- H.p $ H.label $ captcha
|
||||
H.p $ H.input ! A.class_ "cInput" ! A.style "width: 120px;" ! A.type_ "submit" ! A.value (toValue $ cSend cLang)
|
||||
|
||||
renderComments :: [Comment] -> BlogLang -> Html
|
||||
|
|
|
@ -149,7 +149,9 @@ addComment acid lang captchakey eId = do
|
|||
nComment <- Comment <$> pure now
|
||||
<*> lookText' "cname"
|
||||
<*> pure (commentEscape nCtext)
|
||||
-- captcha verification
|
||||
update' acid (AddComment eId nComment)
|
||||
>> seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse())
|
||||
{- -- captcha verification
|
||||
challenge <- look "recaptcha_challenge_field"
|
||||
response <- look "recaptcha_response_field"
|
||||
(userIp, _) <- askRq >>= return . rqPeer
|
||||
|
@ -157,7 +159,7 @@ addComment acid lang captchakey eId = do
|
|||
case validation of
|
||||
Right _ -> update' acid (AddComment eId nComment)
|
||||
>> seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse())
|
||||
Left _ -> (liftIO $ putStrLn "Captcha failed") >> seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse())
|
||||
Left _ -> (liftIO $ putStrLn "Captcha failed") >> seeOther ("/" ++ show lang ++ "/" ++ show eId) (toResponse()) -}
|
||||
|
||||
commentEscape :: Text -> Text
|
||||
commentEscape = newlineEscape . ltEscape . gtEscape . ampEscape
|
||||
|
|
Loading…
Reference in a new issue