Archived
1
0
Fork 0

Profile rework

This commit is contained in:
Ethanell 2020-09-27 21:38:04 +02:00
parent 0fa915dc91
commit 80187cf71f
2 changed files with 47 additions and 40 deletions

View file

@ -10,7 +10,7 @@ block content
select(name="department" required) select(name="department" required)
option(value="" disabled selected hidden)=__("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 selected=user && user.DepartmentName===department.name)=department.name
label=__("department")+":" label=__("department")+":"
div.row div.row

View file

@ -1,44 +1,51 @@
extends layout extends layout
block content block content
div.card div.container
h1=__("profile.title") div.row
form(action="/profile" method="POST") h4=__("profile.title")
h2=__("profile.infos") form(action="/profile" method="POST")
div.field h2=__("profile.infos")
label(for="username")=__("username")+":" div.row
input#username(type="text" name="username" value=user.username disabled required) div.input-field.col.s6
div.field input#username(type="text" name="username" value=user.username disabled required)
label(for="email")=__("email")+":" label(for="username")=__("username")+":"
input#email(type="email" name="email" value=user.email required) div.input-field.col.s6
div.field input#email(type="email" name="email" value=user.email required)
label(for="firstName")=__("firstName")+":" label(for="email")=__("email")+":"
input#firstName(type="text" name="firstName" value=user.firstName required) div.row
div.field div.input-field.col.s6
label(for="lastName")=__("lastName")+":" input#firstName(type="text" name="firstName" value=user.firstName required)
input#lastName(type="text" name="lastName" value=user.lastName required) label(for="firstName")=__("firstName")+":"
div.field div.input-field.col.s6
label(for="department")=__("department")+":" input#lastName(type="text" name="lastName" value=user.lastName required)
+list("department", "department-list", "department", user.DepartmentName, "off", true) label(for="lastName")=__("lastName")+":"
div.field div.row
label(for="password")=__("password")+":" div.input-field.col.s12
input#password(type="password" name="password") select(name="department" required)
div.field each department in departments
input(type="submit" value=__("save")) option(value=department.name selected=department.name===user.DepartmentName)=department.name
label=__("department")+":"
div.row
div.input-field.col.s12
label(for="password")=__("password")+":"
input#password(type="password" name="password")
div.row.center
div.input-field.col.s12
+submit(__("save"))
datalist#department-list if (!user.emailVerified)
each department in departments div.row.center
option(value=department.name) div.input-field.col.s12
a.btn.waves-effect.waves-light.yellow.darken-4(href="/profile/resend")=__("profile.emailCheck")
if (!user.emailVerified) div.container.valign-wrapper
div.field div.row.center
a(href="/profile/resend") h4=__("orders")
input(type="button" value=__("profile.emailCheck")) each order in orders
div.col
div.card#userOrderList div.card.blue-grey
h1=__("orders") div.card-content.white-text
each order in orders span.card-title=order.id
div each sandwich in order.Sandwiches
h2=order.id p #{sandwich.name} - #{sandwich.SandwichOrder.date}
each sandwich in order.Sandwiches
p #{sandwich.name} - #{sandwich.SandwichOrder.date}