{% import "macros/groups.twig" as grpmac %}
<h2>{{ __("Edit User Account") }}</h2>
<form method="post">{{ form_token() }}
<div class="table full-width table-pad-1">
<div class="table-row">
<div class="table-cell table-label">
{{ __("Username") }}:
</div>
<div class="table-cell">
<input
class="full-width"
name="username"
title="{{ __("Username")|e('html_attr') }}"
type="text"
value="{{ user.username|e("html_attr") }}"
/>
</div>
</div>
<div class="table-row">
<div class="table-cell table-label">
{{ __("Unique ID") }}:
</div>
<div class="table-cell">
<input
class="full-width"
name="uniqueid"
title="{{ __("Unique ID")|e('html_attr') }}"
type="text"
value="{{ user.uniqueid|e("html_attr") }}"
/>
</div>
</div>
<div class="table-row">
<div class="table-cell table-label">
{{ __("Change Passphrase") }}:
</div>
<div class="table-cell">
<input
class="full-width"
id="password"
name="passphrase"
placeholder="{{ __("Optional")|e('html_attr') }}"
type="password"
/>
<div id="password_feedback" class="text-shadow"></div>
</div>
</div>
<div class="table-row">
<div class="table-cell table-label">
{{ __("Display Name") }}:
</div>
<div class="table-cell">
<input
class="full-width"
name="display_name"
title="{{ __("Display Name")|e('html_attr') }}"
type="text"
value="{{ user.display_name|e("html_attr") }}"
/>
</div>
</div>
<div class="table-row">
<div class="table-cell table-label">
{{ __("Real Name") }}:
</div>
<div class="table-cell">
<input
class="full-width"
name="real_name"
title="{{ __("Real Name")|e('html_attr') }}"
type="text"
value="{{ user.real_name|e("html_attr") }}"
/>
</div>
</div>
<div class="table-row">
<div class="table-cell table-label">
{{ __("Email Address") }}:
</div>
<div class="table-cell">
<input
class="full-width"
name="email"
title="{{ __("Email Address")|e('html_attr') }}"
type="text"
value="{{ user.email|e("html_attr") }}"
/>
</div>
</div>
<div class="table-row">
<div class="table-cell table-label align-top">
{{ __("Groups") }}:
</div>
<div class="table-cell">
<select
class="treeselect full-width tall-select"
id="users_groups"
multiple="multiple"
name="groups[]"
title="{{ __("Groups") }}"
>
{% for grp in groups %}
{{ grpmac.selectBox(
grp,
user.groups
) }}
{% endfor %}
</select>
</div>
</div>
<div class="table-row">
<div class="table-cell table-label align-top">
{{ __("Custom Profile Fields (JSON)") }}:
</div>
<div class="table-cell">
<textarea
class="full-width full-textarea"
title="{{ __("Custom Profile Fields (JSON)")|e('html_attr') }}"
name="custom_fields"
>{{
user.custom_fields|default([])|json_encode(constant("JSON_PRETTY_PRINT"))
}}</textarea>
</div>
</div>
<div class="table-row">
<div class="table-cell table-label"></div>
<div class="table-cell">
<button type="submit" class="pure-button pure-button-primary">
{{ __("Update Account Information") }}
</button>
<a class="pure-button pure-button-tertiary" href="{{ cabin_url() }}crew/users">
{{ __("Cancel") }}
</a>
</div>
</div>
</div>
</form>
|