diff --git a/doc/translations.xls b/doc/translations.xls index 4248c699..e6e3a185 100644 Binary files a/doc/translations.xls and b/doc/translations.xls differ diff --git a/src/application/config/config.php b/src/application/config/config.php index f408afdb..33e50075 100644 --- a/src/application/config/config.php +++ b/src/application/config/config.php @@ -86,7 +86,7 @@ $config['url_suffix'] = ''; | than english. | */ -$config['language'] = 'german';//'english'; +$config['language'] = 'greek';//'english'; /* |-------------------------------------------------------------------------- diff --git a/src/application/libraries/notifications.php b/src/application/libraries/notifications.php index d4d626ef..94ad58c4 100644 --- a/src/application/libraries/notifications.php +++ b/src/application/libraries/notifications.php @@ -10,13 +10,13 @@ require_once dirname(__FILE__) . '/external/class.phpmailer.php'; * during the execution of each class methods. */ class Notifications { - private $CI; + private $ci; /** * Class Constructor */ public function __construct() { - $this->CI =& get_instance(); + $this->ci =& get_instance(); } /** @@ -84,17 +84,17 @@ class Notifications { '$customer_address' => $customer_data['address'], // Translations - 'Appointment Details' => $this->lang->line('fe_appointment_details_title'), - 'Service' => $this->lang->line('fe_service'), - 'Provider' => $this->lang->line('fe_provider'), - 'Start' => $this->lang->line('fe_start'), - 'End' => $this->lang->line('fe_end'), - 'Customer Details' => $this->lang->line('fe_customer_details_title'), - 'Name' => $this->lang->line('fe_start'), - 'Email' => $this->lang->line('fe_start'), - 'Phone' => $this->lang->line('fe_start'), - 'Address' => $this->lang->line('fe_start'), - 'Start' => $this->lang->line('fe_start'), + 'Appointment Details' => $this->ci->lang->line('fe_appointment_details_title'), + 'Service' => $this->ci->lang->line('fe_service'), + 'Provider' => $this->ci->lang->line('fe_provider'), + 'Start' => $this->ci->lang->line('fe_start'), + 'End' => $this->ci->lang->line('fe_end'), + 'Customer Details' => $this->ci->lang->line('fe_customer_details_title'), + 'Name' => $this->ci->lang->line('fe_name'), + 'Email' => $this->ci->lang->line('fe_email'), + 'Phone' => $this->ci->lang->line('fe_phone'), + 'Address' => $this->ci->lang->line('fe_address'), + 'Appointment Link' => $this->ci->lang->line('fe_appointment_link_title') ); $email_html = file_get_contents(dirname(dirname(__FILE__)) @@ -142,7 +142,8 @@ class Notifications { $service_data, $customer_data, $company_settings, $to_address, $reason) { // :: PREPARE EMAIL REPLACE ARRAY $replace_array = array( - '$email_title' => 'Appointment Cancelled', + '$email_title' => $this->ci->lang->line('fe_appointment_cancelled_title'), + '$email_message' => $this->ci->lang->line('fe_appointment_removed_from_schedule'), '$appointment_service' => $service_data['name'], '$appointment_provider' => $provider_data['first_name'] . ' ' . $provider_data['last_name'], '$appointment_date' => date('d/m/Y H:i', strtotime($appointment_data['start_datetime'])), @@ -153,7 +154,21 @@ class Notifications { '$customer_email' => $customer_data['email'], '$customer_phone' => $customer_data['phone_number'], '$customer_address' => $customer_data['address'], - '$reason' => $reason + '$reason' => $reason, + + // Translations + 'Appointment Details' => $this->ci->lang->line('fe_appointment_details_title'), + 'Service' => $this->ci->lang->line('fe_service'), + 'Provider' => $this->ci->lang->line('fe_provider'), + 'Date' => $this->ci->lang->line('fe_start'), + 'Duration' => $this->ci->lang->line('fe_duration'), + 'Customer Details' => $this->ci->lang->line('fe_customer_details_title'), + 'Name' => $this->ci->lang->line('fe_name'), + 'Email' => $this->ci->lang->line('fe_email'), + 'Phone' => $this->ci->lang->line('fe_phone'), + 'Address' => $this->ci->lang->line('fe_address'), + 'Reason' => $this->ci->lang->line('fe_reason') + ); $email_html = file_get_contents(dirname(dirname(__FILE__)) @@ -167,7 +182,7 @@ class Notifications { $mail->AddAddress($to_address); // "Name" argument crushes the phpmailer class. $mail->IsHTML(true); $mail->CharSet = 'UTF-8'; - $mail->Subject = 'Appointment Cancelled'; + $mail->Subject = $this->ci->lang->line('fe_appointment_cancelled_title'); $mail->Body = $email_html; if (!$mail->Send()) { @@ -186,13 +201,12 @@ class Notifications { */ public function send_password($password, $email, $company_settings) { $replace_array = array( - '$email_title' => 'New Account Password', - '$email_message' => 'Your new account password is ' . $password . '. ' - . 'Please store this email to be able to retrieve your password if necessary. ' - . 'You can also change this password with a new one in the settings page.', + '$email_title' => $this->ci->lang->line('be_new_account_password'), + '$email_message' => $this->ci->lang->line('be_new_password_is'), '$company_name' => $company_settings['company_name'], '$company_email' => $company_settings['company_email'], - '$company_link' => $company_settings['company_link'] + '$company_link' => $company_settings['company_link'], + '$password' => '' . $password . '' ); $email_html = file_get_contents(dirname(dirname(__FILE__)) @@ -206,7 +220,7 @@ class Notifications { $mail->AddAddress($email); // "Name" argument crushes the phpmailer class. $mail->IsHTML(true); $mail->CharSet = 'UTF-8'; - $mail->Subject = 'New Account Password'; + $mail->Subject = $this->ci->lang->line('be_new_account_password'); $mail->Body = $email_html; if (!$mail->Send()) { @@ -233,8 +247,8 @@ class Notifications { $mail->IsHTML(true); $mail->CharSet = 'UTF-8'; $mail->Subject = 'New Easy!Appointments Installation'; - $mail->Body = 'Base URL: ' . $this->CI->config->item('base_url') . '
' - . 'E!A Version: ' . $this->CI->config->item('ea_version') . '
' + $mail->Body = 'Base URL: ' . $this->ci->config->item('base_url') . '
' + . 'E!A Version: ' . $this->ci->config->item('ea_version') . '
' . 'Company Name: ' . $company_name . '
' . 'Company Email: ' . $company_email . '
' . 'Company Link: ' . $company_link . '
'; diff --git a/src/application/views/appointments/book.php b/src/application/views/appointments/book.php index 27ceedc1..b2e8aa09 100644 --- a/src/application/views/appointments/book.php +++ b/src/application/views/appointments/book.php @@ -128,15 +128,15 @@ if ($manage_mode === TRUE) { echo '
-

