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:
2017-07-26 08:37:14 +00:00
parent 26a78dfc0f
commit 9fc7ad35e5

View File

@@ -844,9 +844,9 @@ class formfield
// This code is needed by Chrome and Edge which allow multiple submission of // This code is needed by Chrome and Edge which allow multiple submission of
// a form // a form
$res .= " onclick='submit=this ; "; $res .= " onclick='submit=this ; ";
$res .= "submit.setAttribute(\"disabled\", \"disabled\");";
$res .= " setTimeout(function() {"; $res .= " setTimeout(function() {";
$res .= " submit.removeAttribute(\"disabled\"); }, 15000);"; $res .= " submit.setAttribute(\"disabled\", \"disabled\");";
$res .= " }, 1);";
$res .= "'"; $res .= "'";
$res .= "/>\n"; $res .= "/>\n";
$res .= " </div>\n"; $res .= " </div>\n";