forked from mirrors/easyappointments
Corrected click event behavior of the captcha refresh button
This commit is contained in:
parent
122f2aef85
commit
f77ceeff84
3 changed files with 6 additions and 4 deletions
|
@ -363,7 +363,9 @@
|
|||
<div class="col-12 col-md-6">
|
||||
<h4 class="captcha-title">
|
||||
CAPTCHA
|
||||
<small class="fas fa-sync-alt"></small>
|
||||
<button class="btn btn-link text-dark text-decoration-none py-0">
|
||||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
</h4>
|
||||
<img class="captcha-image" src="<?= site_url('captcha') ?>">
|
||||
<input class="captcha-text form-control" type="text" value=""/>
|
||||
|
|
|
@ -433,7 +433,7 @@ window.FrontendBook = window.FrontendBook || {};
|
|||
*
|
||||
* @param {jQuery.Event} event
|
||||
*/
|
||||
$('.captcha-title svg').on('click', function (event) {
|
||||
$('.captcha-title button').on('click', function (event) {
|
||||
$('.captcha-image').attr('src', GlobalVariables.baseUrl + '/index.php/captcha?' + Date.now());
|
||||
});
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
$('#captcha-hint').fadeTo(400, 0);
|
||||
}, 3000);
|
||||
|
||||
$('.captcha-title svg').trigger('click');
|
||||
$('.captcha-title button').trigger('click');
|
||||
|
||||
$captchaText.closest('.form-group').addClass('has-error');
|
||||
|
||||
|
@ -205,7 +205,7 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
+ '/index.php/appointments/book_success/' + response.appointment_hash;
|
||||
})
|
||||
.fail(function (jqxhr, textStatus, errorThrown) {
|
||||
$('.captcha-title svg').trigger('click');
|
||||
$('.captcha-title button').trigger('click');
|
||||
})
|
||||
.always(function () {
|
||||
$layer.remove();
|
||||
|
|
Loading…
Reference in a new issue