mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-27 03:08:51 +00:00
Translated login page.
This commit is contained in:
parent
cfd671f7e8
commit
df877ed6be
@ -4,7 +4,18 @@
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
ComunicWeb.common.langs.en = {
|
||||
|
||||
//Error messages
|
||||
"__fatal_error": "Fatal error",
|
||||
"__fatal_error_explanation": "A fatal error occured : <i>%p</i>. Please try to refresh the page...",
|
||||
|
||||
//Login form
|
||||
_login_page_top_msg: "Login to your Comunic account.",
|
||||
_login_page_remember_me: "Rememeber me",
|
||||
_login_page_email_placeholder: "Email",
|
||||
_login_page_password_placeholder: "Password",
|
||||
_login_page_submit: "Sign In",
|
||||
_login_page_error_head: "Login failed",
|
||||
_login_page_error_message: "Please check your usermail and password !",
|
||||
_login_page_bad_input: "Please check what you've typed !",
|
||||
}
|
@ -4,7 +4,18 @@
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
ComunicWeb.common.langs.fr = {
|
||||
|
||||
//Error messages
|
||||
"__fatal_error": "Erreur fatale",
|
||||
"__fatal_error_explanation": "Une erreur fatale a survenue : <i>%p</i>. Veuillez réessayer de recharger la page...",
|
||||
|
||||
//Login form
|
||||
_login_page_top_msg: "Connectez-vous à votre compte Comunic.",
|
||||
_login_page_remember_me: "Se souvenir de moi",
|
||||
_login_page_email_placeholder: "Email",
|
||||
_login_page_password_placeholder: "Mot de passe",
|
||||
_login_page_submit: "Connexion",
|
||||
_login_page_error_head: "La connexion a échouée",
|
||||
_login_page_error_message: "Veuillez vérifier votre identifiant et votre mot de passe !",
|
||||
_login_page_bad_input: "Veuillez vérifier votre saisie...",
|
||||
}
|
@ -31,10 +31,19 @@ ComunicWeb.pages.login = {
|
||||
}
|
||||
|
||||
//Prepare additional data
|
||||
var additionalTemplateData = {};
|
||||
var additionalTemplateData = {
|
||||
|
||||
//Apply translations
|
||||
"login_top_msg": lang("_login_page_top_msg"),
|
||||
"_login_page_remember_me": lang("_login_page_remember_me"),
|
||||
"email": lang("_login_page_email_placeholder"),
|
||||
"password": lang("_login_page_password_placeholder"),
|
||||
"sign_in": lang("_login_page_submit"),
|
||||
};
|
||||
|
||||
//Preparing next actions
|
||||
var afterParsingTemplate = function(){
|
||||
|
||||
//Change body class name
|
||||
document.body.className = "login-page hold-transition";
|
||||
|
||||
@ -92,7 +101,7 @@ ComunicWeb.pages.login = {
|
||||
ComunicWeb.common.formChecker.checkInput(userpasswordInput, true) //Check password input
|
||||
)){
|
||||
//Error notification
|
||||
ComunicWeb.common.notificationSystem.showNotification("Please check what you've typed !", "error");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("_login_page_bad_input"), "error");
|
||||
|
||||
//Stop function execution
|
||||
return false;
|
||||
@ -137,7 +146,7 @@ ComunicWeb.pages.login = {
|
||||
*/
|
||||
displayLoginError: function(){
|
||||
//Create error modal
|
||||
errorMessageElem = ComunicWeb.common.messages.createCalloutElem("Login failed", "Please check your usermail and password", "danger");
|
||||
errorMessageElem = ComunicWeb.common.messages.createCalloutElem(lang("_login_page_error_head"), lang("_login_page_error_message"), "danger");
|
||||
|
||||
//Apply error modal
|
||||
document.getElementById('loginMessagesTarget').innerHTML = "";
|
||||
|
@ -6,31 +6,31 @@
|
||||
<div class="login-box-body">
|
||||
|
||||
<!-- Login message -->
|
||||
<p class="login-box-msg">Login to your Comunic account.</p>
|
||||
<p class="login-box-msg">{login_top_msg}</p>
|
||||
|
||||
<!-- Optionnal messages target -->
|
||||
<div id="loginMessagesTarget"></div>
|
||||
|
||||
<form id="loginForm" action="javascript:(function(){})();">
|
||||
<div class="form-group has-feedback">
|
||||
<input type="email" class="form-control" placeholder="Email" id="usermail" />
|
||||
<input type="email" class="form-control" placeholder="{email}" id="usermail" />
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="form-group has-feedback">
|
||||
<input type="password" class="form-control" placeholder="Password" id="userpassword" />
|
||||
<input type="password" class="form-control" placeholder="{password}" id="userpassword" />
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-8">
|
||||
<div class="checkbox icheck">
|
||||
<label>
|
||||
<input type="checkbox" id="rememberLogin" checked /> Remember Me
|
||||
<input type="checkbox" id="rememberLogin" checked /> {_login_page_remember_me}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-xs-4">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat btn-login">Sign In</button>
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat btn-login">{sign_in}</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user