2019-05-13 22:02:10 +02:00
import { setupLoginModal } from "./setupListeners" ;
export function renderLoginForm ( ) {
const loginModal = document . createElement ( 'section' ) ;
loginModal . classList . add ( 'modal' ) ;
loginModal . id = 'loginModal' ;
loginModal . innerHTML = ` <div class="modal-background"></div>
< div class = "modal-content" > < a class = "close-button" > & times ; & # xFE0E ; < / a >
< section >
< div class = "split two" >
< div >
< h2 > Log In < / h 2 >
< label > Email < br >
2019-05-17 19:39:00 +02:00
< input type = "email" required id = "loginEmail" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Password < br >
2019-05-17 19:39:00 +02:00
< input type = "password" required id = "loginPassword" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< section id = "loginErrorMessages" > < / s e c t i o n >
< a id = "loginSubmit" class = "button" > Log In < / a > < b r >
< a id = "forgotPasswordButton" class = "small button" > Forgot Password ? < / a >
< / d i v >
< div >
< h2 > Create a New Account < / h 2 >
< p > Creating an account allows you to save and switch between as many dictionaries as you need and access them from any device for free ! If you have a dictionary you ' ve been working on loaded already , it will automatically be uploaded to your account when you log in for the first time . < / p >
< p > Plus if you allow us to send you emails , we 'll make sure that you' re the first to hear about any new features that get added or if any of our policies change for any reason . We ' ll never spam you or sell your information . < / p >
< p > By creating an account , you are indicating that you agree to the Terms of Service and that you understand Lexiconga ' s Privacy Policy . < / p >
< label > Email < br >
2019-05-17 19:39:00 +02:00
< input type = "email" id = "createNewEmail" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Password < br >
2019-05-17 19:39:00 +02:00
< input type = "password" id = "createNewPassword" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Confirm Password < br >
2019-05-17 19:39:00 +02:00
< input type = "password" id = "createNewConfirm" maxlength = "100" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Public Name < br >
2019-05-17 19:39:00 +02:00
< input type = "text" id = "createNewPublicName" maxlength = "50" >
2019-05-13 22:02:10 +02:00
< / l a b e l >
< label > Allow Emails
< input type = "checkbox" id = "createNewAllowEmails" >
< / l a b e l >
2019-05-15 01:22:17 +02:00
< section id = "createAccountErrorMessages" > < / s e c t i o n >
2019-05-13 22:02:10 +02:00
< a id = "createAccountSubmit" class = "button" > Create Account < / a >
< / d i v >
< / d i v >
< / s e c t i o n >
< / d i v > ` ;
document . body . appendChild ( loginModal ) ;
setupLoginModal ( loginModal ) ;
}