ERRATUM: You should add onclick="this.disabled=true; this.form.submit(); return true;" as stated in the Sed command. If missing "this.form.submit(); return true;" the trick works only in Firefox and IE (screw you Google...). Best regards,
Arthur SUZUKI Service informatique des bibliothèques bIBLIOTHÈQUES UNIVERSITAIRES Université Jean Moulin Lyon 3 6 Cours Albert Thomas - B.P. 8242 - 69355 Lyon Cedex 08 ligne directe : +33 (0)4 78 78 79 16 | http://bu.univ-lyon3.fr L'Université Jean Moulin est membre fondateur de l'Université de Lyon De : SUZUKI Arthur Envoyé : lundi 15 février 2016 10:55 À : '[email protected]'; '[email protected]' Cc : BOUIS Sonia; CROUZET Olivier Objet : Disabling multiple submission on search form Hello, We are facing the following problem on our installation of Koha. Some impatient users tends to click several times on the "Go" button of the search form on OPAC. Probably in a desperate hope that this will speed up the whole process. However the result is quite opposite, as Zebra is then queried multiple times which increases the server cpu load, until it reach 100% and cause Denial of Service (boooh...) We had the idea of disabling the "searchsubmit" button upon first click. This is done by adding onclick="this.disabled=true;" after "id=searchsubmit" in masthead.inc. Here is a SED command to make it easier. sed -i -e 's/id="searchsubmit"/id="searchsubmit" onclick="this.disabled=true; this.form.submit(); return true;"/' src/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc Did any of you already faced similar problems? Any other ideas or implementation are welcome! Arthur SUZUKI Service informatique des bibliothèques bIBLIOTHÈQUES UNIVERSITAIRES Université Jean Moulin Lyon 3 6 Cours Albert Thomas - B.P. 8242 - 69355 Lyon Cedex 08 ligne directe : +33 (0)4 78 78 79 16 | http://bu.univ-lyon3.fr L'Université Jean Moulin est membre fondateur de l'Université de Lyon
_______________________________________________ Koha-devel mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