' . +

' . $this->lang->line('fe_cancel_appointment_hint') . '

-
- +
'; } diff --git a/src/application/views/emails/delete_appointment.php b/src/application/views/emails/delete_appointment.php index 5f63a625..d1d5dffc 100644 --- a/src/application/views/emails/delete_appointment.php +++ b/src/application/views/emails/delete_appointment.php @@ -13,9 +13,7 @@

$email_title

-

- The following appointment was removed from the company's schedule. -

+

$email_message

Appointment Details

diff --git a/src/application/views/user/forgot_password.php b/src/application/views/user/forgot_password.php index 663f9627..fbaed9f5 100644 --- a/src/application/views/user/forgot_password.php +++ b/src/application/views/user/forgot_password.php @@ -79,12 +79,14 @@ }; $('.alert').addClass('hidden'); + $('#get-new-password').prop('disabled', true); $.post(postUrl, postData, function(response) { ////////////////////////////////////////////////////////// console.log('Regenerate Password Response: ', response); ////////////////////////////////////////////////////////// + $('#get-new-password').prop('disabled', false); if (!GeneralFunctions.handleAjaxExceptions(response)) return; if (response == GlobalVariables.AJAX_SUCCESS) { diff --git a/src/assets/css/frontend.css b/src/assets/css/frontend.css index cf342f11..3847b5c3 100644 --- a/src/assets/css/frontend.css +++ b/src/assets/css/frontend.css @@ -169,15 +169,17 @@ body { /* CANCEL APPOINTMENT ------------------------------------------------------------------------- */ #cancel-appointment-frame { - padding: 12px 17px; + padding: 12px 17px 0; background: #FAFAFA; border-bottom: 1px solid #E2E2E2; + overflow: auto; } #cancel-appointment-frame p { display: inline-block; margin-right: 10px; margin-bottom: 0; + width: 515px; } #cancel-appointment-frame form { diff --git a/src/assets/js/frontend_book.js b/src/assets/js/frontend_book.js index 8c85e3a5..846eae52 100644 --- a/src/assets/js/frontend_book.js +++ b/src/assets/js/frontend_book.js @@ -196,23 +196,22 @@ var FrontendBook = { $('#cancel-appointment').click(function() { event.preventDefault(); - var dialogButtons = { - 'OK': function() { - if ($('#cancel-reason').val() === '') { - $('#cancel-reason').css('border', '2px solid red'); - return; - } - $('#cancel-appointment-form textarea').val($('#cancel-reason').val()); - $('#cancel-appointment-form').submit(); - }, - 'Cancel': function() { - $('#message_box').dialog('close'); + var dialogButtons = {}; + dialogButtons['OK'] = function() { + if ($('#cancel-reason').val() === '') { + $('#cancel-reason').css('border', '2px solid red'); + return; } + $('#cancel-appointment-form textarea').val($('#cancel-reason').val()); + $('#cancel-appointment-form').submit(); + }; + + dialogButtons[EALang['fe_cancel']] = function() { + $('#message_box').dialog('close'); }; - GeneralFunctions.displayMessageBox('Cancel Appointment', 'Please take a ' - + 'minute to write the reason you are cancelling the appointment:', - dialogButtons); + GeneralFunctions.displayMessageBox(EALang['fe_cancel_appointment_title'], + EALang['be_write_appointment_removal_reason'], dialogButtons); $('#message_box').append(''); $('#cancel-reason').css('width', '353px');