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",
"payment": "Payment method",
"creditCard": "Credit card",
"chooseDepartment": "Choose your department",
"chooseSandwich": "Choose your sandwich"
},
"login": {
@ -94,5 +93,6 @@
"sandwich": "Sandwich",
"contact": "Contact",
"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",
"payment": "Mode de paiement",
"creditCard": "CB",
"chooseDepartment": "Choisissez votre département",
"chooseSandwich": "Choisissez votre sandwiche"
},
"login": {
@ -95,5 +94,6 @@
"contact": "Contact",
"messageSend": "Le message a bien été envoyé",
"forgetPassword": "Mot de passe oublié",
"send": "send"
"send": "send",
"chooseDepartment": "Choisissez votre département"
}

View file

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

View file

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

View file

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

View file

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