Archived
1
0
Fork 0

Login, register & forget rework

This commit is contained in:
Ethanell 2020-09-27 20:58:21 +02:00
parent 351e7426ff
commit 0fa915dc91
6 changed files with 78 additions and 62 deletions

View file

@ -32,7 +32,6 @@
"pay": "Pay", "pay": "Pay",
"payment": "Payment method", "payment": "Payment method",
"creditCard": "Credit card", "creditCard": "Credit card",
"chooseDepartment": "Choose your department",
"chooseSandwich": "Choose your sandwich" "chooseSandwich": "Choose your sandwich"
}, },
"login": { "login": {
@ -94,5 +93,6 @@
"sandwich": "Sandwich", "sandwich": "Sandwich",
"contact": "Contact", "contact": "Contact",
"messageSend": "The message has been sent", "messageSend": "The message has been sent",
"forgetPassword": "Forgot your password" "forgetPassword": "Forgot your password",
"chooseDepartment": "Choose your department"
} }

View file

@ -32,7 +32,6 @@
"pay": "Payer", "pay": "Payer",
"payment": "Mode de paiement", "payment": "Mode de paiement",
"creditCard": "CB", "creditCard": "CB",
"chooseDepartment": "Choisissez votre département",
"chooseSandwich": "Choisissez votre sandwiche" "chooseSandwich": "Choisissez votre sandwiche"
}, },
"login": { "login": {
@ -95,5 +94,6 @@
"contact": "Contact", "contact": "Contact",
"messageSend": "Le message a bien été envoyé", "messageSend": "Le message a bien été envoyé",
"forgetPassword": "Mot de passe oublié", "forgetPassword": "Mot de passe oublié",
"send": "send" "send": "send",
"chooseDepartment": "Choisissez votre département"
} }

View file

@ -1,20 +1,26 @@
extends layout extends layout
block content block content
div.card div.container
h1=__("forgetPassword") div.row
h3=__("forgetPassword")
if (!token) if (!token)
form(action="/forget" method="POST") form(action="/forget" method="POST")
div.field div.row
label(for="email")=__("email") div.input-field.col.s12
input#email(type="email" name="email" required) input#email(type="email" name="email" required)
div.field label(for="email")=__("email")
+submit(value=__("send")) div.row
div.input-field.col.s12
+submit(__("send"))
else else
form(action="/forget" method="POST") form(action="/forget" method="POST")
div.row
input(type="hidden" name="token" value=token) input(type="hidden" name="token" value=token)
div.field div.row
label(for="password")=__("password") div.input-field.col.s12
input#password(type="password" name="password" required) input#password(type="password" name="password" required)
div.field label(for="password")=__("password")
+submit(value=__("send")) div.row
div.input-field.col.s12
+submit(__("send"))

View file

@ -8,7 +8,7 @@ block content
div.row div.row
div.input-field.col.s12 div.input-field.col.s12
select(name="department" required) select(name="department" required)
option(value="" disabled selected hidden)=__("index.chooseDepartment") option(value="" disabled selected hidden)=__("chooseDepartment")
each department in departments each department in departments
option(value=department.name)=department.name option(value=department.name)=department.name
label=__("department")+":" label=__("department")+":"

View file

@ -1,18 +1,22 @@
extends layout extends layout
block content block content
div.card div.container
div.row
form(action="/login" method="POST") form(action="/login" method="POST")
h1=__("login.title") h3=__("login.title")
div.field div.row
label(for="username")=__("username")+":" div.input-field.col.s12
input#username(type="text" name="username" required) input#username(type="text" name="username" required)
div.field label(for="username")=__("username")+":"
label(for="password")=__("password")+":" div.row
div.input-field.col.s12
input#password(type="password" name="password" required) input#password(type="password" name="password" required)
div.field label(for="password")=__("password")+":"
+submit(value=__("login.submit")) div.row.center
div.input-field.col.s12
+submit(__("login.submit"))
div.field div.row.center
a(href="/forget") div.input-field.col.s12
input(type="button" value=__("forgetPassword")) a.btn.waves-effect.waves-light.red(href="/forget")=__("forgetPassword")

View file

@ -1,29 +1,35 @@
extends layout extends layout
block content block content
form.card(action="/register" method="POST") div.container
h1=__("register.title") div.row
div.field form(action="/register" method="POST")
label(for="username")=__("username")+":" h3=__("register.title")
div.row
div.input-field.col.s6
input#username(type="text" name="username" required) input#username(type="text" name="username" required)
div.field label(for="username")=__("username")+":"
label(for="email")=__("email")+":" div.input-field.col.s6
input#email(type="email" name="email" required) input#email(type="email" name="email" required)
div.field label(for="email")=__("email")+":"
label(for="firstName")=__("firstName")+":" div.row
div.input-field.col.s6
input#firstName(type="text" name="firstName" required) input#firstName(type="text" name="firstName" required)
div.field label(for="firstName")=__("firstName")+":"
label(for="lastName")=__("lastName")+":" div.input-field.col.s6
input#lastName(type="text" name="lastName" required) input#lastName(type="text" name="lastName" required)
div.field label(for="lastName")=__("lastName")+":"
label(for="department")=__("department")+":" div.row
+list("department", "department-list", "department", "", "off", true) div.input-field.col.s12
div.field select(name="department" required)
label(for="password")=__("password")+":" option(value="" disabled selected hidden)=__("chooseDepartment")
input#password(type="password" name="password" required)
div.field
+submit(value=__("register.submit"))
datalist#department-list
each department in departments each department in departments
option(value=department.name) option(value=department.name)=department.name
label=__("department")+":"
div.row
div.input-field.col.s12
input#password(type="password" name="password" required)
label(for="password")=__("password")+":"
div.row.center
div.input-field.col.s12
+submit(__("register.submit"))