diff --git a/application/controllers/Booking.php b/application/controllers/Booking.php index 860c5aa0..4ec1b4c5 100755 --- a/application/controllers/Booking.php +++ b/application/controllers/Booking.php @@ -447,10 +447,13 @@ class Booking extends EA_Controller $appointment_id = $this->appointments_model->save($appointment); $appointment = $this->appointments_model->find($appointment_id); + $company_color = setting('company_color'); + $settings = [ 'company_name' => setting('company_name'), 'company_link' => setting('company_link'), 'company_email' => setting('company_email'), + 'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null, 'date_format' => setting('date_format'), 'time_format' => setting('time_format'), ]; diff --git a/application/controllers/Booking_cancellation.php b/application/controllers/Booking_cancellation.php index 8bd646dc..ec2ca4a7 100755 --- a/application/controllers/Booking_cancellation.php +++ b/application/controllers/Booking_cancellation.php @@ -88,10 +88,13 @@ class Booking_cancellation extends EA_Controller $service = $this->services_model->find($appointment['id_services']); + $company_color = setting('company_color'); + $settings = [ 'company_name' => setting('company_name'), 'company_email' => setting('company_email'), 'company_link' => setting('company_link'), + 'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null, 'date_format' => setting('date_format'), 'time_format' => setting('time_format'), ]; diff --git a/application/controllers/Calendar.php b/application/controllers/Calendar.php index 250957bc..4c96a17d 100644 --- a/application/controllers/Calendar.php +++ b/application/controllers/Calendar.php @@ -278,10 +278,13 @@ class Calendar extends EA_Controller $customer = $this->customers_model->find($appointment['id_users_customer']); $service = $this->services_model->find($appointment['id_services']); + $company_color = setting('company_color'); + $settings = [ 'company_name' => setting('company_name'), 'company_link' => setting('company_link'), 'company_email' => setting('company_email'), + 'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null, 'date_format' => setting('date_format'), 'time_format' => setting('time_format'), ]; @@ -354,10 +357,13 @@ class Calendar extends EA_Controller $customer = $this->customers_model->find($appointment['id_users_customer']); $service = $this->services_model->find($appointment['id_services']); + $company_color = setting('company_color'); + $settings = [ 'company_name' => setting('company_name'), 'company_email' => setting('company_email'), 'company_link' => setting('company_link'), + 'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null, 'date_format' => setting('date_format'), 'time_format' => setting('time_format'), ]; diff --git a/application/controllers/Google.php b/application/controllers/Google.php index 32f609af..a59504c2 100644 --- a/application/controllers/Google.php +++ b/application/controllers/Google.php @@ -102,10 +102,13 @@ class Google extends EA_Controller $local_events = [...$appointments, ...$unavailabilities]; + $company_color = setting('company_color'); + $settings = [ 'company_name' => setting('company_name'), 'company_link' => setting('company_link'), 'company_email' => setting('company_email'), + 'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null, ]; $provider_timezone = new DateTimeZone($provider['timezone']); diff --git a/application/controllers/Recovery.php b/application/controllers/Recovery.php index dc257315..1c9e7e48 100644 --- a/application/controllers/Recovery.php +++ b/application/controllers/Recovery.php @@ -67,11 +67,14 @@ class Recovery extends EA_Controller $new_password = $this->accounts->regenerate_password($username, $email); + $company_color = setting('company_color'); + if ($new_password) { $settings = [ 'company_name' => setting('company_name'), 'company_link' => setting('company_link'), 'company_email' => setting('company_email'), + 'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null, ]; $this->email_messages->send_password($new_password, $email, $settings); diff --git a/application/controllers/api/v1/Appointments_api_v1.php b/application/controllers/api/v1/Appointments_api_v1.php index d3914e8d..0bad9124 100644 --- a/application/controllers/api/v1/Appointments_api_v1.php +++ b/application/controllers/api/v1/Appointments_api_v1.php @@ -272,10 +272,13 @@ class Appointments_api_v1 extends EA_Controller $customer = $this->customers_model->find($appointment['id_users_customer'], true); + $company_color = setting('company_color'); + $settings = [ 'company_name' => setting('company_name'), 'company_email' => setting('company_email'), 'company_link' => setting('company_link'), + 'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null, 'date_format' => setting('date_format'), 'time_format' => setting('time_format'), ]; @@ -352,10 +355,13 @@ class Appointments_api_v1 extends EA_Controller $customer = $this->customers_model->find($deleted_appointment['id_users_customer'], true); + $company_color = setting('company_color'); + $settings = [ 'company_name' => setting('company_name'), 'company_email' => setting('company_email'), 'company_link' => setting('company_link'), + 'company_color' => !empty($company_color) && $company_color != DEFAULT_COMPANY_COLOR ? $company_color : null, 'date_format' => setting('date_format'), 'time_format' => setting('time_format'), ]; diff --git a/application/views/emails/account_recovery_email.php b/application/views/emails/account_recovery_email.php index 19fa48c2..50ffa3fa 100644 --- a/application/views/emails/account_recovery_email.php +++ b/application/views/emails/account_recovery_email.php @@ -14,7 +14,7 @@