[ticket/17366] Remove javascript sanity check as this can break with recaptcha

PHPBB-17366
This commit is contained in:
Marc Alexander 2024-07-07 14:52:00 +02:00
parent 8639be4bd4
commit 55dbe070e3
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 1 additions and 25 deletions

View file

@ -337,30 +337,6 @@ $('[data-ajax]').each(function() {
}
});
// Prevent accidental double submission of form
$('[data-prevent-flood] input[type=submit]').click(function(event) {
const $submitButton = $(this); // Store the button element
const $form = $submitButton.closest('form');
// Always add the disabled class for visual feedback
$submitButton.addClass('disabled');
// Submit form if it hasn't been submitted yet
if (!$form.prop('data-form-submitted')) {
$form.prop('data-form-submitted', true);
return;
}
// Prevent default submission for subsequent clicks within 5 seconds
event.preventDefault();
setTimeout(() => {
$form.prop('removeProp', 'data-form-submitted');
$submitButton.removeClass('disabled'); // Re-enable after 5 seconds
}, 5000);
});
/**
* This simply appends #preview to the action of the
* QR action when you click the Full Editor & Preview button

View file

@ -100,7 +100,7 @@
<!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
<div class="panel bg2">
<div class="inner">
<fieldset class="submit-buttons" data-prevent-flood>
<fieldset class="submit-buttons">
{S_HIDDEN_ADDRESS_FIELD}
{S_HIDDEN_FIELDS}
<!-- EVENT posting_editor_submit_buttons -->