mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-09 17:42:21 +03:00
Completed booking wizard translation.
This commit is contained in:
parent
49dbe9cfba
commit
9cd9558f55
8 changed files with 62 additions and 47 deletions
Binary file not shown.
|
@ -86,7 +86,7 @@ $config['url_suffix'] = '';
|
|||
| than english.
|
||||
|
|
||||
*/
|
||||
$config['language'] = 'german';//'english';
|
||||
$config['language'] = 'greek';//'english';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -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 <strong>' . $password . '</strong>. '
|
||||
. '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' => '<strong>' . $password . '</strong>'
|
||||
);
|
||||
|
||||
$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') . '<br>'
|
||||
. 'E!A Version: ' . $this->CI->config->item('ea_version') . '<br>'
|
||||
$mail->Body = 'Base URL: ' . $this->ci->config->item('base_url') . '<br>'
|
||||
. 'E!A Version: ' . $this->ci->config->item('ea_version') . '<br>'
|
||||
. 'Company Name: ' . $company_name . '<br>'
|
||||
. 'Company Email: ' . $company_email . '<br>'
|
||||
. 'Company Link: ' . $company_link . '<br>';
|
||||
|
|
|
@ -128,15 +128,15 @@
|
|||
if ($manage_mode === TRUE) {
|
||||
echo '
|
||||
<div id="cancel-appointment-frame">
|
||||
<p>' .
|
||||
<p class="pull-left">' .
|
||||
$this->lang->line('fe_cancel_appointment_hint') .
|
||||
'</p>
|
||||
<form id="cancel-appointment-form" method="post"
|
||||
<form id="cancel-appointment-form" method="post" class="pull-right"
|
||||
action="' . $this->config->item('base_url')
|
||||
. 'appointments/cancel/' . $appointment_data['hash'] . '">
|
||||
<textarea name="cancel_reason" style="display:none"></textarea>
|
||||
<button id="cancel-appointment" class="btn btn-inverse">
|
||||
Cancel</button>
|
||||
<button id="cancel-appointment" class="btn btn-inverse">' .
|
||||
$this->lang->line('fe_cancel') . '</button>
|
||||
</form>
|
||||
</div>';
|
||||
}
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
|
||||
<div id="content" style="padding: 10px 15px;">
|
||||
<h2>$email_title</h2>
|
||||
<p>
|
||||
The following appointment was removed from the company's schedule.
|
||||
</p>
|
||||
<p>$email_message</p>
|
||||
|
||||
<h2>Appointment Details</h2>
|
||||
<table id="appointment-details">
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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('<textarea id="cancel-reason" rows="3"></textarea>');
|
||||
$('#cancel-reason').css('width', '353px');
|
||||
|
|
Loading…
Reference in a new issue