mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 07:52:29 +03:00
Corrected error if there is no provider or service to select.
This commit is contained in:
parent
c60a0feeaf
commit
de872cfc36
2 changed files with 12 additions and 0 deletions
|
@ -279,6 +279,12 @@ class Appointments extends CI_Controller {
|
|||
$this->load->model('settings_model');
|
||||
|
||||
try {
|
||||
// Do not continue if there was no provider selected.
|
||||
if (empty($_POST['provider_id'])) {
|
||||
echo json_encode(array());
|
||||
return;
|
||||
}
|
||||
|
||||
// If manage mode is TRUE then the following we should not consider the selected
|
||||
// appointment when calculating the available time periods of the provider.
|
||||
$exclude_appointments = ($_POST['manage_mode'] === 'true')
|
||||
|
|
|
@ -158,6 +158,12 @@ var FrontendBook = {
|
|||
* be perfomed, depending the current wizard step.
|
||||
*/
|
||||
$('.button-next').click(function() {
|
||||
// If we are on the first step and there is not provider selected do not continue
|
||||
// with the next step.
|
||||
if ($(this).attr('data-step_index') === '1' && $('#select-provider').val() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we are on the 2nd tab then the user should have an appointment hour
|
||||
// selected.
|
||||
if ($(this).attr('data-step_index') === '2') {
|
||||
|
|
Loading…
Reference in a new issue