From 457b3212f95b47697507a662aaded61fa522cd97 Mon Sep 17 00:00:00 2001 From: "alextselegidis@gmail.com" Date: Thu, 7 Nov 2013 11:25:59 +0000 Subject: [PATCH] Minor changes and fixes: * Fixed provider disabling sync privileges problem. * Fixed backend/services categories tab footer position. * Corrected success message in frontent. * Fixed provider appointment link on emails (on manage mode). * Downcreased email header (in order to display bigger company names). --- src/application/controllers/backend_api.php | 11 +++++----- src/application/views/appointments/book.php | 20 ++++++++++--------- .../views/appointments/book_success.php | 2 +- .../views/emails/appointment_details.php | 5 +++-- .../views/emails/delete_appointment.php | 5 +++-- src/application/views/emails/new_password.php | 5 +++-- src/assets/js/backend_calendar.js | 4 +++- src/assets/js/backend_services.js | 1 + 8 files changed, 31 insertions(+), 22 deletions(-) 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 @@