@@ -12,6 +12,8 @@ block content
|
||||
input.form-control(type="text", name="username", placeholder="Username", autofocus)
|
||||
.form-group
|
||||
input.form-control(type="password", name="password", placeholder="Password")
|
||||
.form-group
|
||||
a(href=getUrl('passwordForgotten')) Forgot your password ?
|
||||
.form-group
|
||||
input.btn.btn-primary.form-control(type="submit", value="Log in")
|
||||
.col
|
||||
|
||||
12
controllers/auth/templates/passwordForgotten.pug
Normal file
12
controllers/auth/templates/passwordForgotten.pug
Normal file
@@ -0,0 +1,12 @@
|
||||
extends ../../../templates/base.pug
|
||||
|
||||
block content
|
||||
.row
|
||||
.col
|
||||
.col
|
||||
form(method="POST", action=getUrl("passwordForgottenTarget"))
|
||||
.form-group
|
||||
input.form-control(type="text", name="email", placeholder="Enter your email address", autofocus)
|
||||
.form-group
|
||||
input.btn.btn-primary.form-control(type="submit", value="Request a new password")
|
||||
.col
|
||||
32
controllers/auth/templates/resetPassword.pug
Normal file
32
controllers/auth/templates/resetPassword.pug
Normal file
@@ -0,0 +1,32 @@
|
||||
extends ../../../templates/base.pug
|
||||
block content
|
||||
.row
|
||||
.col
|
||||
.col
|
||||
form(method="POST", action=getUrl("resetPasswordTarget"))
|
||||
input(style="display:none;", type="text", name="activationKey", value=user.activationKey)
|
||||
.form-group
|
||||
input#pass1.form-control(type='password', name='password', placeholder='Password')
|
||||
.form-group
|
||||
input#pass2.form-control(type='password', placeholder='Retype your password')
|
||||
.form-group
|
||||
input.btn.btn-primary.form-control(type='submit', value='Change your password')
|
||||
.col
|
||||
|
||||
block extrajs
|
||||
script.
|
||||
var mail = document.getElementById('email'),
|
||||
pass = document.getElementById('pass1'),
|
||||
pass2 = document.getElementById('pass2');
|
||||
|
||||
function validatePasswords() {
|
||||
if (pass1.value === pass2.value) {
|
||||
pass2.setCustomValidity('');
|
||||
} else {
|
||||
pass2.setCustomValidity("Passwords don't match");
|
||||
}
|
||||
}
|
||||
|
||||
pass1.addEventListener('change', validatePasswords);
|
||||
pass2.addEventListener('keyup', validatePasswords);
|
||||
|
||||
50
controllers/auth/templates/resetPasswordMail.pug
Normal file
50
controllers/auth/templates/resetPasswordMail.pug
Normal file
@@ -0,0 +1,50 @@
|
||||
style.
|
||||
.body {
|
||||
width: 570px;
|
||||
padding: 0px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
border: solid;
|
||||
border-width: thin;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 10px;
|
||||
border-bottom: solid;
|
||||
border-bottom-width: thin;
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 75%;
|
||||
padding: 10px;
|
||||
border-top: solid;
|
||||
border-top-width: thin;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 10px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.username {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.body
|
||||
.header
|
||||
h1 Welcome on ADEjs!
|
||||
p.
|
||||
Hello #{user.username}!
|
||||
p.
|
||||
You recently told us that you lost your password.
|
||||
p.
|
||||
To set a new password, please visit <a href="#{resetUrl}">visit this link</a>.
|
||||
|
||||
.footer.
|
||||
If you did not subscribe on PyADE with this email address, please ignore this e-mail.
|
||||
8
controllers/auth/templates/resetPasswordMailWasSent.pug
Normal file
8
controllers/auth/templates/resetPasswordMailWasSent.pug
Normal file
@@ -0,0 +1,8 @@
|
||||
extends ../../../templates/base.pug
|
||||
|
||||
block content
|
||||
h1 A mail was sent to you
|
||||
p.
|
||||
In this mail, you'll find a link to reset your account.
|
||||
p.
|
||||
Please, don't forget that my server is cheap, so depending on your mail provider, my email might get thrown in the spam :'(
|
||||
Reference in New Issue
Block a user