From 71932197fafbdc28c4f2cd1be80c02811e3bd963 Mon Sep 17 00:00:00 2001 From: Pierre Date: Wed, 11 Apr 2018 15:56:55 +0200 Subject: [PATCH] Add login link on create account page --- assets/css/pages/createAccount.css | 5 ++ assets/js/pages/createAccount.js | 18 ++++++ assets/templates/pages/login/loginPage.tpl | 75 ++++++++++++---------- 3 files changed, 64 insertions(+), 34 deletions(-) diff --git a/assets/css/pages/createAccount.css b/assets/css/pages/createAccount.css index 821feaa1..5eae3f96 100644 --- a/assets/css/pages/createAccount.css +++ b/assets/css/pages/createAccount.css @@ -27,4 +27,9 @@ .create-account-form .submit-form { text-align: center; +} + +.create-account-form .bottom-form-links { + text-align: center; + margin-top: 15px; } \ No newline at end of file diff --git a/assets/js/pages/createAccount.js b/assets/js/pages/createAccount.js index f19d53e5..dc6702e1 100644 --- a/assets/js/pages/createAccount.js +++ b/assets/js/pages/createAccount.js @@ -106,6 +106,24 @@ ComunicWeb.pages.createAccount = { 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 submitButton.onclick = function(){ diff --git a/assets/templates/pages/login/loginPage.tpl b/assets/templates/pages/login/loginPage.tpl index aa993713..6715d276 100644 --- a/assets/templates/pages/login/loginPage.tpl +++ b/assets/templates/pages/login/loginPage.tpl @@ -1,40 +1,47 @@
- - +