1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-15 05:14:28 +02:00

[ticket/15564] Don't use ES2015, it breaks UI tests

PHPBB3-15564
This commit is contained in:
Jakub Senko 2018-04-04 11:20:21 +02:00 committed by Marc Alexander
parent 27153d7e46
commit 772e801d4f

View File

@ -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();