diff --git a/src/application/controllers/backend_api.php b/src/application/controllers/backend_api.php index 2b1f4552..44361d07 100644 --- a/src/application/controllers/backend_api.php +++ b/src/application/controllers/backend_api.php @@ -196,7 +196,7 @@ class Backend_api extends CI_Controller { $provider_title = 'Appointment details have changed.'; $provider_message = ''; - $provider_link = $this->config->item('base_url') . 'backend/' + $provider_link = $this->config->item('base_url') . 'backend/index/' . $appointment['hash']; } @@ -332,14 +332,15 @@ class Backend_api extends CI_Controller { */ public function ajax_disable_provider_sync() { try { - if ($this->privileges[PRIV_USERS]['edit'] == FALSE) { - throw new Exception('You do not have the required privileges for this task.'); - } - if (!isset($_POST['provider_id'])) { throw new Exception('Provider id not specified.'); } + if ($this->privileges[PRIV_USERS]['edit'] == FALSE + && $this->session->userdata('user_id') != $_POST['provider_id']) { + throw new Exception('You do not have the required privileges for this task.'); + } + $this->load->model('providers_model'); $this->providers_model->set_setting('google_sync', FALSE, $_POST['provider_id']); $this->providers_model->set_setting('google_token', NULL, $_POST['provider_id']); diff --git a/src/application/views/appointments/book.php b/src/application/views/appointments/book.php index 86a11639..a0d38ad6 100644 --- a/src/application/views/appointments/book.php +++ b/src/application/views/appointments/book.php @@ -200,16 +200,18 @@ } } - foreach($grouped_services as $group) { - $group_label = ($group[0]['category_name'] != NULL) - ? $group[0]['category_name'] : 'Uncategorized'; - - echo ''; - foreach($group as $service) { - echo ''; + foreach($grouped_services as $key => $group) { + $group_label = ($key != 'uncategorized') + ? $group[0]['category_name'] : 'Uncategorized'; + + if (count($group) > 0) { + echo ''; + foreach($group as $service) { + echo ''; + } + echo ''; } - echo ''; } } else { foreach($available_services as $service) { diff --git a/src/application/views/appointments/book_success.php b/src/application/views/appointments/book_success.php index e6df0eba..30d3492f 100644 --- a/src/application/views/appointments/book_success.php +++ b/src/application/views/appointments/book_success.php @@ -146,7 +146,7 @@ '
' + '

Success!

' + '

' + - 'Your appointment has successfully been added to ' + + 'Your appointment has been added to ' + 'your Google Calendar account.
' + '' + 'Click here to view your appointment on Google ' + diff --git a/src/application/views/emails/appointment_details.php b/src/application/views/emails/appointment_details.php index 7d160a98..82d80d2d 100644 --- a/src/application/views/emails/appointment_details.php +++ b/src/application/views/emails/appointment_details.php @@ -6,8 +6,9 @@

diff --git a/src/application/views/emails/delete_appointment.php b/src/application/views/emails/delete_appointment.php index c87bfcb2..5f63a625 100644 --- a/src/application/views/emails/delete_appointment.php +++ b/src/application/views/emails/delete_appointment.php @@ -6,8 +6,9 @@