core: only show user delete button if an unenrollment flow exists

This commit is contained in:
Jens Langhammer
2020-05-23 20:22:23 +02:00
parent 052bf88c3d
commit d4fa60f509
2 changed files with 13 additions and 0 deletions

View File

@ -17,7 +17,9 @@
<div class="pf-c-form__horizontal-group">
<div class="pf-c-form__actions">
<input class="pf-c-button pf-m-primary" type="submit" value="{% trans 'Update' %}" />
{% if unenrollment_enabled %}
<a class="pf-c-button pf-m-danger" href="{% url 'passbook_flows:default-unenrollment' %}?back={{ request.get_full_path }}">{% trans "Delete account" %}</a>
{% endif %}
</div>
</div>
</div>