mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-25 17:33:19 +03:00
Merge branch 'develop' into hotfix
This commit is contained in:
commit
52be9ff9d7
44 changed files with 188 additions and 38 deletions
|
@ -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');
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ $config['migration_table'] = 'ea_migrations';
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 9; // current
|
||||
$config['migration_version'] = 10; // current
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -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
|
||||
|
|
5
src/application/controllers/Backend.php
Normal file → Executable file
5
src/application/controllers/Backend.php
Normal file → Executable file
|
@ -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);
|
||||
|
|
6
src/application/controllers/Backend_api.php
Normal file → Executable file
6
src/application/controllers/Backend_api.php
Normal file → Executable file
|
@ -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
|
||||
|
|
2
src/application/language/arabic/translations_lang.php
Normal file → Executable file
2
src/application/language/arabic/translations_lang.php
Normal file → Executable file
|
@ -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'] = 'مرن';
|
||||
|
|
2
src/application/language/bulgarian/translations_lang.php
Normal file → Executable file
2
src/application/language/bulgarian/translations_lang.php
Normal file → Executable file
|
@ -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'] = 'Гъвкав';
|
||||
|
|
2
src/application/language/chinese/translations_lang.php
Normal file → Executable file
2
src/application/language/chinese/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/danish/translations_lang.php
Normal file → Executable file
2
src/application/language/danish/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/dutch/translations_lang.php
Normal file → Executable file
2
src/application/language/dutch/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/english/translations_lang.php
Normal file → Executable file
2
src/application/language/english/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/finnish/translations_lang.php
Normal file → Executable file
2
src/application/language/finnish/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/french/translations_lang.php
Normal file → Executable file
2
src/application/language/french/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/german/translations_lang.php
Normal file → Executable file
2
src/application/language/german/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/greek/translations_lang.php
Normal file → Executable file
2
src/application/language/greek/translations_lang.php
Normal file → Executable file
|
@ -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'] = 'Ευέλικτος';
|
||||
|
|
2
src/application/language/hindi/translations_lang.php
Normal file → Executable file
2
src/application/language/hindi/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/hungarian/translations_lang.php
Normal file → Executable file
2
src/application/language/hungarian/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/italian/translations_lang.php
Normal file → Executable file
2
src/application/language/italian/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/japanese/translations_lang.php
Normal file → Executable file
2
src/application/language/japanese/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/luxembourgish/translations_lang.php
Normal file → Executable file
2
src/application/language/luxembourgish/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/polish/translations_lang.php
Normal file → Executable file
2
src/application/language/polish/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/portuguese-br/translations_lang.php
Normal file → Executable file
2
src/application/language/portuguese-br/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/portuguese/translations_lang.php
Normal file → Executable file
2
src/application/language/portuguese/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/romanian/translations_lang.php
Normal file → Executable file
2
src/application/language/romanian/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/russian/translations_lang.php
Normal file → Executable file
2
src/application/language/russian/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/slovak/translations_lang.php
Normal file → Executable file
2
src/application/language/slovak/translations_lang.php
Normal file → Executable file
|
@ -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ý';
|
||||
|
|
2
src/application/language/spanish/translations_lang.php
Normal file → Executable file
2
src/application/language/spanish/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
2
src/application/language/turkish/translations_lang.php
Normal file → Executable file
2
src/application/language/turkish/translations_lang.php
Normal file → Executable file
|
@ -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';
|
||||
|
|
27
src/application/migrations/010_add_time_format_setting.php
Normal file
27
src/application/migrations/010_add_time_format_setting.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Easy!Appointments - Open Source Web Scheduler
|
||||
*
|
||||
* @package EasyAppointments
|
||||
* @author A.Tselegidis <alextselegidis@gmail.com>
|
||||
* @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']);
|
||||
}
|
||||
}
|
1
src/application/views/appointments/book.php
Normal file → Executable file
1
src/application/views/appointments/book.php
Normal file → Executable file
|
@ -327,6 +327,7 @@
|
|||
baseUrl : <?= json_encode(config('base_url')) ?>,
|
||||
manageMode : <?= $manage_mode ? 'true' : 'false' ?>,
|
||||
dateFormat : <?= json_encode($date_format) ?>,
|
||||
timeFormat : <?= json_encode($time_format) ?>,
|
||||
appointmentData : <?= json_encode($appointment_data) ?>,
|
||||
providerData : <?= json_encode($provider_data) ?>,
|
||||
customerData : <?= json_encode($customer_data) ?>,
|
||||
|
|
1
src/application/views/backend/calendar.php
Normal file → Executable file
1
src/application/views/backend/calendar.php
Normal file → Executable file
|
@ -19,6 +19,7 @@
|
|||
'baseUrl' : <?= json_encode($base_url) ?>,
|
||||
'bookAdvanceTimeout' : <?= $book_advance_timeout ?>,
|
||||
'dateFormat' : <?= json_encode($date_format) ?>,
|
||||
'timeFormat' : <?= json_encode($time_format) ?>,
|
||||
'editAppointment' : <?= json_encode($edit_appointment) ?>,
|
||||
'customers' : <?= json_encode($customers) ?>,
|
||||
'secretaryProviders' : <?= json_encode($secretary_providers) ?>,
|
||||
|
|
1
src/application/views/backend/customers.php
Normal file → Executable file
1
src/application/views/backend/customers.php
Normal file → Executable file
|
@ -7,6 +7,7 @@
|
|||
availableProviders : <?= json_encode($available_providers) ?>,
|
||||
availableServices : <?= json_encode($available_services) ?>,
|
||||
dateFormat : <?= json_encode($date_format) ?>,
|
||||
timeFormat : <?= json_encode($time_format) ?>,
|
||||
baseUrl : <?= json_encode($base_url) ?>,
|
||||
customers : <?= json_encode($customers) ?>,
|
||||
user : {
|
||||
|
|
1
src/application/views/backend/services.php
Normal file → Executable file
1
src/application/views/backend/services.php
Normal file → Executable file
|
@ -6,6 +6,7 @@
|
|||
csrfToken : <?= json_encode($this->security->get_csrf_hash()) ?>,
|
||||
baseUrl : <?= json_encode($base_url) ?>,
|
||||
dateFormat : <?= json_encode($date_format) ?>,
|
||||
timeFormat : <?= json_encode($time_format) ?>,
|
||||
services : <?= json_encode($services) ?>,
|
||||
categories : <?= json_encode($categories) ?>,
|
||||
user : {
|
||||
|
|
13
src/application/views/backend/settings.php
Normal file → Executable file
13
src/application/views/backend/settings.php
Normal file → Executable file
|
@ -9,6 +9,7 @@
|
|||
'csrfToken' : <?= json_encode($this->security->get_csrf_hash()) ?>,
|
||||
'baseUrl' : <?= json_encode($base_url) ?>,
|
||||
'dateFormat' : <?= json_encode($date_format) ?>,
|
||||
'timeFormat' : <?= json_encode($time_format) ?>,
|
||||
'userSlug' : <?= json_encode($role_slug) ?>,
|
||||
'settings' : {
|
||||
'system' : <?= json_encode($system_settings) ?>,
|
||||
|
@ -117,6 +118,18 @@
|
|||
<?= lang('date_format_hint') ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="time-format">
|
||||
<?= lang('time_format') ?>
|
||||
</label>
|
||||
<select class="form-control" id="time-format" data-field="time_format">
|
||||
<option value="<?= TIME_FORMAT_REGULAR ?>">H:MM AM/PM</option>
|
||||
<option value="<?= TIME_FORMAT_MILITARY ?>">HH:MM</option>
|
||||
</select>
|
||||
<span class="help-block">
|
||||
<?= lang('time_format_hint') ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><?= lang('customer_notifications') ?></label>
|
||||
<br>
|
||||
|
|
1
src/application/views/backend/users.php
Normal file → Executable file
1
src/application/views/backend/users.php
Normal file → Executable file
|
@ -10,6 +10,7 @@
|
|||
csrfToken : <?= json_encode($this->security->get_csrf_hash()) ?>,
|
||||
baseUrl : <?= json_encode($base_url) ?>,
|
||||
dateFormat : <?= json_encode($date_format) ?>,
|
||||
timeFormat : <?= json_encode($time_format) ?>,
|
||||
admins : <?= json_encode($admins) ?>,
|
||||
providers : <?= json_encode($providers) ?>,
|
||||
secretaries : <?= json_encode($secretaries) ?>,
|
||||
|
|
4
src/assets/js/backend_calendar_appointments_modal.js
Normal file → Executable file
4
src/assets/js/backend_calendar_appointments_modal.js
Normal file → Executable file
|
@ -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,
|
||||
|
|
21
src/assets/js/backend_calendar_default_view.js
Normal file → Executable file
21
src/assets/js/backend_calendar_default_view.js
Normal file → Executable file
|
@ -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',
|
||||
|
|
12
src/assets/js/backend_calendar_table_view.js
Normal file → Executable file
12
src/assets/js/backend_calendar_table_view.js
Normal file → Executable file
|
@ -686,7 +686,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
|||
|
||||
$event.html(
|
||||
appointment.customer.first_name.charAt(0) + '. ' + appointment.customer.last_name +
|
||||
' <span class="hour">' + startDate.toString('h:mm tt') + '</span> '
|
||||
' <span class="hour">' + startDate.toString(GlobalVariables.timeFormat) + '</span> '
|
||||
+ (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 = $('<div class="event unavailability" />');
|
||||
|
||||
$event.html((unavailability.notes || EALang.unavailable) +
|
||||
' <span class="hour">' + eventDate.toString('h:mm tt') + '</span> (' + eventDuration + '\')');
|
||||
' <span class="hour">' + eventDate.toString(GlobalVariables.timeFormat) + '</span> (' + 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 +
|
||||
' <span class="hour">' + eventDate.toString('h:mm tt') + '</span> (' + eventDuration + '\')');
|
||||
' <span class="hour">' + eventDate.toString(GlobalVariables.timeFormat) + '</span> (' + 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();
|
||||
}
|
||||
|
||||
|
|
4
src/assets/js/backend_calendar_unavailabilities_modal.js
Normal file → Executable file
4
src/assets/js/backend_calendar_unavailabilities_modal.js
Normal file → Executable file
|
@ -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,
|
||||
|
|
6
src/assets/js/frontend_book_api.js
Normal file → Executable file
6
src/assets/js/frontend_book_api.js
Normal file → Executable file
|
@ -71,6 +71,8 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
|||
var currColumn = 1;
|
||||
$('#available-hours').html('<div style="width:80px; float:left;"></div>');
|
||||
|
||||
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(
|
||||
'<span class="available-hour">' + Date.parse(availableHour).toString('h:mm tt') + '</span><br/>');
|
||||
'<span class="available-hour">' + Date.parse(availableHour).toString(timeFormat) + '</span><br/>');
|
||||
});
|
||||
|
||||
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.
|
||||
|
|
5
src/assets/js/general_functions.js
Normal file → Executable file
5
src/assets/js/general_functions.js
Normal file → Executable file
|
@ -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':
|
||||
|
|
24
src/assets/js/working_plan.js
Normal file → Executable file
24
src/assets/js/working_plan.js
Normal file → Executable file
|
@ -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 =
|
||||
'<tr>' +
|
||||
'<td class="break-day editable">' + GeneralFunctions.ucaseFirstLetter(day) + '</td>' +
|
||||
'<td class="break-start editable">' + Date.parse(brk.start).toString('h:mm tt').toUpperCase() + '</td>' +
|
||||
'<td class="break-end editable">' + Date.parse(brk.end).toString('h:mm tt').toUpperCase() + '</td>' +
|
||||
'<td class="break-start editable">' + Date.parse(brk.start).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm').toUpperCase() + '</td>' +
|
||||
'<td class="break-end editable">' + Date.parse(brk.end).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm').toUpperCase() + '</td>' +
|
||||
'<td>' +
|
||||
'<button type="button" class="btn btn-default btn-sm edit-break" title="' + EALang.edit + '">' +
|
||||
'<span class="glyphicon glyphicon-pencil"></span>' +
|
||||
|
@ -172,8 +172,8 @@
|
|||
var id = $(this).attr('id');
|
||||
|
||||
if ($(this).prop('checked') == true) {
|
||||
$('#' + id + '-start').prop('disabled', false).val('9:00 AM');
|
||||
$('#' + id + '-end').prop('disabled', false).val('6:00 PM');
|
||||
$('#' + id + '-start').prop('disabled', false).val(GlobalVariables.timeFormat === 'regular' ? '9:00 AM' : '09:00');
|
||||
$('#' + id + '-end').prop('disabled', false).val(GlobalVariables.timeFormat === 'regular' ? '6:00 PM' : '18:00');
|
||||
} else {
|
||||
$('#' + id + '-start').prop('disabled', true).val('');
|
||||
$('#' + id + '-end').prop('disabled', true).val('');
|
||||
|
@ -190,8 +190,8 @@
|
|||
var tr =
|
||||
'<tr>' +
|
||||
'<td class="break-day editable">' + EALang.sunday + '</td>' +
|
||||
'<td class="break-start editable">9:00 AM</td>' +
|
||||
'<td class="break-end editable">10:00 AM</td>' +
|
||||
'<td class="break-start editable">' + (GlobalVariables.timeFormat === 'regular' ? '9:00 AM' : '09:00') + '</td>' +
|
||||
'<td class="break-end editable">' + (GlobalVariables.timeFormat === 'regular' ? '10:00 AM' : '10:00') + '</td>' +
|
||||
'<td>' +
|
||||
'<button type="button" class="btn btn-default btn-sm edit-break" title="' + EALang.edit + '">' +
|
||||
'<span class="glyphicon glyphicon-pencil"></span>' +
|
||||
|
@ -234,7 +234,7 @@
|
|||
// Make all cells in current row editable.
|
||||
$(this).parent().parent().children().trigger('edit');
|
||||
$(this).parent().parent().find('.break-start input, .break-end input').timepicker({
|
||||
timeFormat: 'h:mm TT',
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm',
|
||||
currentText: EALang.now,
|
||||
closeText: EALang.close,
|
||||
timeOnlyTitle: EALang.select_time,
|
||||
|
@ -295,7 +295,7 @@
|
|||
end = Date.parse($modifiedRow.find('.break-end input').val());
|
||||
|
||||
if (start > end) {
|
||||
$modifiedRow.find('.break-end input').val(start.addHours(1).toString('h:mm tt'));
|
||||
$modifiedRow.find('.break-end input').val(start.addHours(1).toString(GlobalVariables.timeFormat));
|
||||
}
|
||||
|
||||
this.enableSubmit = true;
|
||||
|
@ -361,7 +361,7 @@
|
|||
if (disabled == false) {
|
||||
// Set timepickers where needed.
|
||||
$('.working-plan input:text').timepicker({
|
||||
timeFormat: 'h:mm TT',
|
||||
timeFormat: GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat,
|
||||
currentText: EALang.now,
|
||||
closeText: EALang.close,
|
||||
timeOnlyTitle: EALang.select_time,
|
||||
|
@ -375,7 +375,7 @@
|
|||
end = Date.parse($(this).parent().parent().find('.work-end').val());
|
||||
|
||||
if (start > end) {
|
||||
$(this).parent().parent().find('.work-end').val(start.addHours(1).toString('h:mm tt'));
|
||||
$(this).parent().parent().find('.work-end').val(start.addHours(1).toString(GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : GlobalVariables.timeFormat));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -15,6 +15,7 @@ VALUES
|
|||
('google_analytics_code', ''),
|
||||
('customer_notifications', '1'),
|
||||
('date_format', 'DMY'),
|
||||
('time_format', 'regular'),
|
||||
('require_captcha', '0');
|
||||
|
||||
INSERT INTO `ea_migrations` VALUES ('9');
|
||||
INSERT INTO `ea_migrations` VALUES ('10');
|
||||
|
|
30
src/engine/Notifications/Email.php
Normal file → Executable file
30
src/engine/Notifications/Email.php
Normal file → Executable file
|
@ -119,14 +119,26 @@ class Email {
|
|||
throw new \Exception('Invalid date_format value: ' . $company['date_format']);
|
||||
}
|
||||
|
||||
switch ($company['time_format'])
|
||||
{
|
||||
case 'military':
|
||||
$timeFormat = 'H:i';
|
||||
break;
|
||||
case 'regular':
|
||||
$timeFormat = 'g:i A';
|
||||
break;
|
||||
default:
|
||||
throw new \Exception('Invalid time_format value: ' . $company['time_format']);
|
||||
}
|
||||
|
||||
// Prepare template replace array.
|
||||
$replaceArray = [
|
||||
'$email_title' => $title->get(),
|
||||
'$email_message' => $message->get(),
|
||||
'$appointment_service' => $service['name'],
|
||||
'$appointment_provider' => $provider['first_name'] . ' ' . $provider['last_name'],
|
||||
'$appointment_start_date' => date($date_format . ' g:i A', strtotime($appointment['start_datetime'])),
|
||||
'$appointment_end_date' => date($date_format . ' g:i A', strtotime($appointment['end_datetime'])),
|
||||
'$appointment_start_date' => date($date_format . ' ' . $timeFormat, strtotime($appointment['start_datetime'])),
|
||||
'$appointment_end_date' => date($date_format . ' ' . $timeFormat, strtotime($appointment['end_datetime'])),
|
||||
'$appointment_link' => $appointmentLink->get(),
|
||||
'$company_link' => $company['company_link'],
|
||||
'$company_name' => $company['company_name'],
|
||||
|
@ -211,13 +223,25 @@ class Email {
|
|||
throw new \Exception('Invalid date_format value: ' . $company['date_format']);
|
||||
}
|
||||
|
||||
switch ($company['time_format'])
|
||||
{
|
||||
case 'military':
|
||||
$timeFormat = 'H:i';
|
||||
break;
|
||||
case 'regular':
|
||||
$timeFormat = 'g:i A';
|
||||
break;
|
||||
default:
|
||||
throw new \Exception('Invalid time_format value: ' . $company['time_format']);
|
||||
}
|
||||
|
||||
// Prepare email template data.
|
||||
$replaceArray = [
|
||||
'$email_title' => $this->framework->lang->line('appointment_cancelled_title'),
|
||||
'$email_message' => $this->framework->lang->line('appointment_removed_from_schedule'),
|
||||
'$appointment_service' => $service['name'],
|
||||
'$appointment_provider' => $provider['first_name'] . ' ' . $provider['last_name'],
|
||||
'$appointment_date' => date($date_format . ' g:i A', strtotime($appointment['start_datetime'])),
|
||||
'$appointment_date' => date($date_format . ' ' . $timeFormat, strtotime($appointment['start_datetime'])),
|
||||
'$appointment_duration' => $service['duration'] . ' minutes',
|
||||
'$company_link' => $company['company_link'],
|
||||
'$company_name' => $company['company_name'],
|
||||
|
|
Loading…
Reference in a new issue