mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
2FA: Allow to delete devices
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{% extends "pretixcontrol/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% block title %}{% trans "Delete a two-factor authentication device" %}{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{% trans "Delete a two-factor authentication device" %}</h1>
|
||||
<form action="" method="post" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
<p>{% blocktrans trimmed with device=device.name %}
|
||||
Are you sure you want to delete the authentication device "{{ device }}"?
|
||||
{% endblocktrans %}</p>
|
||||
<p>{% trans "You will no longer be able to use this device to log in to pretix." %}</p>
|
||||
<p>
|
||||
{% trans "If this is the only device connected to your account, we will disable two-factor authentication." %}
|
||||
</p>
|
||||
<div class="form-group submit-group">
|
||||
<a href="{% url "control:user.settings.2fa" %}" class="btn btn-default btn-cancel">
|
||||
{% trans "Cancel" %}
|
||||
</a>
|
||||
<button type="submit" class="btn btn-danger btn-save">
|
||||
{% trans "Delete" %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -48,7 +48,11 @@
|
||||
<ul class="list-group">
|
||||
{% for d in devices %}
|
||||
<li class="list-group-item">
|
||||
{% if d.devicetype == "totp" %}
|
||||
<a class="btn btn-danger btn-xs pull-right"
|
||||
href="{% url "control:user.settings.2fa.delete" devicetype=d.devicetype device=d.pk %}">
|
||||
Delete
|
||||
</a>
|
||||
{% if d.devicetype == "totp" %}
|
||||
<span class="fa fa-mobile"></span>
|
||||
{% endif %}
|
||||
{{ d.name }}
|
||||
|
||||
Reference in New Issue
Block a user