Skip to content

Commit

Permalink
Merge branch '3.3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
marc1706 committed Jul 28, 2024
2 parents d7d238c + 935c1a3 commit 6747c4e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
1 change: 1 addition & 0 deletions phpBB/phpbb/captcha/plugins/recaptcha_v3.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ protected function recaptcha_verify_token()
if ($result->isSuccess())
{
$this->solved = true;
$this->confirm_code = $this->code;

return false;
}
Expand Down
24 changes: 0 additions & 24 deletions phpBB/styles/prosilver/template/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion phpBB/styles/prosilver/template/posting_editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,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 -->
Expand Down

0 comments on commit 6747c4e

Please sign in to comment.