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

View file

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

View file

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

View file

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