diff --git a/src/application/config/constants.php b/src/application/config/constants.php index 4891d332..1d57d408 100644 --- a/src/application/config/constants.php +++ b/src/application/config/constants.php @@ -75,6 +75,9 @@ define('DATE_FORMAT_DMY', 'DMY'); define('DATE_FORMAT_MDY', 'MDY'); define('DATE_FORMAT_YMD', 'YMD'); +define('TIME_FORMAT_REGULAR', 'regular'); +define('TIME_FORMAT_MILITARY', 'military'); + define('MIN_PASSWORD_LENGTH', 7); define('ANY_PROVIDER', 'any-provider'); diff --git a/src/application/config/migration.php b/src/application/config/migration.php index 9504a9cc..1546ae4d 100644 --- a/src/application/config/migration.php +++ b/src/application/config/migration.php @@ -37,7 +37,7 @@ $config['migration_table'] = 'ea_migrations'; | be upgraded / downgraded to. | */ -$config['migration_version'] = 9; // current +$config['migration_version'] = 10; // current /* diff --git a/src/application/controllers/Appointments.php b/src/application/controllers/Appointments.php index 8b3916d1..c6d5976e 100755 --- a/src/application/controllers/Appointments.php +++ b/src/application/controllers/Appointments.php @@ -75,6 +75,7 @@ class Appointments extends CI_Controller { $available_providers = $this->providers_model->get_available_providers(); $company_name = $this->settings_model->get_setting('company_name'); $date_format = $this->settings_model->get_setting('date_format'); + $time_format = $this->settings_model->get_setting('time_format'); // Remove the data that are not needed inside the $available_providers array. foreach ($available_providers as $index => $provider) @@ -132,6 +133,7 @@ class Appointments extends CI_Controller { 'company_name' => $company_name, 'manage_mode' => $manage_mode, 'date_format' => $date_format, + 'time_format' => $time_format, 'appointment_data' => $appointment, 'provider_data' => $provider, 'customer_data' => $customer @@ -180,7 +182,8 @@ class Appointments extends CI_Controller { 'company_name' => $this->settings_model->get_setting('company_name'), 'company_email' => $this->settings_model->get_setting('company_email'), 'company_link' => $this->settings_model->get_setting('company_link'), - 'date_format' => $this->settings_model->get_setting('date_format') + 'date_format' => $this->settings_model->get_setting('date_format'), + 'time_format' => $this->settings_model->get_setting('time_format') ]; // :: DELETE APPOINTMENT RECORD FROM THE DATABASE. @@ -470,7 +473,8 @@ class Appointments extends CI_Controller { 'company_name' => $this->settings_model->get_setting('company_name'), 'company_link' => $this->settings_model->get_setting('company_link'), 'company_email' => $this->settings_model->get_setting('company_email'), - 'date_format' => $this->settings_model->get_setting('date_format') + 'date_format' => $this->settings_model->get_setting('date_format'), + 'time_format' => $this->settings_model->get_setting('time_format') ]; // :: SYNCHRONIZE APPOINTMENT WITH PROVIDER'S GOOGLE CALENDAR diff --git a/src/application/controllers/Backend.php b/src/application/controllers/Backend.php old mode 100644 new mode 100755 index bcd177c9..2db56b7d --- a/src/application/controllers/Backend.php +++ b/src/application/controllers/Backend.php @@ -69,6 +69,7 @@ class Backend extends CI_Controller { $view['active_menu'] = PRIV_APPOINTMENTS; $view['book_advance_timeout'] = $this->settings_model->get_setting('book_advance_timeout'); $view['date_format'] = $this->settings_model->get_setting('date_format'); + $view['time_format'] = $this->settings_model->get_setting('time_format'); $view['company_name'] = $this->settings_model->get_setting('company_name'); $view['available_providers'] = $this->providers_model->get_available_providers(); $view['available_services'] = $this->services_model->get_available_services(); @@ -130,6 +131,7 @@ class Backend extends CI_Controller { $view['active_menu'] = PRIV_CUSTOMERS; $view['company_name'] = $this->settings_model->get_setting('company_name'); $view['date_format'] = $this->settings_model->get_setting('date_format'); + $view['time_format'] = $this->settings_model->get_setting('time_format'); $view['customers'] = $this->customers_model->get_batch(); $view['available_providers'] = $this->providers_model->get_available_providers(); $view['available_services'] = $this->services_model->get_available_services(); @@ -167,6 +169,7 @@ class Backend extends CI_Controller { $view['active_menu'] = PRIV_SERVICES; $view['company_name'] = $this->settings_model->get_setting('company_name'); $view['date_format'] = $this->settings_model->get_setting('date_format'); + $view['time_format'] = $this->settings_model->get_setting('time_format'); $view['services'] = $this->services_model->get_batch(); $view['categories'] = $this->services_model->get_all_categories(); $this->set_user_data($view); @@ -203,6 +206,7 @@ class Backend extends CI_Controller { $view['active_menu'] = PRIV_USERS; $view['company_name'] = $this->settings_model->get_setting('company_name'); $view['date_format'] = $this->settings_model->get_setting('date_format'); + $view['time_format'] = $this->settings_model->get_setting('time_format'); $view['admins'] = $this->admins_model->get_batch(); $view['providers'] = $this->providers_model->get_batch(); $view['secretaries'] = $this->secretaries_model->get_batch(); @@ -242,6 +246,7 @@ class Backend extends CI_Controller { $view['active_menu'] = PRIV_SYSTEM_SETTINGS; $view['company_name'] = $this->settings_model->get_setting('company_name'); $view['date_format'] = $this->settings_model->get_setting('date_format'); + $view['time_format'] = $this->settings_model->get_setting('time_format'); $view['role_slug'] = $this->session->userdata('role_slug'); $view['system_settings'] = $this->settings_model->get_settings(); $view['user_settings'] = $this->user_model->get_settings($user_id); diff --git a/src/application/controllers/Backend_api.php b/src/application/controllers/Backend_api.php old mode 100644 new mode 100755 index 2f5ae866..d7588eae --- a/src/application/controllers/Backend_api.php +++ b/src/application/controllers/Backend_api.php @@ -311,7 +311,8 @@ class Backend_api extends CI_Controller { 'company_name' => $this->settings_model->get_setting('company_name'), 'company_link' => $this->settings_model->get_setting('company_link'), 'company_email' => $this->settings_model->get_setting('company_email'), - 'date_format' => $this->settings_model->get_setting('date_format') + 'date_format' => $this->settings_model->get_setting('date_format'), + 'time_format' => $this->settings_model->get_setting('time_format') ]; // :: SYNC APPOINTMENT CHANGES WITH GOOGLE CALENDAR @@ -461,7 +462,8 @@ class Backend_api extends CI_Controller { 'company_name' => $this->settings_model->get_setting('company_name'), 'company_email' => $this->settings_model->get_setting('company_email'), 'company_link' => $this->settings_model->get_setting('company_link'), - 'date_format' => $this->settings_model->get_setting('date_format') + 'date_format' => $this->settings_model->get_setting('date_format'), + 'time_format' => $this->settings_model->get_setting('time_format') ]; // :: DELETE APPOINTMENT RECORD FROM DATABASE diff --git a/src/application/language/arabic/translations_lang.php b/src/application/language/arabic/translations_lang.php old mode 100644 new mode 100755 index cd28ace3..bfc7e818 --- a/src/application/language/arabic/translations_lang.php +++ b/src/application/language/arabic/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'اشعارات الزبون'; $lang['customer_notifications_hint'] = 'سيتم تلقي اشعارات للزبون عند تغيّر موعد الحجز أو عند تحديثه'; $lang['date_format'] = 'صيغة التاريخ'; $lang['date_format_hint'] = 'تغيير صيغة وعرض التاريخ (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'ليتم تضمينه في صفحة الحجز Google Analytics ID أضف معرّف'; $lang['availabilities_type'] = 'نوع التوفر أو الإتاحة'; $lang['flexible'] = 'مرن'; diff --git a/src/application/language/bulgarian/translations_lang.php b/src/application/language/bulgarian/translations_lang.php old mode 100644 new mode 100755 index 39b42f67..04adb985 --- a/src/application/language/bulgarian/translations_lang.php +++ b/src/application/language/bulgarian/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications_hint'] = 'Дефинира дали клиентъ $lang['customer_notifications'] = 'Клиентски Известия'; $lang['date_format'] = 'Формат на Дата'; $lang['date_format_hint'] = 'Промяна на дормат за показ на дата (D - дата, M - месец, Y - година).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Добавете Google Analytics ID за да бъде включена статистика в страницата за запазване на час.'; $lang['availabilities_type'] = 'Типове на работен период.'; $lang['flexible'] = 'Гъвкав'; diff --git a/src/application/language/chinese/translations_lang.php b/src/application/language/chinese/translations_lang.php old mode 100644 new mode 100755 index e33ec564..71135caf --- a/src/application/language/chinese/translations_lang.php +++ b/src/application/language/chinese/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/danish/translations_lang.php b/src/application/language/danish/translations_lang.php old mode 100644 new mode 100755 index a206a988..f460aaca --- a/src/application/language/danish/translations_lang.php +++ b/src/application/language/danish/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/dutch/translations_lang.php b/src/application/language/dutch/translations_lang.php old mode 100644 new mode 100755 index 1c9787cb..9f9c177e --- a/src/application/language/dutch/translations_lang.php +++ b/src/application/language/dutch/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Klant mededelingen'; $lang['customer_notifications_hint'] = 'Kies of de klant een bevestiging krijgt per email als er de afspraak wordt aangepast.'; $lang['date_format'] = 'Datum formaat'; $lang['date_format_hint'] = 'Verander het datum formaat (D - dag, M - maand, Y - jaar).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Voeg je Google Analytics ID toe om deze te gebruiken op je boekings pagina.'; $lang['availabilities_type'] = 'Beschikbaarheidstype'; $lang['flexible'] = 'Flexibel'; diff --git a/src/application/language/english/translations_lang.php b/src/application/language/english/translations_lang.php old mode 100644 new mode 100755 index 18ead603..066223ca --- a/src/application/language/english/translations_lang.php +++ b/src/application/language/english/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/finnish/translations_lang.php b/src/application/language/finnish/translations_lang.php old mode 100644 new mode 100755 index 471455c7..7ec7e8e3 --- a/src/application/language/finnish/translations_lang.php +++ b/src/application/language/finnish/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Asiakas ilmoitukset'; $lang['customer_notifications_hint'] = 'Jos aktivoitu, asiakkaalle lähetetään ilmoitus jos varattuun aikaan tulee muutoksia.'; $lang['date_format'] = 'Päiväyksen muoto'; $lang['date_format_hint'] = 'Vaihda päiväyksen esitysmuoto (D - Päivä, M - Kuukausi, Y - Vuosi).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Lisää Google Analytics ID varaussivulle.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/french/translations_lang.php b/src/application/language/french/translations_lang.php old mode 100644 new mode 100755 index 8159c450..0be876db --- a/src/application/language/french/translations_lang.php +++ b/src/application/language/french/translations_lang.php @@ -272,6 +272,8 @@ $lang['customer_notifications'] = 'Notifications aux clients'; $lang['customer_notifications_hint'] = 'Définit si les clients reçoivent des notifications par email chaque fois qu\'il y a un changement d\'horaire de l\'un de leurs rendez-vous.'; $lang['date_format'] = 'Format des Dates'; $lang['date_format_hint'] = 'Change le format d\'affichage des dates (D - Jour, M - Mois, Y - Année).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Renseignez l\'ID Google Analytics à utiliser dans la page des réservations.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/german/translations_lang.php b/src/application/language/german/translations_lang.php old mode 100644 new mode 100755 index 532cd87f..365022bb --- a/src/application/language/german/translations_lang.php +++ b/src/application/language/german/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Kunden Benachrichtigungen'; $lang['customer_notifications_hint'] = 'Stellen Sie ein, ob die Kunden eine E-Mail-Benachrichtigungen erhalten, jedes mal es gibt ein neue änderung auf ein Termin.'; $lang['date_format'] = 'Datumsformat'; $lang['date_format_hint'] = 'Ändern Sie das Datumsanzeigeformat (D - Datum, M - Monat, Y - Jahr).'; +$lang['time_format'] = 'Zeitformat'; +$lang['time_format_hint'] = 'Ändern Sie das Zeitanzeigeformat (H - Stunden, M - Minuten).'; $lang['google_analytics_code_hint'] = 'Fügen Sie Ihre Google Analytics-ID hinzu, das auf der Buchungsseite enthalten wird.'; $lang['availabilities_type'] = 'Verfügungstyp'; $lang['flexible'] = 'Flexibel'; diff --git a/src/application/language/greek/translations_lang.php b/src/application/language/greek/translations_lang.php old mode 100644 new mode 100755 index 45257069..741a6ad4 --- a/src/application/language/greek/translations_lang.php +++ b/src/application/language/greek/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Ειδοποιήσεις Πελατών'; $lang['customer_notifications_hint'] = 'Ορίζει αν οι πελάτες θα λαμβάνουν ειδοποιήσεις μέσω email κάθε φορά που θα υπαχει μια αλλαγή σε κάποιο από τα ραντεβού τους.'; $lang['date_format'] = 'Μορφή Ημερομηνίας'; $lang['date_format_hint'] = 'Αλλάξτε την μορφή ημερομηνίας (D - Ημέρα, M - Μήνας, Y - Χρόνος).'; +$lang['time_format'] = 'Μορφή Ώρας'; +$lang['time_format_hint'] = 'Αλλάξτε την μορφή ώρας (H - Ώρα, M - Λεπτά).'; $lang['google_analytics_code_hint'] = 'Προσθέστε τον Google Analytics ID σας το οποίο θα συμπεριληφθεί στην σελίδα κράτησης.'; $lang['availabilities_type'] = 'Τύπος Διαθεσιμοτήτων'; $lang['flexible'] = 'Ευέλικτος'; diff --git a/src/application/language/hindi/translations_lang.php b/src/application/language/hindi/translations_lang.php old mode 100644 new mode 100755 index 6e83b42c..a69e2b4e --- a/src/application/language/hindi/translations_lang.php +++ b/src/application/language/hindi/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/hungarian/translations_lang.php b/src/application/language/hungarian/translations_lang.php old mode 100644 new mode 100755 index 3001c55a..fb55ae82 --- a/src/application/language/hungarian/translations_lang.php +++ b/src/application/language/hungarian/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/italian/translations_lang.php b/src/application/language/italian/translations_lang.php old mode 100644 new mode 100755 index b79449da..5203bd2f --- a/src/application/language/italian/translations_lang.php +++ b/src/application/language/italian/translations_lang.php @@ -280,6 +280,8 @@ $lang['customer_notifications'] = 'Notifiche cliente'; $lang['customer_notifications_hint'] = 'Definisce se il cliente riceverà notifiche email ogni volta che c\'è un cambiamento di programma su uno dei suoi appuntamenti.'; $lang['date_format'] = 'Formato data'; $lang['date_format_hint'] = 'Cambia il formato di visualizzazione della data (D - Giorno, M - Mese, Y - Anno).'; +$lang['time_format'] = 'Formato orario'; +$lang['time_format_hint'] = 'Cambia il formato di visualizzazione dell\'orario. (H - Ore, M - Minuti)'; $lang['google_analytics_code_hint'] = 'Aggiunti il tuo ID di Google Analytics per includerlo nella pagina di prenotazione.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/japanese/translations_lang.php b/src/application/language/japanese/translations_lang.php old mode 100644 new mode 100755 index 151c3db4..78b5e48a --- a/src/application/language/japanese/translations_lang.php +++ b/src/application/language/japanese/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/luxembourgish/translations_lang.php b/src/application/language/luxembourgish/translations_lang.php old mode 100644 new mode 100755 index 45ba24e0..ab116abe --- a/src/application/language/luxembourgish/translations_lang.php +++ b/src/application/language/luxembourgish/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/polish/translations_lang.php b/src/application/language/polish/translations_lang.php old mode 100644 new mode 100755 index 31b2d40a..bcdb5d62 --- a/src/application/language/polish/translations_lang.php +++ b/src/application/language/polish/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/portuguese-br/translations_lang.php b/src/application/language/portuguese-br/translations_lang.php old mode 100644 new mode 100755 index 7594aa6b..5d47d75a --- a/src/application/language/portuguese-br/translations_lang.php +++ b/src/application/language/portuguese-br/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Notificações de Clientes'; $lang['customer_notifications_hint'] = 'Define se o cliente receberá ou não, notificações por email sempre que um de seus agendamentos sejam alterados de horário.'; $lang['date_format'] = 'Formato da Data'; $lang['date_format_hint'] = 'Altera o formato de visualização da Data (D - Data, M - Mes, Y - Ano).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Adicione o seu ID do Google Analytics para ser incluido na pagina de agendamentos.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/portuguese/translations_lang.php b/src/application/language/portuguese/translations_lang.php old mode 100644 new mode 100755 index b6ed6f2b..df836058 --- a/src/application/language/portuguese/translations_lang.php +++ b/src/application/language/portuguese/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = 'Time Format'; +$lang['time_format_hint'] = 'Change the time display format (H - Hours, M - Minutes).'; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/romanian/translations_lang.php b/src/application/language/romanian/translations_lang.php old mode 100644 new mode 100755 index bc00172e..aba0ad53 --- a/src/application/language/romanian/translations_lang.php +++ b/src/application/language/romanian/translations_lang.php @@ -280,6 +280,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = ''; +$lang['time_format_hint'] = ''; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/russian/translations_lang.php b/src/application/language/russian/translations_lang.php old mode 100644 new mode 100755 index 628d77cd..d51c2c9e --- a/src/application/language/russian/translations_lang.php +++ b/src/application/language/russian/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = ''; +$lang['time_format_hint'] = ''; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/slovak/translations_lang.php b/src/application/language/slovak/translations_lang.php old mode 100644 new mode 100755 index 1fb0e95a..18a9499f --- a/src/application/language/slovak/translations_lang.php +++ b/src/application/language/slovak/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Upozornenia zákazníka'; $lang['customer_notifications_hint'] = 'Určuje, či zákazník dostane e-mailové upozornenia vždy, keď nastane zmena plánu na jednej z jeho rezervácií.'; $lang['date_format'] = 'Formát dátumu'; $lang['date_format_hint'] = 'Zmeňte formát zobrazenia dátumu (D - Dátum, M - Mesiac, Y - Rok).'; +$lang['time_format'] = ''; +$lang['time_format_hint'] = ''; $lang['google_analytics_code_hint'] = 'Pridajte svoje ID služby Google Analytics, aby ste bola zahrnutá do stránky rezervácie.'; $lang['availabilities_type'] = 'Typ dostupnosti'; $lang['flexible'] = 'Flexibilný'; diff --git a/src/application/language/spanish/translations_lang.php b/src/application/language/spanish/translations_lang.php old mode 100644 new mode 100755 index a5c3f145..237401e9 --- a/src/application/language/spanish/translations_lang.php +++ b/src/application/language/spanish/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Notificaciones de Clientes'; $lang['customer_notifications_hint'] = 'Define si su cliente recibirá notificaciones de correo cada vez que una agenda cambia o alguna de sus citas.'; $lang['date_format'] = 'Formato de Fecha'; $lang['date_format_hint'] = 'Cambia el formato de fecha para mostrar (D - Día, M - Mes, Y - Año).'; +$lang['time_format'] = ''; +$lang['time_format_hint'] = ''; $lang['google_analytics_code_hint'] = 'Agrega tu ID de Google Analytics para ser incluido en la página de reservas.'; $lang['availabilities_type'] = 'Tipos disponibles'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/language/turkish/translations_lang.php b/src/application/language/turkish/translations_lang.php old mode 100644 new mode 100755 index 8d02230a..2d78e152 --- a/src/application/language/turkish/translations_lang.php +++ b/src/application/language/turkish/translations_lang.php @@ -274,6 +274,8 @@ $lang['customer_notifications'] = 'Customer Notifications'; $lang['customer_notifications_hint'] = 'Defines whether the customer will receive email notifications whenever there is a schedule change on one of his appointments.'; $lang['date_format'] = 'Date Format'; $lang['date_format_hint'] = 'Change the date display format (D - Date, M - Month, Y - Year).'; +$lang['time_format'] = ''; +$lang['time_format_hint'] = ''; $lang['google_analytics_code_hint'] = 'Add your Google Analytics ID to be included in the booking page.'; $lang['availabilities_type'] = 'Availabilities Type'; $lang['flexible'] = 'Flexible'; diff --git a/src/application/migrations/010_add_time_format_setting.php b/src/application/migrations/010_add_time_format_setting.php new file mode 100644 index 00000000..87716625 --- /dev/null +++ b/src/application/migrations/010_add_time_format_setting.php @@ -0,0 +1,27 @@ + + * @copyright Copyright (c) 2013 - 2018, Alex Tselegidis + * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 + * @link http://easyappointments.org + * @since v1.3.0 + * ---------------------------------------------------------------------------- */ + +class Migration_Add_time_format_setting extends CI_Migration { + public function up() + { + $this->db->insert('ea_settings', [ + 'name' => 'time_format', + 'value' => 'regular' + ]); + } + + public function down() + { + $this->db->delete('ea_settings', ['name' => 'time_format']); + } +} diff --git a/src/application/views/appointments/book.php b/src/application/views/appointments/book.php old mode 100644 new mode 100755 index 4eb5ab00..2aca05ab --- a/src/application/views/appointments/book.php +++ b/src/application/views/appointments/book.php @@ -327,6 +327,7 @@ baseUrl : , manageMode : , dateFormat : , + timeFormat : , appointmentData : , providerData : , customerData : , diff --git a/src/application/views/backend/calendar.php b/src/application/views/backend/calendar.php old mode 100644 new mode 100755 index dd8682a9..b0e0afe6 --- a/src/application/views/backend/calendar.php +++ b/src/application/views/backend/calendar.php @@ -19,6 +19,7 @@ 'baseUrl' : , 'bookAdvanceTimeout' : , 'dateFormat' : , + 'timeFormat' : , 'editAppointment' : , 'customers' : , 'secretaryProviders' : , diff --git a/src/application/views/backend/customers.php b/src/application/views/backend/customers.php old mode 100644 new mode 100755 index e588d4d3..67a92728 --- a/src/application/views/backend/customers.php +++ b/src/application/views/backend/customers.php @@ -7,6 +7,7 @@ availableProviders : , availableServices : , dateFormat : , + timeFormat : , baseUrl : , customers : , user : { diff --git a/src/application/views/backend/services.php b/src/application/views/backend/services.php old mode 100644 new mode 100755 index d1c74fd5..3c28e38e --- a/src/application/views/backend/services.php +++ b/src/application/views/backend/services.php @@ -6,6 +6,7 @@ csrfToken : security->get_csrf_hash()) ?>, baseUrl : , dateFormat : , + timeFormat : , services : , categories : , user : { diff --git a/src/application/views/backend/settings.php b/src/application/views/backend/settings.php old mode 100644 new mode 100755 index 2f526b3d..434458d5 --- a/src/application/views/backend/settings.php +++ b/src/application/views/backend/settings.php @@ -9,6 +9,7 @@ 'csrfToken' : security->get_csrf_hash()) ?>, 'baseUrl' : , 'dateFormat' : , + 'timeFormat' : , 'userSlug' : , 'settings' : { 'system' : , @@ -117,6 +118,18 @@ +
+ + + + + +

