Only show archive user link for active users

This commit is contained in:
Katie Smith
2019-06-05 11:25:27 +01:00
parent f57f8641ad
commit a6f5abbf7e
3 changed files with 49 additions and 11 deletions

View File

@@ -38,11 +38,13 @@
{{ user.failed_login_count }} failed login attempts
</p>
{% endif %}
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<a href="{{ url_for('main.archive_user', user_id=user.id) }}">
Archive user
</a>
</span>
{% if user.state == 'active' %}
<span class="page-footer-delete-link page-footer-delete-link-without-button">
<a href="{{ url_for('main.archive_user', user_id=user.id) }}">
Archive user
</a>
</span>
{% endif %}
</div>
</div>
{% endblock %}