]> git.koha-community.org Git - koha.git/commit
Bug 3144 - anti-spam for opac-suggestions
authorMason James <mtj@kohaaloha.com>
Wed, 28 May 2014 01:59:20 +0000 (13:59 +1200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 9 Jun 2014 16:01:35 +0000 (16:01 +0000)
commit644937f411b309e48ce7174a787633ad0f337463
tree1830456e97a101b98bc6b5a90dee5beb1370b22f
parent1857c444cc6666331eae34e9a99fa1eaa3f1c760
Bug 3144 - anti-spam for opac-suggestions

this patch adds a negative-captcha feature to the purchase suggestions form

some info for the curious...
 http://nedbatchelder.com/text/stopbots.html
 https://github.com/subwindow/negative-captcha
 http://www.rubydoc.info/github/subwindow/negative-captcha/frames

to test this patch...

1/ apply patch

2/ enable 'suggestion' and 'AnonSuggestions' sysprefs

3/ attempt to add a 'purchase suggestion' in OPAC
   adding the suggestion should succeed

4/ edit the koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt file,
    to reveal the hidden 'negcap' field

   replace line 87 opac-suggestions.tt, from...
     <li id="negcap" style="position: absolute; left: -2000px;">
   to ...
     <li id="negcap">

5/ attempt to add another suggestion, and populate the 'negcap' field
   adding the suggestion should fail

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Remove the bug report number in the comment since git log
cans provide the same result.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
opac/opac-suggestions.pl