diff --git a/src/application/views/backend/users.php b/src/application/views/backend/users.php old mode 100644 new mode 100755 index fba5ad81..7e420ba1 --- a/src/application/views/backend/users.php +++ b/src/application/views/backend/users.php @@ -10,6 +10,7 @@ csrfToken : security->get_csrf_hash()) ?>, baseUrl : , dateFormat : , + timeFormat : , admins : , providers : , secretaries : , diff --git a/src/assets/js/backend_calendar_appointments_modal.js b/src/assets/js/backend_calendar_appointments_modal.js old mode 100644 new mode 100755 index 01a67606..6fbf2a5b --- a/src/assets/js/backend_calendar_appointments_modal.js +++ b/src/assets/js/backend_calendar_appointments_modal.js @@ -391,7 +391,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa $dialog.find('#start-datetime').datetimepicker({ dateFormat: dateFormat, - timeFormat: 'h:mm TT', + timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat, // Translation dayNames: [EALang.sunday, EALang.monday, EALang.tuesday, EALang.wednesday, @@ -421,7 +421,7 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa $dialog.find('#end-datetime').datetimepicker({ dateFormat: dateFormat, - timeFormat: 'h:mm TT', + timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat, // Translation dayNames: [EALang.sunday, EALang.monday, EALang.tuesday, EALang.wednesday, diff --git a/src/assets/js/backend_calendar_default_view.js b/src/assets/js/backend_calendar_default_view.js old mode 100644 new mode 100755 index 3a872d06..f038ff42 --- a/src/assets/js/backend_calendar_default_view.js +++ b/src/assets/js/backend_calendar_default_view.js @@ -1062,6 +1062,23 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; throw new Error('Invalid date format setting provided!', GlobalVariables.dateFormat); } + // Time formats + var timeFormat = ''; + var slotTimeFormat= ''; + + switch (GlobalVariables.timeFormat) { + case 'military': + timeFormat = 'H:mm'; + slotTimeFormat = 'H(:mm)'; + break; + case 'regular': + timeFormat = 'h:mm A'; + slotTimeFormat = 'h(:mm) A'; + break; + default: + throw new Error('Invalid time format setting provided!', GlobalVariables.timeFormat); + } + var defaultView = window.innerWidth < 468 ? 'agendaDay' : 'agendaWeek'; // Initialize page calendar @@ -1071,8 +1088,8 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; editable: true, firstDay: 0, snapDuration: '00:30:00', - timeFormat: 'h:mm A', - slotLabelFormat: 'h(:mm) A', + timeFormat: timeFormat, + slotLabelFormat: slotTimeFormat, allDayText: EALang.all_day, columnFormat: columnFormat, titleFormat: 'MMMM YYYY', diff --git a/src/assets/js/backend_calendar_table_view.js b/src/assets/js/backend_calendar_table_view.js old mode 100644 new mode 100755 index 5b0fd9bb..051b694f --- a/src/assets/js/backend_calendar_table_view.js +++ b/src/assets/js/backend_calendar_table_view.js @@ -686,7 +686,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; $event.html( appointment.customer.first_name.charAt(0) + '. ' + appointment.customer.last_name + - ' ' + startDate.toString('h:mm tt') + ' ' + ' ' + startDate.toString(GlobalVariables.timeFormat) + ' ' + (eventDuration !== parseInt(appointment.service.duration) ? '(' + eventDuration + '\')' : '') ); @@ -708,7 +708,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; $event.appendTo($(tr).prev().find('td').eq(cellIndex)); // Remove the hour from the event if it is the same as the row. - if (eventDate.toString('h:mm tt') === $(tr).prev().find('td').eq(0).text()) { + if (eventDate.toString(GlobalVariables.timeFormat) === $(tr).prev().find('td').eq(0).text()) { $event.find('.hour').remove(); } @@ -747,7 +747,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; var $event = $('
'); $event.html((unavailability.notes || EALang.unavailable) + - ' ' + eventDate.toString('h:mm tt') + ' (' + eventDuration + '\')'); + ' ' + eventDate.toString(GlobalVariables.timeFormat) + ' (' + eventDuration + '\')'); $event.data(unavailability); @@ -763,7 +763,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; $event.appendTo($(tr).prev().find('td').eq(1)); // Remove the hour from the event if it is the same as the row. - if (eventDate.toString('h:mm tt') === $(tr).prev().find('td').eq(0).text()) { + if (eventDate.toString(GlobalVariables.timeFormat) === $(tr).prev().find('td').eq(0).text()) { $event.find('.hour').remove(); } @@ -798,7 +798,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; $event.html( EALang.break + - ' ' + eventDate.toString('h:mm tt') + ' (' + eventDuration + '\')'); + ' ' + eventDate.toString(GlobalVariables.timeFormat) + ' (' + eventDuration + '\')'); $event.data(entry); @@ -812,7 +812,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; if (eventDate < cellDate) { // Remove the hour from the event if it is the same as the row. - if (eventDate.toString('h:mm tt') === $(tr).prev().find('td').eq(0).text()) { + if (eventDate.toString(GlobalVariables.timeFormat) === $(tr).prev().find('td').eq(0).text()) { $event.find('.hour').remove(); } diff --git a/src/assets/js/backend_calendar_unavailabilities_modal.js b/src/assets/js/backend_calendar_unavailabilities_modal.js old mode 100644 new mode 100755 index 7678f833..7c34024d --- a/src/assets/js/backend_calendar_unavailabilities_modal.js +++ b/src/assets/js/backend_calendar_unavailabilities_modal.js @@ -183,7 +183,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili $dialog.find('#unavailable-start').datetimepicker({ dateFormat: dateFormat, - timeFormat: 'h:mm TT', + timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat, // Translation dayNames: [EALang.sunday, EALang.monday, EALang.tuesday, EALang.wednesday, @@ -213,7 +213,7 @@ window.BackendCalendarUnavailabilitiesModal = window.BackendCalendarUnavailabili $dialog.find('#unavailable-end').datetimepicker({ dateFormat: dateFormat, - timeFormat: 'h:mm TT', + timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat, // Translation dayNames: [EALang.sunday, EALang.monday, EALang.tuesday, EALang.wednesday, diff --git a/src/assets/js/frontend_book_api.js b/src/assets/js/frontend_book_api.js old mode 100644 new mode 100755 index 79104aa2..739546ad --- a/src/assets/js/frontend_book_api.js +++ b/src/assets/js/frontend_book_api.js @@ -71,6 +71,8 @@ window.FrontendBookApi = window.FrontendBookApi || {}; var currColumn = 1; $('#available-hours').html('
'); + var timeFormat = GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm'; + $.each(response, function (index, availableHour) { if ((currColumn * 10) < (index + 1)) { currColumn++; @@ -78,7 +80,7 @@ window.FrontendBookApi = window.FrontendBookApi || {}; } $('#available-hours div:eq(' + (currColumn - 1) + ')').append( - '' + Date.parse(availableHour).toString('h:mm tt') + '
'); + '' + Date.parse(availableHour).toString(timeFormat) + '
'); }); if (FrontendBook.manageMode) { @@ -87,7 +89,7 @@ window.FrontendBookApi = window.FrontendBookApi || {}; $('.available-hour').filter(function () { return $(this).text() === Date.parseExact( GlobalVariables.appointmentData.start_datetime, - 'yyyy-MM-dd HH:mm:ss').toString('h:mm tt'); + 'yyyy-MM-dd HH:mm:ss').toString(timeFormat); }).addClass('selected-hour'); } else { // Set the first available hour as the default selection. diff --git a/src/assets/js/general_functions.js b/src/assets/js/general_functions.js old mode 100644 new mode 100755 index 0a0587fb..fc396eb5 --- a/src/assets/js/general_functions.js +++ b/src/assets/js/general_functions.js @@ -410,8 +410,9 @@ window.GeneralFunctions = window.GeneralFunctions || {}; * @return {String} Returns the formatted date string. */ exports.formatDate = function (date, dateFormatSetting, addHours) { - var format, result; - var hours = addHours ? ' h:mm tt' : ''; + var timeFormat = GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm'; + var hours = addHours ? ' ' + timeFormat : ''; + var result; switch (dateFormatSetting) { case 'DMY': diff --git a/src/assets/js/working_plan.js b/src/assets/js/working_plan.js old mode 100644 new mode 100755 index d0826bc5..b7530037 --- a/src/assets/js/working_plan.js +++ b/src/assets/js/working_plan.js @@ -48,8 +48,8 @@ $.each(workingPlan, function (index, workingDay) { if (workingDay != null) { $('#' + index).prop('checked', true); - $('#' + index + '-start').val(Date.parse(workingDay.start).toString('h:mm tt').toUpperCase()); - $('#' + index + '-end').val(Date.parse(workingDay.end).toString('h:mm tt').toUpperCase()); + $('#' + index + '-start').val(Date.parse(workingDay.start).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm').toUpperCase()); + $('#' + index + '-end').val(Date.parse(workingDay.end).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm').toUpperCase()); // Add the day's breaks on the breaks table. $.each(workingDay.breaks, function (i, brk) { @@ -58,8 +58,8 @@ var tr = '' + '' + GeneralFunctions.ucaseFirstLetter(day) + '' + - '' + Date.parse(brk.start).toString('h:mm tt').toUpperCase() + '' + - '' + Date.parse(brk.end).toString('h:mm tt').toUpperCase() + '' + + '' + Date.parse(brk.start).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm').toUpperCase() + '' + + '' + Date.parse(brk.end).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm').toUpperCase() + '' + '' + '