2020-07-20 17:32:32 +02:00
|
|
|
{% extends 'layouts/base.njk' %}
|
|
|
|
|
|
|
|
{% set title = app.name + ' - Review accounts' %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<h1>Accounts pending review</h1>
|
|
|
|
|
|
|
|
<div class="panel">
|
|
|
|
<table class="data-table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="shrink-col">#</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Main email</th>
|
|
|
|
<th>Registered at</th>
|
|
|
|
<th class="shrink-col">Action</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for user in accounts %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ user.id }}</td>
|
|
|
|
<td>{{ user.name }}</td>
|
2020-07-28 15:03:18 +02:00
|
|
|
<td>{{ user.mainEmail.getOrFail().email | default('No email') }}</td>
|
2020-07-20 17:32:32 +02:00
|
|
|
<td>{{ user.created_at.toISOString() }}</td>
|
|
|
|
<td>
|
|
|
|
<div class="max-content">
|
2020-07-24 13:00:20 +02:00
|
|
|
<form action="{{ route('approve-account') }}" method="POST">
|
|
|
|
<input type="hidden" name="user_id" value="{{ user.id }}">
|
|
|
|
<button class="success"><i data-feather="check"></i> Approve</button>
|
|
|
|
{{ macros.csrf(getCSRFToken) }}
|
|
|
|
</form>
|
2020-07-20 17:32:32 +02:00
|
|
|
|
2020-07-24 13:00:20 +02:00
|
|
|
<form action="{{ route('reject-account') }}" method="POST"
|
2020-07-28 15:03:18 +02:00
|
|
|
data-confirm="This will irrevocably delete the {{ user.mainEmail.getOrFail().email | default(user.name | default(user.id)) }} account.">
|
2020-07-24 13:00:20 +02:00
|
|
|
<input type="hidden" name="user_id" value="{{ user.id }}">
|
|
|
|
<button class="danger"><i data-feather="check"></i> Reject</button>
|
|
|
|
{{ macros.csrf(getCSRFToken) }}
|
|
|
|
</form>
|
2020-07-20 17:32:32 +02:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2020-07-24 13:00:20 +02:00
|
|
|
|
|
|
|
<script>
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
document.querySelectorAll('form[data-confirm]').forEach(el => {
|
|
|
|
el.addEventListener('submit', e => {
|
|
|
|
if (!confirm(el.dataset['confirm'])) {
|
|
|
|
e.preventDefault();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2020-07-20 17:32:32 +02:00
|
|
|
{% endblock %}
|