mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
Fixed Issue #29
This commit is contained in:
parent
3059f03a3d
commit
b935dd954f
8 changed files with 19 additions and 22 deletions
|
@ -73,7 +73,7 @@
|
||||||
* Make an ajax call to the server and check whether the user's credentials are right.
|
* Make an ajax call to the server and check whether the user's credentials are right.
|
||||||
* If yes then redirect him to his desired page, otherwise display a message.
|
* If yes then redirect him to his desired page, otherwise display a message.
|
||||||
*/
|
*/
|
||||||
$('form').submit(function() {
|
$('form').submit(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var postUrl = GlobalVariables.baseUrl + 'user/ajax_forgot_password';
|
var postUrl = GlobalVariables.baseUrl + 'user/ajax_forgot_password';
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
* Make an ajax call to the server and check whether the user's credentials are right.
|
* Make an ajax call to the server and check whether the user's credentials are right.
|
||||||
* If yes then redirect him to his desired page, otherwise display a message.
|
* If yes then redirect him to his desired page, otherwise display a message.
|
||||||
*/
|
*/
|
||||||
$('#login-form').submit(function() {
|
$('#login-form').submit(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var postUrl = GlobalVariables.baseUrl + 'user/ajax_check_login';
|
var postUrl = GlobalVariables.baseUrl + 'user/ajax_check_login';
|
||||||
|
|
|
@ -60,12 +60,12 @@ CustomersHelper.prototype.bindEventHandlers = function() {
|
||||||
/**
|
/**
|
||||||
* Event: Filter Customers Form "Submit"
|
* Event: Filter Customers Form "Submit"
|
||||||
*/
|
*/
|
||||||
$('#filter-customers form').submit(function() {
|
$('#filter-customers form').submit(function(event) {
|
||||||
event.preventDefault();
|
|
||||||
var key = $('#filter-customers .key').val();
|
var key = $('#filter-customers .key').val();
|
||||||
$('#filter-customers .selected-row').removeClass('selected-row');
|
$('#filter-customers .selected-row').removeClass('selected-row');
|
||||||
BackendCustomers.helper.resetForm();
|
BackendCustomers.helper.resetForm();
|
||||||
BackendCustomers.helper.filter(key);
|
BackendCustomers.helper.filter(key);
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -116,12 +116,12 @@ ServicesHelper.prototype.bindEventHandlers = function() {
|
||||||
/**
|
/**
|
||||||
* Event: Filter Services Form "Submit"
|
* Event: Filter Services Form "Submit"
|
||||||
*/
|
*/
|
||||||
$('#filter-services form').submit(function() {
|
$('#filter-services form').submit(function(event) {
|
||||||
event.preventDefault();
|
|
||||||
var key = $('#filter-services .key').val();
|
var key = $('#filter-services .key').val();
|
||||||
$('#filter-services .selected-row').removeClass('selected-row');
|
$('#filter-services .selected-row').removeClass('selected-row');
|
||||||
BackendServices.helper.resetForm();
|
BackendServices.helper.resetForm();
|
||||||
BackendServices.helper.filter(key);
|
BackendServices.helper.filter(key);
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -343,7 +343,6 @@ ServicesHelper.prototype.resetForm = function() {
|
||||||
$('#filter-services .selected-row').removeClass('selected-row');
|
$('#filter-services .selected-row').removeClass('selected-row');
|
||||||
$('#filter-services button').prop('disabled', false);
|
$('#filter-services button').prop('disabled', false);
|
||||||
$('#filter-services .results').css('color', '');
|
$('#filter-services .results').css('color', '');
|
||||||
$('#filter-services .key').val('');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -478,12 +477,12 @@ CategoriesHelper.prototype.bindEventHandlers = function() {
|
||||||
/**
|
/**
|
||||||
* Event: Filter Categories Form "Submit"
|
* Event: Filter Categories Form "Submit"
|
||||||
*/
|
*/
|
||||||
$('#filter-categories form').submit(function() {
|
$('#filter-categories form').submit(function(event) {
|
||||||
event.preventDefault();
|
|
||||||
var key = $('#filter-categories .key').val();
|
var key = $('#filter-categories .key').val();
|
||||||
$('.selected-row').removeClass('selected-row');
|
$('.selected-row').removeClass('selected-row');
|
||||||
BackendServices.helper.resetForm();
|
BackendServices.helper.resetForm();
|
||||||
BackendServices.helper.filter(key);
|
BackendServices.helper.filter(key);
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -724,7 +723,6 @@ CategoriesHelper.prototype.resetForm = function() {
|
||||||
$('#filter-categories .selected-row').removeClass('selected-row');
|
$('#filter-categories .selected-row').removeClass('selected-row');
|
||||||
$('#filter-categories .results').css('color', '');
|
$('#filter-categories .results').css('color', '');
|
||||||
$('#filter-categories button').prop('disabled', false);
|
$('#filter-categories button').prop('disabled', false);
|
||||||
$('#filter-categories .key').val('');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,12 +18,12 @@ AdminsHelper.prototype.bindEventHandlers = function() {
|
||||||
*
|
*
|
||||||
* Filter the admin records with the given key string.
|
* Filter the admin records with the given key string.
|
||||||
*/
|
*/
|
||||||
$('#filter-admins form').submit(function() {
|
$('#filter-admins form').submit(function(event) {
|
||||||
event.preventDefault();
|
|
||||||
var key = $('#filter-admins .key').val();
|
var key = $('#filter-admins .key').val();
|
||||||
$('#filter-admins .selected-row').removeClass('selected-row');
|
$('#filter-admins .selected-row').removeClass('selected-row');
|
||||||
BackendUsers.helper.resetForm();
|
BackendUsers.helper.resetForm();
|
||||||
BackendUsers.helper.filter(key);
|
BackendUsers.helper.filter(key);
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,12 +18,12 @@ ProvidersHelper.prototype.bindEventHandlers = function() {
|
||||||
*
|
*
|
||||||
* Filter the provider records with the given key string.
|
* Filter the provider records with the given key string.
|
||||||
*/
|
*/
|
||||||
$('#filter-providers form').submit(function() {
|
$('#filter-providers form').submit(function(event) {
|
||||||
event.preventDefault();
|
|
||||||
var key = $('#filter-providers .key').val();
|
var key = $('#filter-providers .key').val();
|
||||||
$('.selected-row').removeClass('selected-row');
|
$('.selected-row').removeClass('selected-row');
|
||||||
BackendUsers.helper.resetForm();
|
BackendUsers.helper.resetForm();
|
||||||
BackendUsers.helper.filter(key);
|
BackendUsers.helper.filter(key);
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,12 +18,12 @@ SecretariesHelper.prototype.bindEventHandlers = function() {
|
||||||
*
|
*
|
||||||
* Filter the secretary records with the given key string.
|
* Filter the secretary records with the given key string.
|
||||||
*/
|
*/
|
||||||
$('#filter-secretaries form').submit(function() {
|
$('#filter-secretaries form').submit(function(event) {
|
||||||
event.preventDefault();
|
|
||||||
var key = $('#filter-secretaries .key').val();
|
var key = $('#filter-secretaries .key').val();
|
||||||
$('#filter-secretaries .selected-row').removeClass('selected-row');
|
$('#filter-secretaries .selected-row').removeClass('selected-row');
|
||||||
BackendUsers.helper.resetForm();
|
BackendUsers.helper.resetForm();
|
||||||
BackendUsers.helper.filter(key);
|
BackendUsers.helper.filter(key);
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -212,9 +212,7 @@ var FrontendBook = {
|
||||||
* once the appointment is cancelled, it will be delete from the
|
* once the appointment is cancelled, it will be delete from the
|
||||||
* database.
|
* database.
|
||||||
*/
|
*/
|
||||||
$('#cancel-appointment').click(function() {
|
$('#cancel-appointment').click(function(event) {
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
var dialogButtons = {};
|
var dialogButtons = {};
|
||||||
dialogButtons['OK'] = function() {
|
dialogButtons['OK'] = function() {
|
||||||
if ($('#cancel-reason').val() === '') {
|
if ($('#cancel-reason').val() === '') {
|
||||||
|
@ -234,6 +232,7 @@ var FrontendBook = {
|
||||||
|
|
||||||
$('#message_box').append('<textarea id="cancel-reason" rows="3"></textarea>');
|
$('#message_box').append('<textarea id="cancel-reason" rows="3"></textarea>');
|
||||||
$('#cancel-reason').css('width', '353px');
|
$('#cancel-reason').css('width', '353px');
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,9 +243,7 @@ var FrontendBook = {
|
||||||
* in the meantime the selected appointment date/time wasn't reserved by
|
* in the meantime the selected appointment date/time wasn't reserved by
|
||||||
* another customer or event.
|
* another customer or event.
|
||||||
*/
|
*/
|
||||||
$('#book-appointment-form').submit(function() {
|
$('#book-appointment-form').submit(function(event) {
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
var formData = jQuery.parseJSON($('input[name="post_data"]').val());
|
var formData = jQuery.parseJSON($('input[name="post_data"]').val());
|
||||||
|
|
||||||
var postData = {
|
var postData = {
|
||||||
|
@ -284,6 +281,8 @@ var FrontendBook = {
|
||||||
FrontendBook.getAvailableHours($('#select-date').val());
|
FrontendBook.getAvailableHours($('#select-date').val());
|
||||||
}
|
}
|
||||||
}, 'json');
|
}, 'json');
|
||||||
|
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue