forked from mirrors/easyappointments
Translated user pages (login, logout, forgot password).
This commit is contained in:
parent
9cd9558f55
commit
0ea56d143c
13 changed files with 83 additions and 47 deletions
Binary file not shown.
|
@ -41,7 +41,8 @@ class Appointments extends CI_Controller {
|
|||
'message_title' => $this->lang->line('fe_appointment_not_found'),
|
||||
'message_text' => $this->lang->line('fe_appointment_does_not_exist_in_db'),
|
||||
'message_icon' => $this->config->item('base_url')
|
||||
. 'assets/images/error.png'
|
||||
. 'assets/images/error.png',
|
||||
'company_name' => $company_name
|
||||
);
|
||||
$view['ea_lang'] = $this->lang->language;
|
||||
$this->load->view('appointments/message', $view);
|
||||
|
|
|
@ -11,6 +11,8 @@ class User extends CI_Controller {
|
|||
}
|
||||
|
||||
public function login() {
|
||||
$this->load->model('settings_model');
|
||||
|
||||
$view['base_url'] = $this->config->item('base_url');
|
||||
$view['dest_url'] = $this->session->userdata('dest_url');
|
||||
|
||||
|
@ -18,10 +20,14 @@ class User extends CI_Controller {
|
|||
$view['dest_url'] = $view['base_url'] . 'backend';
|
||||
}
|
||||
|
||||
$view['company_name'] = $this->settings_model->get_setting('company_name');
|
||||
$view['ea_lang'] = $this->lang->language;
|
||||
$this->load->view('user/login', $view);
|
||||
}
|
||||
|
||||
public function logout() {
|
||||
$this->load->model('settings_model');
|
||||
|
||||
$this->session->unset_userdata('user_id');
|
||||
$this->session->unset_userdata('user_email');
|
||||
$this->session->unset_userdata('role_slug');
|
||||
|
@ -29,16 +35,24 @@ class User extends CI_Controller {
|
|||
$this->session->unset_userdata('dest_url');
|
||||
|
||||
$view['base_url'] = $this->config->item('base_url');
|
||||
$view['company_name'] = $this->settings_model->get_setting('company_name');
|
||||
$view['ea_lang'] = $this->lang->language;
|
||||
$this->load->view('user/logout', $view);
|
||||
}
|
||||
|
||||
public function forgot_password() {
|
||||
$this->load->model('settings_model');
|
||||
$view['base_url'] = $this->config->item('base_url');
|
||||
$view['company_name'] = $this->settings_model->get_setting('company_name');
|
||||
$view['ea_lang'] = $this->lang->language;
|
||||
$this->load->view('user/forgot_password', $view);
|
||||
}
|
||||
|
||||
public function no_privileges() {
|
||||
$this->load->model('settings_model');
|
||||
$view['base_url'] = $this->config->item('base_url');
|
||||
$view['company_name'] = $this->settings_model->get_setting('company_name');
|
||||
$view['ea_lang'] = $this->lang->language;
|
||||
$this->load->view('user/no_privileges', $view);
|
||||
}
|
||||
|
||||
|
|
|
@ -160,3 +160,6 @@ $lang['be_delete'] = 'Delete';
|
|||
$lang['be_unexpected_issues'] = 'Unexpected Issues';
|
||||
$lang['be_unexpected_issues_message'] = 'The operation could not complete due to unexpected issues.';
|
||||
$lang['be_close'] = 'Close';
|
||||
$lang['be_page_not_found'] = 'Page Not Found';
|
||||
$lang['be_page_not_found_message'] = 'Unfortunately the page you requested does not exist. Please check your browser URL or head to another location using the buttons below.';
|
||||
$lang['be_error'] = 'Error';
|
|
@ -160,3 +160,6 @@ $lang['be_delete'] = 'Löschen';
|
|||
$lang['be_unexpected_issues'] = 'Unvorhergesene Vorfälle';
|
||||
$lang['be_unexpected_issues_message'] = 'Dieser Vorgang konnte aufgrund unvorgesehener Vorfälle nicht beendet werden.';
|
||||
$lang['be_close'] = 'Schließen';
|
||||
$lang['be_page_not_found'] = 'Seite Nicht Gefunden';
|
||||
$lang['be_page_not_found_message'] = 'Leider ist die von Ihnen angeforderte Seite existiert nicht. Bitte überprüfen Sie Ihre Browser-URL oder navigieren Sie zu einem anderen Ort mit den Tasten unten.';
|
||||
$lang['be_error'] = 'Fehler';
|
|
@ -135,7 +135,7 @@ $lang['be_logout_success'] = 'Έχετε αποσυνδεθεί επιτυχώς
|
|||
$lang['be_book_appointment_title'] = 'Κράτηση Ραντεβού';
|
||||
$lang['be_backend_section'] = 'Τμήμα Backend';
|
||||
$lang['be_you_need_to_login'] = 'Καλώς ήρθατε! Θα χρειαστεί να συνδεθείτε για να δείτε τις σελίδες του backend.';
|
||||
$lang['be_enter_username_here'] = 'Εισάγετε το όνομα χρήστη εδώ ...';
|
||||
$lang['be_enter_username_here'] = 'Εισάγετε το όνομα χρήστη σας εδώ ...';
|
||||
$lang['be_enter_password_here'] = 'Εισάγετε τον κωδικό σας εδώ ...';
|
||||
$lang['be_login'] = 'Σύνδεση';
|
||||
$lang['be_forgot_your_password'] = 'Ξεχάσατε τον κωδικό σας;';
|
||||
|
@ -144,9 +144,9 @@ $lang['be_type_username_and_email_for_new_password'] = 'Εισάγετε το ό
|
|||
$lang['be_enter_email_here'] = 'Εισάγετε το email σας εδώ ...';
|
||||
$lang['be_regenerate_password'] = 'Παραγωγή Κωδικού';
|
||||
$lang['be_go_to_login'] = 'Πλοήγηση Πίσω Στην Σελίδα Σύνδεσης';
|
||||
$lang['be_new_password_sent_with_email'] = 'Ο νέος σας κωδικός έχει αποσταλεί σε εσάς με email.';
|
||||
$lang['be_new_password_sent_with_email'] = 'Ο νέος σας κωδικός έχει αποσταλεί με email.';
|
||||
$lang['be_new_account_password'] = 'Νέος Κωδικός Λογαριασμού';
|
||||
$lang['be_new_password_is'] = 'Ο νέος κωδικός του λογαριασμού σας είναι ........ Παρακαλώ αποθηκεύστε αυτό το email για να μπορείτε να ξαναβρείτε τον κωδικό αν είναι απαραίτητο. Μπορείτε επίσης να αλλάξετε αυτόν τον κωδικό με έναν καινούργιο στην σελίδα των ρυθμίσεων.';
|
||||
$lang['be_new_password_is'] = 'Ο νέος κωδικός του λογαριασμού σας είναι $password. Παρακαλώ αποθηκεύστε αυτό το email για να μπορείτε να ξαναβρείτε τον κωδικό αν είναι απαραίτητο. Μπορείτε επίσης να αλλάξετε αυτόν τον κωδικό με έναν καινούργιο στην σελίδα των ρυθμίσεων.';
|
||||
$lang['be_delete_record_prompt'] = 'Είστε σίγουρος ότι θέλετε να διαγράψετε αυτήν την εγγραφή; Αυτή η ενέργεια δεν μπορεί να αναιρεθεί.';
|
||||
$lang['be_delete_admin'] = 'Διαγραφή Διαχειριστή';
|
||||
$lang['be_delete_customer'] = 'Διαγραφή Πελάτη';
|
||||
|
@ -160,3 +160,6 @@ $lang['be_delete'] = 'Διαγραφή';
|
|||
$lang['be_unexpected_issues'] = 'Απροσδόκητα Ζητήματα';
|
||||
$lang['be_unexpected_issues_message'] = 'Η διαδικασία δεν μπόρεσε να ολοκληρωθεί λόγω απροσδόκητων ζητημάτων.';
|
||||
$lang['be_close'] = 'Κλείσιμο';
|
||||
$lang['be_page_not_found'] = 'Η Σελίδα Δεν Βρέθηκε';
|
||||
$lang['be_page_not_found_message'] = 'Δυστυχώς η σελίδα που ζητήσατε δεν υπάρχει. Παρακαλώ ελέγξτε την διεύθυνση του περιηγητή σας ή πηγαίνετε σε κάποια από τις παρακάτω τοποθεσίες.';
|
||||
$lang['be_error'] = 'Σφάλμα';
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $this->lang->line('fe_appointment_registered') . ' - ' . $company_name; ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<?php // INCLUDE JS FILES ?>
|
||||
|
@ -64,6 +65,8 @@
|
|||
'googleApiScope' : 'https://www.googleapis.com/auth/calendar'
|
||||
};
|
||||
|
||||
var EALang = <?php echo json_encode($ea_lang); ?>;
|
||||
|
||||
$(document).ready(function() {
|
||||
/**
|
||||
* Event: Add Appointment to Google Calendar "Click"
|
||||
|
@ -144,13 +147,12 @@
|
|||
$('#success-frame').append(
|
||||
'<br><br>' +
|
||||
'<div class="alert alert-success">' +
|
||||
'<h4>Success!</h4>' +
|
||||
'<h4>' + EALang['fe_success'] + '</h4>' +
|
||||
'<p>' +
|
||||
'Your appointment has been added to ' +
|
||||
'your Google Calendar account. <br>' +
|
||||
EALang['fe_appointment_added_to_google_calendar'] +
|
||||
'<br>' +
|
||||
'<a href="' + response.htmlLink + '" target="_blank">' +
|
||||
'Click here to view your appointment on Google ' +
|
||||
'Calendar.' +
|
||||
EALang['fe_view_appointment_in_google_calendar'] +
|
||||
'</a>' +
|
||||
'</p>' +
|
||||
'</div>'
|
||||
|
@ -183,13 +185,13 @@
|
|||
<div id="success-frame" class="frame-container">
|
||||
<img id="success-icon" src="<?php echo $this->config->base_url(); ?>assets/images/success.png" />
|
||||
|
||||
<h3>Your appointment has been successfully registered!</h3>
|
||||
<p>An email with the appointment details has been sent to you.</p>
|
||||
<h3><?php echo $this->lang->line('fe_appointment_registered'); ?></h3>
|
||||
<p><?php echo $this->lang->line('fe_appointment_details_was_sent_to_you'); ?></p>
|
||||
|
||||
<?php if ($this->config->item('ea_google_sync_feature')) { ?>
|
||||
<button id="add-to-google-calendar" class="btn btn-primary">
|
||||
<i class="icon-plus icon-white"></i>
|
||||
Add to Google Calendar
|
||||
<?php echo $this->lang->line('fe_add_to_google_calendar'); ?>
|
||||
</button>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $this->lang->line('fe_appointment_cancelled_title'); ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<?php // INCLUDE JS FILES ?>
|
||||
|
@ -48,7 +49,7 @@
|
|||
<div id="success-frame" class="frame-container">
|
||||
<img id="success-icon" src="<?php echo $this->config->base_url(); ?>assets/images/success.png" />
|
||||
|
||||
<h3>Your appointment has been successfully cancelled!</h3>
|
||||
<h3><?php echo $this->lang->line('fe_appointment_cancelled'); ?></h3>
|
||||
|
||||
<?php
|
||||
// Display exceptions (if any).
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $company_name; ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<?php // INCLUDE JS FILES ?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Page Not Found <?php echo $company_name; ?></title>
|
||||
<title><?php echo $this->lang->line('be_page_not_found') . ' - ' . $company_name; ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<?php // INCLUDE JS FILES ?>
|
||||
|
@ -54,23 +54,22 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="message-frame" class="frame-container">
|
||||
<h3>Page Not Found - Error 404</h3>
|
||||
<h3><?php echo $this->lang->line('be_page_not_found')
|
||||
. ' - ' . $this->lang->line('be_error') . ' 404' ?></h3>
|
||||
<p>
|
||||
Unfortunately the page you requested does not exist.
|
||||
Please check your browser URL or head to another location using the
|
||||
buttons below.
|
||||
<?php echo $this->lang->line('be_page_not_found_message'); ?>
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
||||
<a href="<?php echo $this->config->base_url(); ?>" class="btn btn-primary btn-large">
|
||||
<i class="icon-calendar icon-white"></i>
|
||||
Book Appointment
|
||||
<?php echo $this->lang->line('be_book_appointment_title'); ?>
|
||||
</a>
|
||||
|
||||
<a href="<?php echo $this->config->base_url(); ?>backend" class="btn btn-danger btn-large">
|
||||
<i class="icon-wrench icon-white"></i>
|
||||
Backend Section
|
||||
<?php echo $this->lang->line('be_backend_section'); ?>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $this->lang->line('be_forgot_your_password') . ' - ' . $company_name; ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<?php // INCLUDE JS FILES ?>
|
||||
|
@ -63,6 +64,8 @@
|
|||
'AJAX_FAILURE': 'FAILURE'
|
||||
};
|
||||
|
||||
var EALang = <?php echo json_encode($ea_lang); ?>;
|
||||
|
||||
/**
|
||||
* Event: Login Button "Click"
|
||||
*
|
||||
|
@ -91,7 +94,7 @@
|
|||
|
||||
if (response == GlobalVariables.AJAX_SUCCESS) {
|
||||
$('.alert').addClass('alert-success');
|
||||
$('.alert').text('Your new password has been sent to you with an email.');
|
||||
$('.alert').text(EALang['be_new_password_sent_with_email']);
|
||||
} else {
|
||||
$('.alert').text('The operation failed! Please enter a valid username '
|
||||
+ 'and email address in order to get a new password.');
|
||||
|
@ -104,22 +107,26 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="forgot-password-frame" class="frame-container">
|
||||
<h2>Forgot Your Password?</h2>
|
||||
<p>Type your username and your email address to get your new password.</p>
|
||||
<h2><?php echo $this->lang->line('be_forgot_your_password'); ?></h2>
|
||||
<p><?php echo $this->lang->line('be_type_username_and_email_for_new_password'); ?></p>
|
||||
<hr>
|
||||
<div class="alert hidden"></div>
|
||||
<form>
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" placeholder="Enter your username here ..." />
|
||||
<label for="username"><?php echo $this->lang->line('be_username'); ?></label>
|
||||
<input type="text" id="username" placeholder="<?php echo $this->lang->line('be_enter_username_here'); ?>" class="span3" />
|
||||
|
||||
<label for="email">Email</label>
|
||||
<input type="text" id="email" placeholder="Enter your email here ..." />
|
||||
<label for="email"><?php echo $this->lang->line('fe_email'); ?></label>
|
||||
<input type="text" id="email" placeholder="<?php echo $this->lang->line('be_enter_email_here'); ?>" class="span3" />
|
||||
|
||||
<br><br>
|
||||
|
||||
<button type="submit" id="get-new-password" class="btn btn-primary btn-large">Regenerate Password</button>
|
||||
<button type="submit" id="get-new-password" class="btn btn-primary btn-large">
|
||||
<?php echo $this->lang->line('be_regenerate_password'); ?>
|
||||
</button>
|
||||
|
||||
<a href="<?php echo $base_url; ?>user/login" class="user-login">Go Back To Login Page</a>
|
||||
<a href="<?php echo $base_url; ?>user/login" class="user-login">
|
||||
<?php echo $this->lang->line('be_go_to_login'); ?>
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $this->lang->line('be_login') . ' - ' . $company_name; ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<?php // INCLUDE JS FILES ?>
|
||||
|
@ -69,6 +70,8 @@
|
|||
'AJAX_FAILURE': 'FAILURE'
|
||||
};
|
||||
|
||||
var EALang = <?php echo json_encode($ea_lang); ?>;
|
||||
|
||||
/**
|
||||
* Event: Login Button "Click"
|
||||
*
|
||||
|
@ -96,8 +99,7 @@
|
|||
if (response == GlobalVariables.AJAX_SUCCESS) {
|
||||
window.location.href = GlobalVariables.destUrl;
|
||||
} else {
|
||||
$('.alert').text('Login failed, please enter the correct credentials '
|
||||
+ 'and try again.');
|
||||
$('.alert').text(EALang['be_login_failed']);
|
||||
$('.alert').removeClass('hidden');
|
||||
}
|
||||
}, 'json');
|
||||
|
@ -107,22 +109,22 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="login-frame" class="frame-container">
|
||||
<h2>Backend Section</h2>
|
||||
<p>Welcome! You will need to login in order to view backend pages.</p>
|
||||
<h2><?php echo $this->lang->line('be_backend_section'); ?></h2>
|
||||
<p><?php echo $this->lang->line('be_you_need_to_login'); ?></p>
|
||||
<hr>
|
||||
<div class="alert hidden"></div>
|
||||
<form id="login-form">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" placeholder="Enter your username here ..." />
|
||||
<label for="username"><?php echo $this->lang->line('be_username'); ?></label>
|
||||
<input type="text" id="username" placeholder="<?php echo $this->lang->line('be_enter_username_here'); ?>" class="span3" />
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" placeholder="Enter your password here ..." />
|
||||
<label for="password"><?php echo $this->lang->line('be_password'); ?></label>
|
||||
<input type="password" id="password" placeholder="<?php echo $this->lang->line('be_enter_password_here'); ?>" class="span3" />
|
||||
|
||||
<br><br>
|
||||
|
||||
<button type="submit" id="login" class="btn btn-primary btn-large">Login</button>
|
||||
<button type="submit" id="login" class="btn btn-primary btn-large"><?php echo $this->lang->line('be_login'); ?></button>
|
||||
|
||||
<a href="<?php echo $base_url; ?>user/forgot_password" class="forgot-password">Forgot Your Password?</a>
|
||||
<a href="<?php echo $base_url; ?>user/forgot_password" class="forgot-password"><?php echo $this->lang->line('be_forgot_your_password'); ?></a>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $this->lang->line('be_log_out') . ' - ' . $company_name; ?></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
|
||||
<?php // INCLUDE JS FILES ?>
|
||||
|
@ -56,22 +57,21 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="logout-frame" class="frame-container">
|
||||
<h3>Logout</h3>
|
||||
<h3><?php echo $this->lang->line('be_log_out'); ?></h3>
|
||||
<p>
|
||||
You have been successfully logged out! Click on one of the following buttons to
|
||||
navigate to a different page.
|
||||
<?php echo $this->lang->line('be_logout_success'); ?>
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
||||
<a href="<?php echo $this->config->base_url(); ?>" class="btn btn-primary btn-large">
|
||||
<i class="icon-calendar icon-white"></i>
|
||||
Book Appointment
|
||||
<?php echo $this->lang->line('be_book_appointment_title'); ?>
|
||||
</a>
|
||||
|
||||
<a href="<?php echo $this->config->base_url(); ?>backend" class="btn btn-danger btn-large">
|
||||
<i class="icon-home icon-white"></i>
|
||||
Backend Section
|
||||
<?php echo $this->lang->line('be_backend_section'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue