Archived
1
0
Fork 0

Add locales to profile

This commit is contained in:
Ethanell 2020-08-18 17:08:29 +02:00
parent 8b247c9eff
commit d6f30b71d8
4 changed files with 20 additions and 15 deletions

View file

@ -2,7 +2,6 @@
"layout": {
"home": "Home",
"sandwiches": "Sandwiches",
"commands": "Commands",
"administration": "Administration",
"logout": "Logout",
"login": "Login",
@ -32,12 +31,18 @@
},
"register": {
"title": "Register",
"email": "Email",
"submit": "Register"
},
"profile": {
"title": "Profile",
"infos": "Infos",
"save": "Save"
},
"firstName": "First name",
"lastName": "Last name",
"username": "Username",
"password": "Password",
"department": "Department"
"email": "Email",
"department": "Department",
"commands": "Commands"
}

View file

@ -14,7 +14,7 @@ html
a(href="/sandwiches")=__("layout.sandwiches")
if user.permissions >= 2
p -
a(href="/commands")=__("layout.commands")
a(href="/commands")=__("commands")
if user.permissions >= 3
p -
a(href="/admin")=__("layout.administration")

View file

@ -2,36 +2,36 @@ extends layout
block content
div.card
h1 Profile
h1=__("profile.title")
form(action="/profile" method="POST")
h2 Infos
h2=__("profile.infos")
div.field
label(for="username") Username:
label(for="username")=__("username")+":"
input#username(type="text" name="username" value=user.username disabled required)
div.field
label(for="email") Email:
label(for="email")=__("email")+":"
input#email(type="email" name="email" value=user.email required)
div.field
label(for="firstName") First name:
label(for="firstName")=__("firstName")+":"
input#firstName(type="text" name="firstName" value=user.firstName required)
div.field
label(for="lastName") Last name:
label(for="lastName")=__("lastName")+":"
input#lastName(type="text" name="lastName" value=user.lastName required)
div.field
label(for="department") Department:
label(for="department")=__("department")+":"
input#department(type="list" list="department-list" name="department" value=user.DepartmentName required)
div.field
label(for="password") Password:
label(for="password")=__("password")+":"
input#password(type="password" name="password")
div.field
input(type="submit" value="Save")
input(type="submit" value=__("profile.save"))
datalist#department-list
each department in departments
option(value=department.name)
div.card#userCommandList
h1 Commands
h1=__("commands")
each command in commands
div
h2=command.id

View file

@ -7,7 +7,7 @@ block content
label(for="username")=__("username")+":"
input#username(type="text" name="username" required)
div.field
label(for="email")=__("register.email")+":"
label(for="email")=__("email")+":"
input#email(type="email" name="email" required)
div.field
label(for="firstName")=__("firstName")+":"