mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15564] Don't use ES2015, it breaks UI tests
PHPBB3-15564
This commit is contained in:
parent
27153d7e46
commit
772e801d4f
1 changed files with 6 additions and 6 deletions
|
@ -1650,19 +1650,19 @@ phpbb.lazyLoadAvatars = function loadAvatars() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const recaptchaForm = $('.g-recaptcha').parents('form');
|
var recaptchaForm = $('.g-recaptcha').parents('form');
|
||||||
let submitButton = null;
|
var submitButton = null;
|
||||||
let programaticallySubmitted = false;
|
var programaticallySubmitted = false;
|
||||||
|
|
||||||
phpbb.recaptchaOnLoad = function () {
|
phpbb.recaptchaOnLoad = function () {
|
||||||
// Listen to submit buttons in order to know which one was pressed
|
// Listen to submit buttons in order to know which one was pressed
|
||||||
$('input[type="submit"]').each(() => {
|
$('input[type="submit"]').each(function () {
|
||||||
$(this).on('click', () => {
|
$(this).on('click', function () {
|
||||||
submitButton = this;
|
submitButton = this;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
recaptchaForm.on('submit', e => {
|
recaptchaForm.on('submit', function (e) {
|
||||||
if (!programaticallySubmitted) {
|
if (!programaticallySubmitted) {
|
||||||
grecaptcha.execute();
|
grecaptcha.execute();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Add table
Reference in a new issue