mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-03 00:28:53 +00:00
[ticket/17366] Remove javascript sanity check as this can break with recaptcha
PHPBB-17366
This commit is contained in:
parent
8639be4bd4
commit
55dbe070e3
2 changed files with 1 additions and 25 deletions
|
@ -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
|
||||
|
|
|
@ -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 -->
|
||||
|
|
Loading…
Add table
Reference in a new issue