mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 04:55:44 +00:00
Auth forms fix (#3214)
* Improvement and consolidation of various auth forms * Update "disable 2FA" page to use form fields Note: Requires merging of https://github.com/valohai/django-allauth-2fa/pull/135 * Update django-allauth-2fa requirements
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
{{ form|crispy }}
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{% trans 'Authenticate' %}
|
||||
<span class='fas fa-check-circle'></span> {% trans 'Authenticate' %}
|
||||
</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
@ -17,17 +17,23 @@
|
||||
{% trans 'Backup tokens have been generated, but are not revealed here for security reasons. Press the button below to generate new ones.' %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% trans 'No tokens. Press the button below to generate some.' %}
|
||||
{% trans 'No backup tokens are available. Press the button below to generate some.' %}
|
||||
{% endif %}
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-primary w-100">
|
||||
{% trans 'Generate backup tokens' %}
|
||||
</button>
|
||||
<div class='btn-group float-right' role='group'>
|
||||
<button type="submit" class="btn btn-primary w-100">
|
||||
<span class='fas fa-key'></span> {% trans 'Generate Tokens' %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
<a href="{% url 'settings' %}" class="btn btn-secondary w-100 btn-sm">{% trans "Back to settings" %}</a>
|
||||
|
||||
<div>
|
||||
<a type='button' href="{% url 'settings' %}" class="btn btn-secondary">
|
||||
<span class='fas fa-undo-alt'></span> {% trans "Return to Site" %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% extends "account/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load i18n crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<h3>
|
||||
@ -10,9 +10,18 @@
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger w-100">
|
||||
{% trans 'Disable Two-Factor' %}
|
||||
</button>
|
||||
{{ form|crispy }}
|
||||
<hr>
|
||||
<div class='btn-group float-right' role='group'>
|
||||
<button type="submit" class="btn btn-danger w-100">
|
||||
<span class='fas fa-times-circle'></span> {% trans 'Disable 2FA' %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a type='button' href="{% url 'settings' %}" class="btn btn-secondary">
|
||||
<span class='fas fa-undo-alt'></span> {% trans "Return to Site" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -31,12 +31,17 @@
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<button type="submit" class="btn btn-primary btn-block w-100">
|
||||
{% trans 'Verify' %}
|
||||
</button>
|
||||
<hr>
|
||||
<div class='btn-group float-right' role='group'>
|
||||
<button type="submit" class="btn btn-primary btn-block w-100">
|
||||
<span class='fas fa-check-circle'></span> {% trans 'Verify' %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a href="{% url 'settings' %}" class="btn btn-secondary w-100 btn-sm mt-3">{% trans "Back to settings" %}</a>
|
||||
<a type='button' href="{% url 'settings' %}" class="btn btn-secondary">
|
||||
<span class='fas fa-undo-alt'></span> {% trans "Return to Site" %}
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user