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');
|
||||
let submitButton = null;
|
||||
let programaticallySubmitted = false;
|
||||
var recaptchaForm = $('.g-recaptcha').parents('form');
|
||||
var submitButton = null;
|
||||
var programaticallySubmitted = false;
|
||||
|
||||
phpbb.recaptchaOnLoad = function () {
|
||||
// Listen to submit buttons in order to know which one was pressed
|
||||
$('input[type="submit"]').each(() => {
|
||||
$(this).on('click', () => {
|
||||
$('input[type="submit"]').each(function () {
|
||||
$(this).on('click', function () {
|
||||
submitButton = this;
|
||||
});
|
||||
});
|
||||
|
||||
recaptchaForm.on('submit', e => {
|
||||
recaptchaForm.on('submit', function (e) {
|
||||
if (!programaticallySubmitted) {
|
||||
grecaptcha.execute();
|
||||
e.preventDefault();
|
||||
|
|
Loading…
Add table
Reference in a new issue