From 6c45d2661e77efc37ebcb112b71113f16e7f49d1 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 25 Jun 2022 03:26:41 +0400 Subject: [PATCH] Added CAPTCHA on a form. --- homepage/views/guestbook.pug | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/homepage/views/guestbook.pug b/homepage/views/guestbook.pug index a6eec51..a2bffb0 100644 --- a/homepage/views/guestbook.pug +++ b/homepage/views/guestbook.pug @@ -30,9 +30,12 @@ block content span.checkbox input(type='checkbox' id='hide-website' name='hide_website' checked) label(for='hide-website') Hide website* + span.captcha + input(type='hidden', name='captcha_id' value=captcha_id) + img(src='/captcha/'+captcha_id+'/image', alt="CAPTCHA" width='160' height='40') + input(type='text' maxlength='6' placeholder='CAPTCHA' name='captcha_answer') + small Will be valid for next #[b 5] minutes. small *Only I can see if set. - br - small NO links are allowed in a message. input(type='submit' value='Send a post') section#posts if (posts)