Add login link on create account page

This commit is contained in:
Pierre 2018-04-11 15:56:55 +02:00
parent b61b27736c
commit 71932197fa
3 changed files with 64 additions and 34 deletions

View File

@ -27,4 +27,9 @@
.create-account-form .submit-form { .create-account-form .submit-form {
text-align: center; text-align: center;
}
.create-account-form .bottom-form-links {
text-align: center;
margin-top: 15px;
} }

View File

@ -106,6 +106,24 @@ ComunicWeb.pages.createAccount = {
innerHTML: "Create the account" innerHTML: "Create the account"
}); });
//Add bottom links area
var bottomLinks = createElem2({
appendTo: formRoot,
type: "div",
class: "bottom-form-links"
});
//Create a link to redirect to the login page
var loginLink = createElem2({
appendTo: bottomLinks,
type: "a",
innerHTML: "Login with an existing account"
});
loginLink.onclick = function(){
openPage("login");
}
//Make the form lives //Make the form lives
submitButton.onclick = function(){ submitButton.onclick = function(){

View File

@ -1,40 +1,47 @@
<!-- Login form --> <!-- Login form -->
<div class="login-box"> <div class="login-box">
<div class="login-logo"> <div class="login-logo">
<a target="home"><b>Comunic</b></a> <a target="home"><b>Comunic</b></a>
</div> </div>
<div class="login-box-body"> <div class="login-box-body">
<!-- Login message --> <!-- Login message -->
<p class="login-box-msg">{login_top_msg}</p> <p class="login-box-msg">{login_top_msg}</p>
<!-- Optionnal messages target --> <!-- Optionnal messages target -->
<div id="loginMessagesTarget"></div> <div id="loginMessagesTarget"></div>
<form id="loginForm" action="javascript:(function(){})();"> <form id="loginForm" action="javascript:(function(){})();">
<div class="form-group has-feedback"> <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> <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback"> <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> <span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div> </div>
<div class="row"> <div class="row">
<div class="col-xs-8"> <div class="col-xs-8">
<div class="checkbox icheck"> <div class="checkbox icheck">
<label> <label>
<input type="checkbox" id="rememberLogin" checked /> {_login_page_remember_me} <input type="checkbox" id="rememberLogin" checked /> {_login_page_remember_me}
</label> </label>
</div> </div>
</div> </div>
<!-- /.col --> <!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat btn-login">{sign_in}</button> <!-- Submit button -->
</div> <div class="col-xs-4">
<!-- /.col --> <button type="submit" class="btn btn-primary btn-block btn-flat btn-login">{sign_in}</button>
</div> </div>
</form>
</div> <!-- /.col -->
<!-- /.login-box-body --> </div>
</form>
<!-- Create an account -->
<a target="create_account">Create an account</a>
</div>
<!-- /.login-box-body -->
</div> </div>