form: Block the submit button to not allow Chrome/Edge to submit multiple times in case of multiple clicks on slow server. Bug introduced in 0.41 doesn't work with Chrome: the form is not submitted
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3836 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
4
form.php
4
form.php
@@ -844,9 +844,9 @@ class formfield
|
||||
// This code is needed by Chrome and Edge which allow multiple submission of
|
||||
// a form
|
||||
$res .= " onclick='submit=this ; ";
|
||||
$res .= "submit.setAttribute(\"disabled\", \"disabled\");";
|
||||
$res .= " setTimeout(function() {";
|
||||
$res .= " submit.removeAttribute(\"disabled\"); }, 15000);";
|
||||
$res .= " submit.setAttribute(\"disabled\", \"disabled\");";
|
||||
$res .= " }, 1);";
|
||||
$res .= "'";
|
||||
$res .= "/>\n";
|
||||
$res .= " </div>\n";
|
||||
|
||||
Reference in New Issue
Block a user