109 lines
3.7 KiB
Twig
109 lines
3.7 KiB
Twig
{% extends "base.html.twig" %}
|
|
|
|
{% block title %}View account{% endblock %}
|
|
|
|
{% block content %}
|
|
<h2>Account: {{ accountUsername }}</h2>
|
|
|
|
<p>
|
|
<b>Actions:</b>
|
|
<span>View</span> |
|
|
<a href="/accounts/{{ id }}/edit">Edit</a> |
|
|
<a href="/accounts/{{ id }}/delete">Delete</a> |
|
|
<a href="mailto:{{ accountUsername }}">Send mail</a>
|
|
</p>
|
|
|
|
<h3>View account details</h3>
|
|
|
|
<table class="bordered_table vertical_table_headers">
|
|
<tr>
|
|
<th style="min-width: 10em">User ID</th>
|
|
<td style="min-width: 20em">{{ account.getId() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Username</th>
|
|
<td>{{ account.getUsername() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Domain</th>
|
|
<td><a href="/accounts?domain={{ account.getDomain() | escape('url') }}">{{ account.getDomain() }}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<th>Password</th>
|
|
<td>
|
|
{% if passwordHashType == 'empty' %}
|
|
<span class="red">[No password set]</span>
|
|
{% elseif passwordHashType == 'unknown' %}
|
|
<span class="red">[Not hashed / unknown hash algorithm]</span>
|
|
{% else %}
|
|
<span class="gray">[{{ passwordHashType }} hash]</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Status</th>
|
|
<td>{{ account.isActive() ? '<span class="green">Active</span>' : '<span class="red">Inactive</span>' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Home directory</th>
|
|
<td><span class="gray">/srv/vmail/</span>{{ account.getHomeDir() }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Admin memo</th>
|
|
<td>{{ account.getMemo() | nl2br }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Created at</th>
|
|
<td>{{ account.getCreatedAt() | date }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Last modified at</th>
|
|
<td>{{ account.getModifiedAt() | date }}</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h3 id="aliases">Aliases</h3>
|
|
|
|
{{ include('includes/form_result_box.html.twig') }}
|
|
|
|
{% if aliases %}
|
|
<form action="/accounts/{{ id }}/deletealiases" method="POST">
|
|
<table class="bordered_table">
|
|
<tr>
|
|
<th></th>
|
|
<th>Address</th>
|
|
<th>Created at</th>
|
|
</tr>
|
|
{% for alias in aliases %}
|
|
<tr>
|
|
<td><input type="checkbox" id="delete_selected_{{ alias.getId() }}" name="selected_aliases[]" value="{{ alias.getId() }}"/></td>
|
|
<td><label for="delete_selected_{{ alias.getId() }}">{{ alias.getMailAddress() }}</label></td>
|
|
<td>{{ alias.getCreatedAt() | date }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
<p>
|
|
<button type="submit">Delete selected aliases</button>
|
|
</p>
|
|
</form>
|
|
{% else %}
|
|
<p>No aliases.</p>
|
|
{% endif %}
|
|
|
|
<form action="/accounts/{{ id }}/addalias" method="POST">
|
|
<table class="margin_vertical_1rem">
|
|
<tr>
|
|
<td><label for="add_alias_address">New alias:</label></td>
|
|
<td>
|
|
<input id="add_alias_address" name="alias_address" value="{{ formData['new_alias'] | default('') }}" {{ success is defined or error is defined ? 'autofocus': '' }}/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<button type="submit">Add alias</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
{% endblock %}
|