extends ../../layout
block content
div.card#sandwichesManagement
h1=__("admin.edit")+" "+targetUser.username
form(action="/admin/users/edit" method="POST")
h2=__("profile.infos")
input.hide(type="text" name="oldUsername" value=targetUser.username required)
div.field
label(for="username")=__("username") + ":"
input#username(type="text" name="username" value=targetUser.username required)
label(for="email")=__("email") + ":"
input#email(type="email" name="email" value=targetUser.email required)
label(for="firstName")=__("firstName") + ":"
input#firstName(type="text" name="firstName" value=targetUser.firstName required)
label(for="lastName")=__("lastName") + ":"
input#lastName(type="text" name="lastName" value=targetUser.lastName required)
label(for="department")=__("department") + ":"
+list("department", "department-list", "department", targetUser.DepartmentName, "off", true)
label(for="password")=__("password") + ":"
input#password(type="password" name="password")
label(for="permissions")=__("admin.permissions")
input#permissions(type="number" min="0" max="3" value=targetUser.permissions name="permissions")
input(type="submit" value=__("save"))
datalist#department-list
each department in departments
option(value=department.name)