From 9b9888df47e8cf5f45e9dd1f2a4031e76139b503 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Thu, 26 May 2022 15:55:20 +0200 Subject: [PATCH] Add new limit_customer_visibility setting (#1199) --- .../language/arabic/translations_lang.php | 2 + .../language/bulgarian/translations_lang.php | 2 + .../language/catalan/translations_lang.php | 2 + .../language/chinese/translations_lang.php | 2 + .../language/czech/translations_lang.php | 2 + .../language/danish/translations_lang.php | 2 + .../language/dutch/translations_lang.php | 2 + .../language/english/translations_lang.php | 2 + .../language/estonian/translations_lang.php | 2 + .../language/finnish/translations_lang.php | 2 + .../language/french/translations_lang.php | 2 + .../language/greek/translations_lang.php | 2 + .../language/hebrew/translations_lang.php | 2 + .../language/hindi/translations_lang.php | 2 + .../language/hungarian/translations_lang.php | 2 + .../language/italian/translations_lang.php | 2 + .../language/japanese/translations_lang.php | 2 + .../luxembourgish/translations_lang.php | 2 + .../language/marathi/translations_lang.php | 2 + .../language/polish/translations_lang.php | 2 + .../portuguese-br/translations_lang.php | 2 + .../language/portuguese/translations_lang.php | 2 + .../language/romanian/translations_lang.php | 2 + .../language/russian/translations_lang.php | 2 + .../language/serbian/translations_lang.php | 2 + .../language/slovak/translations_lang.php | 2 + .../language/spanish/translations_lang.php | 2 + .../language/swedish/translations_lang.php | 2 + .../language/turkish/translations_lang.php | 2 + ..._add_limit_customer_visibility_setting.php | 41 +++++++++++++++++++ application/views/pages/booking_settings.php | 16 ++++++++ 31 files changed, 115 insertions(+) create mode 100644 application/migrations/039_add_limit_customer_visibility_setting.php diff --git a/application/language/arabic/translations_lang.php b/application/language/arabic/translations_lang.php index d791c44e..f82fbae6 100755 --- a/application/language/arabic/translations_lang.php +++ b/application/language/arabic/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/bulgarian/translations_lang.php b/application/language/bulgarian/translations_lang.php index a20ecaa5..d29d118b 100755 --- a/application/language/bulgarian/translations_lang.php +++ b/application/language/bulgarian/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/catalan/translations_lang.php b/application/language/catalan/translations_lang.php index 6b5bc7d6..cc123d77 100644 --- a/application/language/catalan/translations_lang.php +++ b/application/language/catalan/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Enllaç de reserva'; $lang['add_new_event'] = 'Afegeix un nou esdeveniment'; $lang['what_kind_of_event'] = 'Quin tipus d\'esdeveniment voleu afegir?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/chinese/translations_lang.php b/application/language/chinese/translations_lang.php index bc449dc1..5be7ea65 100755 --- a/application/language/chinese/translations_lang.php +++ b/application/language/chinese/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/czech/translations_lang.php b/application/language/czech/translations_lang.php index 841fc3ea..cf66a0af 100644 --- a/application/language/czech/translations_lang.php +++ b/application/language/czech/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/danish/translations_lang.php b/application/language/danish/translations_lang.php index cae8f065..c936f997 100755 --- a/application/language/danish/translations_lang.php +++ b/application/language/danish/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/dutch/translations_lang.php b/application/language/dutch/translations_lang.php index 73db8bfb..5055b1b7 100755 --- a/application/language/dutch/translations_lang.php +++ b/application/language/dutch/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/english/translations_lang.php b/application/language/english/translations_lang.php index 26ea0e94..80035733 100755 --- a/application/language/english/translations_lang.php +++ b/application/language/english/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/estonian/translations_lang.php b/application/language/estonian/translations_lang.php index 366ebd2a..0394343b 100644 --- a/application/language/estonian/translations_lang.php +++ b/application/language/estonian/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Broneeringu link'; $lang['add_new_event'] = 'Lisa uus sündmus'; $lang['what_kind_of_event'] = 'Mis laadi sündmust soovid lisada?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/finnish/translations_lang.php b/application/language/finnish/translations_lang.php index cd3c117b..d1f8b173 100755 --- a/application/language/finnish/translations_lang.php +++ b/application/language/finnish/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/french/translations_lang.php b/application/language/french/translations_lang.php index 741944fc..8a38717a 100755 --- a/application/language/french/translations_lang.php +++ b/application/language/french/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/greek/translations_lang.php b/application/language/greek/translations_lang.php index 6d13b298..5e87fa47 100755 --- a/application/language/greek/translations_lang.php +++ b/application/language/greek/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/hebrew/translations_lang.php b/application/language/hebrew/translations_lang.php index ef9829c7..3041ff64 100644 --- a/application/language/hebrew/translations_lang.php +++ b/application/language/hebrew/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/hindi/translations_lang.php b/application/language/hindi/translations_lang.php index bc47a2df..775f9cc1 100755 --- a/application/language/hindi/translations_lang.php +++ b/application/language/hindi/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/hungarian/translations_lang.php b/application/language/hungarian/translations_lang.php index 91c22c93..11cee8b8 100755 --- a/application/language/hungarian/translations_lang.php +++ b/application/language/hungarian/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/italian/translations_lang.php b/application/language/italian/translations_lang.php index 6dac227c..4760134f 100755 --- a/application/language/italian/translations_lang.php +++ b/application/language/italian/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/japanese/translations_lang.php b/application/language/japanese/translations_lang.php index 557491b5..7cb133e8 100755 --- a/application/language/japanese/translations_lang.php +++ b/application/language/japanese/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/luxembourgish/translations_lang.php b/application/language/luxembourgish/translations_lang.php index 6a6d8949..9768fbd6 100755 --- a/application/language/luxembourgish/translations_lang.php +++ b/application/language/luxembourgish/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/marathi/translations_lang.php b/application/language/marathi/translations_lang.php index 2bb6b213..acf89062 100644 --- a/application/language/marathi/translations_lang.php +++ b/application/language/marathi/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/polish/translations_lang.php b/application/language/polish/translations_lang.php index 20e509d5..3227daf2 100755 --- a/application/language/polish/translations_lang.php +++ b/application/language/polish/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/portuguese-br/translations_lang.php b/application/language/portuguese-br/translations_lang.php index f23abc36..4f9a3768 100755 --- a/application/language/portuguese-br/translations_lang.php +++ b/application/language/portuguese-br/translations_lang.php @@ -364,4 +364,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/portuguese/translations_lang.php b/application/language/portuguese/translations_lang.php index 9dd74eb3..975576c0 100755 --- a/application/language/portuguese/translations_lang.php +++ b/application/language/portuguese/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/romanian/translations_lang.php b/application/language/romanian/translations_lang.php index 957725f5..0b78d1a7 100755 --- a/application/language/romanian/translations_lang.php +++ b/application/language/romanian/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/russian/translations_lang.php b/application/language/russian/translations_lang.php index 756058d7..52274fed 100755 --- a/application/language/russian/translations_lang.php +++ b/application/language/russian/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/serbian/translations_lang.php b/application/language/serbian/translations_lang.php index 85bc50bc..5d72b8d1 100644 --- a/application/language/serbian/translations_lang.php +++ b/application/language/serbian/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/slovak/translations_lang.php b/application/language/slovak/translations_lang.php index fa1d1030..111d2a18 100755 --- a/application/language/slovak/translations_lang.php +++ b/application/language/slovak/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/spanish/translations_lang.php b/application/language/spanish/translations_lang.php index c1935796..c7810337 100755 --- a/application/language/spanish/translations_lang.php +++ b/application/language/spanish/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/swedish/translations_lang.php b/application/language/swedish/translations_lang.php index c50a0d91..097cfa7e 100644 --- a/application/language/swedish/translations_lang.php +++ b/application/language/swedish/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/language/turkish/translations_lang.php b/application/language/turkish/translations_lang.php index 4aaa54be..8117783f 100755 --- a/application/language/turkish/translations_lang.php +++ b/application/language/turkish/translations_lang.php @@ -365,4 +365,6 @@ $lang['booking_link'] = 'Booking Link'; $lang['add_new_event'] = 'Add New Event'; $lang['what_kind_of_event'] = 'What kind of event would you like to add?'; $lang['theme'] = 'Theme'; +$lang['limit_customer_visibility'] = 'Limit Customer Visibility'; +$lang['limit_customer_visibility_hint'] = 'If enabled, providers and secretaries will only be able to view and manage customers they have an appointment with.'; // End diff --git a/application/migrations/039_add_limit_customer_visibility_setting.php b/application/migrations/039_add_limit_customer_visibility_setting.php new file mode 100644 index 00000000..27594218 --- /dev/null +++ b/application/migrations/039_add_limit_customer_visibility_setting.php @@ -0,0 +1,41 @@ + + * @copyright Copyright (c) Alex Tselegidis + * @license https://opensource.org/licenses/GPL-3.0 - GPLv3 + * @link https://easyappointments.org + * @since v1.4.0 + * ---------------------------------------------------------------------------- */ + +class Migration_Add_limit_customer_visibility_setting extends EA_Migration { + /** + * Upgrade method. + */ + public function up() + { + if ( ! $this->db->get_where('settings', ['name' => 'limit_customer_visibility'])->num_rows()) + { + $this->db->insert('settings', [ + 'create_datetime' => date('Y-m-d H:i:s'), + 'update_datetime' => date('Y-m-d H:i:s'), + 'name' => 'limit_customer_visibility', + 'value' => '0' + ]); + } + } + + /** + * Downgrade method. + */ + public function down() + { + if ($this->db->get_where('settings', ['name' => 'limit_customer_visibility'])->num_rows()) + { + $this->db->delete('settings', ['name' => 'limit_customer_visibility']); + } + } +} diff --git a/application/views/pages/booking_settings.php b/application/views/pages/booking_settings.php index 874dee90..d0b23c77 100755 --- a/application/views/pages/booking_settings.php +++ b/application/views/pages/booking_settings.php @@ -239,6 +239,22 @@ +
+
+ + +
+ +
+ + + +
+
+