mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-29 15:26:27 +00:00
Translated create account page.
This commit is contained in:
parent
a389d731c2
commit
ec7abaaf14
@ -83,4 +83,19 @@ ComunicWeb.common.langs.en = {
|
|||||||
form_create_account_last_name_placeholder: "Your last name",
|
form_create_account_last_name_placeholder: "Your last name",
|
||||||
form_create_account_email_address_label: "Email address <small><i class='fa fa-warning'></i> Warning! You will not be able to change this later !</small>",
|
form_create_account_email_address_label: "Email address <small><i class='fa fa-warning'></i> Warning! You will not be able to change this later !</small>",
|
||||||
form_create_account_email_address_placeholder: "Your email address",
|
form_create_account_email_address_placeholder: "Your email address",
|
||||||
|
form_create_account_password_label: "Password",
|
||||||
|
form_create_account_password_placeholder: "Your password",
|
||||||
|
form_create_account_confirm_password_label: "Confirm your password",
|
||||||
|
form_create_account_confirm_password_placeholder: "Your password",
|
||||||
|
form_create_account_terms_label: "I have read and accepted the <a href='%p' target='_blank'>terms of use of the network</a>",
|
||||||
|
form_create_account_submit: "Create the account",
|
||||||
|
form_create_account_login_with_existing: "Login with an existing account",
|
||||||
|
form_create_account_err_need_accept_terms: "Please read and accept the terms of use of the website!",
|
||||||
|
form_create_account_err_need_first_name: "Please check your first name !",
|
||||||
|
form_create_account_err_check_last_name: "Please check your last name !",
|
||||||
|
form_create_account_err_check_email_address: "Please check your email address !",
|
||||||
|
form_create_account_err_check_password: "Please check your password !",
|
||||||
|
form_create_account_err_passwd_differents: "The two passwords are not the same !",
|
||||||
|
form_create_account_err_create_account_message: "An error occured while trying to create your account. It is most likely to be a server error, or the given email address is already associated with an account.",
|
||||||
|
form_create_account_err_create_account_title: "Account creation failed",
|
||||||
}
|
}
|
@ -80,23 +80,23 @@ ComunicWeb.pages.createAccount = {
|
|||||||
//Input user password
|
//Input user password
|
||||||
var passwordInput = createFormGroup({
|
var passwordInput = createFormGroup({
|
||||||
target: formRoot,
|
target: formRoot,
|
||||||
label: "Password",
|
label: lang("form_create_account_password_label"),
|
||||||
placeholder: "Your password",
|
placeholder: lang("form_create_account_password_placeholder"),
|
||||||
type: "password"
|
type: "password"
|
||||||
});
|
});
|
||||||
|
|
||||||
//Confirm user password
|
//Confirm user password
|
||||||
var confirmPasswordInput = createFormGroup({
|
var confirmPasswordInput = createFormGroup({
|
||||||
target: formRoot,
|
target: formRoot,
|
||||||
label: "Confirm your password",
|
label: lang("form_create_account_confirm_password_label"),
|
||||||
placeholder: "Your password",
|
placeholder: lang("form_create_account_confirm_password_placeholder"),
|
||||||
type: "password"
|
type: "password"
|
||||||
});
|
});
|
||||||
|
|
||||||
//Terms of use must have been accepted
|
//Terms of use must have been accepted
|
||||||
var siteTerms = createFormGroup({
|
var siteTerms = createFormGroup({
|
||||||
target: formRoot,
|
target: formRoot,
|
||||||
label: "I have read and accepted the <a href='"+ComunicWeb.__config.aboutWebsiteURL+"about/terms/' target='_blank'>terms of use of the network</a>",
|
label: lang("form_create_account_terms_label", [ComunicWeb.__config.aboutWebsiteURL+"about/terms/"]),
|
||||||
type: "checkbox"
|
type: "checkbox"
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ ComunicWeb.pages.createAccount = {
|
|||||||
appendTo: submitButtonContainer,
|
appendTo: submitButtonContainer,
|
||||||
type: "button",
|
type: "button",
|
||||||
class: "btn btn-primary",
|
class: "btn btn-primary",
|
||||||
innerHTML: "Create the account"
|
innerHTML: lang("form_create_account_submit")
|
||||||
});
|
});
|
||||||
|
|
||||||
//Add bottom links area
|
//Add bottom links area
|
||||||
@ -124,7 +124,7 @@ ComunicWeb.pages.createAccount = {
|
|||||||
var loginLink = createElem2({
|
var loginLink = createElem2({
|
||||||
appendTo: bottomLinks,
|
appendTo: bottomLinks,
|
||||||
type: "a",
|
type: "a",
|
||||||
innerHTML: "Login with an existing account"
|
innerHTML: lang("form_create_account_login_with_existing")
|
||||||
});
|
});
|
||||||
loginLink.onclick = function(){
|
loginLink.onclick = function(){
|
||||||
openPage("login");
|
openPage("login");
|
||||||
@ -139,27 +139,27 @@ ComunicWeb.pages.createAccount = {
|
|||||||
|
|
||||||
//Check the terms of use have been accepted
|
//Check the terms of use have been accepted
|
||||||
if(!siteTerms.checked)
|
if(!siteTerms.checked)
|
||||||
return notify("Please read and accept the terms of use of the website!", "danger");
|
return notify(lang("form_create_account_err_need_accept_terms"), "danger");
|
||||||
|
|
||||||
//Check the first name
|
//Check the first name
|
||||||
if(!ComunicWeb.common.formChecker.checkInput(firstNameInput, true))
|
if(!ComunicWeb.common.formChecker.checkInput(firstNameInput, true))
|
||||||
return notify("Please check your first name !", "danger");
|
return notify(lang("form_create_account_err_need_first_name"), "danger");
|
||||||
|
|
||||||
//Check the last name
|
//Check the last name
|
||||||
if(!ComunicWeb.common.formChecker.checkInput(lastNameInput, true))
|
if(!ComunicWeb.common.formChecker.checkInput(lastNameInput, true))
|
||||||
return notify("Please check your last name !", "danger");
|
return notify(lang("form_create_account_err_check_last_name"), "danger");
|
||||||
|
|
||||||
//Check the email address
|
//Check the email address
|
||||||
if(!ComunicWeb.common.formChecker.checkInput(emailInput, true))
|
if(!ComunicWeb.common.formChecker.checkInput(emailInput, true))
|
||||||
return notify("Please check your email address !", "danger");
|
return notify(lang("form_create_account_err_check_email_address"), "danger");
|
||||||
|
|
||||||
//Check the password
|
//Check the password
|
||||||
if(!ComunicWeb.common.formChecker.checkInput(passwordInput, true))
|
if(!ComunicWeb.common.formChecker.checkInput(passwordInput, true))
|
||||||
return notify("Please check your password !", "danger");
|
return notify(lang("form_create_account_err_check_password"), "danger");
|
||||||
|
|
||||||
//Check the confirmation password
|
//Check the confirmation password
|
||||||
if(passwordInput.value != confirmPasswordInput.value)
|
if(passwordInput.value != confirmPasswordInput.value)
|
||||||
return notify("The two passwords are not the same !", "danger");
|
return notify(lang("form_create_account_err_passwd_differents"), "danger");
|
||||||
|
|
||||||
//Lock create account button
|
//Lock create account button
|
||||||
submitButton.disabled = true;
|
submitButton.disabled = true;
|
||||||
@ -179,8 +179,8 @@ ComunicWeb.pages.createAccount = {
|
|||||||
if(response.error){
|
if(response.error){
|
||||||
//Display an error
|
//Display an error
|
||||||
messagesTarget.appendChild(ComunicWeb.common.messages.createCalloutElem(
|
messagesTarget.appendChild(ComunicWeb.common.messages.createCalloutElem(
|
||||||
"Account creation failed",
|
lang("form_create_account_err_create_account_title"),
|
||||||
"An error occured while trying to create your account. It is most likely to be a server error, or the given email address is already associated with an account.",
|
lang("form_create_account_err_create_account_message"),
|
||||||
"danger"
|
"danger"
|
||||||
));
|
));
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user