diff options
| author | Nicolas Galler <ngl@odoo.com> | 2020-10-26 08:49:51 +0000 |
|---|---|---|
| committer | Nicolas Galler <ngl@odoo.com> | 2020-10-31 21:20:39 +0000 |
| commit | 62bd58fdef0e1e3a4dae4c9acae8023488798aef (patch) | |
| tree | b6b806fdd7b2ac8a0b3f503a9a78a4c874d0a81e /addons/website/data/website_data.xml | |
| parent | 6d2c030b9eb37f3f524125aeeeac4f6d70417ed0 (diff) | |
[FIX] website_form: prevent double clicking send
Behavior prior to the commit:
A user can double click the "Send" button when submitting a form on the
website. Because the event handler is removed on the first click, the
second submission uses the browser default behavior and posts the form
to an incorrect URL, resulting in a 404 error for the user.
Behavior after the commit:
The button is disabled after the first click.
Note:
Using `.attr('disabled')` is sufficient both to disable the button and
to give the disabled visual on all browsers since IE9, but we keep
`.addClass('disabled')` and `.off()` for cases where the clickable is not a
`button` but a link.
opw-2356402
closes odoo/odoo#61110
X-original-commit: 0eed92da709dba843a7f2f82aee772313e3d4630
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
Diffstat (limited to 'addons/website/data/website_data.xml')
0 files changed, 0 insertions, 0 deletions
