Implement deleting aliases on account details page
This commit is contained in:
parent
57b712300f
commit
2075aca98b
10 changed files with 158 additions and 46 deletions
|
|
@ -62,34 +62,41 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Aliases</h3>
|
||||
<h3 id="aliases">Aliases</h3>
|
||||
|
||||
{{ include('includes/form_result_box.html.twig') }}
|
||||
|
||||
{% if aliases %}
|
||||
<table class="bordered_table">
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<th>Created at</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{% for alias in aliases %}
|
||||
<form action="/accounts/{{ id }}/deletealiases" method="POST">
|
||||
<table class="bordered_table">
|
||||
<tr>
|
||||
<td>{{ alias.getMailAddress() }}</td>
|
||||
<td>{{ alias.getCreatedAt() | date }}</td>
|
||||
<td><a href="#">Delete</a></td> {# TODO #}
|
||||
<th></th>
|
||||
<th>Address</th>
|
||||
<th>Created at</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% 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">
|
||||
{{ include('includes/form_result_box.html.twig') }}
|
||||
|
||||
<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('') }}"/></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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue