mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-25 16:13:17 +03:00
Applied Captcha fixes in the booking page
This commit is contained in:
parent
67c85c83e0
commit
9133aeedd6
3 changed files with 7 additions and 6 deletions
|
@ -366,7 +366,7 @@
|
|||
<small class="fas fa-sync-alt"></small>
|
||||
</h4>
|
||||
<img class="captcha-image" src="<?= site_url('captcha') ?>">
|
||||
<input class="captcha-text" type="text" value=""/>
|
||||
<input class="captcha-text form-control" type="text" value=""/>
|
||||
<span id="captcha-hint" class="help-block" style="opacity:0"> </span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -424,7 +424,7 @@ window.FrontendBook = window.FrontendBook || {};
|
|||
*
|
||||
* @param {jQuery.Event} event
|
||||
*/
|
||||
$('#book-appointment-submit').on('click', function (event) {
|
||||
$('#book-appointment-submit').on('click', function () {
|
||||
FrontendBookApi.registerAppointment();
|
||||
});
|
||||
|
||||
|
@ -433,7 +433,7 @@ window.FrontendBook = window.FrontendBook || {};
|
|||
*
|
||||
* @param {jQuery.Event} event
|
||||
*/
|
||||
$('.captcha-title small').on('click', function (event) {
|
||||
$('.captcha-title svg').on('click', function (event) {
|
||||
$('.captcha-image').attr('src', GlobalVariables.baseUrl + '/index.php/captcha?' + Date.now());
|
||||
});
|
||||
|
||||
|
|
|
@ -146,7 +146,8 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
}
|
||||
}
|
||||
|
||||
var formData = jQuery.parseJSON($('input[name="post_data"]').val());
|
||||
var formData = JSON.parse($('input[name="post_data"]').val());
|
||||
|
||||
var data = {
|
||||
csrfToken: GlobalVariables.csrfToken,
|
||||
post_data: formData
|
||||
|
@ -193,7 +194,7 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
$('#captcha-hint').fadeTo(400, 0);
|
||||
}, 3000);
|
||||
|
||||
$('.captcha-title small').trigger('click');
|
||||
$('.captcha-title svg').trigger('click');
|
||||
|
||||
$captchaText.closest('.form-group').addClass('has-error');
|
||||
|
||||
|
@ -204,7 +205,7 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
+ '/index.php/appointments/book_success/' + response.appointment_hash;
|
||||
})
|
||||
.fail(function (jqxhr, textStatus, errorThrown) {
|
||||
$('.captcha-title small').trigger('click');
|
||||
$('.captcha-title svg').trigger('click');
|
||||
})
|
||||
.always(function () {
|
||||
$layer.remove();
|
||||
|
|
Loading…
Reference in a new issue