Skip to content

Commit d9f3439

Browse files
Add logout url to setup-device template
1 parent d2bc8a7 commit d9f3439

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/hidp/hidp/templates/hidp/otp/setup_device.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,9 @@ <h2>{% translate 'Recovery codes' %}</h2>
6969
{% include 'hidp/includes/forms/submit_row.html' with submit_label=_('Submit') %}
7070
</form>
7171

72-
{% include 'hidp/includes/forms/logout_form.html' with logout_label=_('Back') %}
72+
{% if logout_url %}
73+
{% include 'hidp/includes/forms/logout_form.html' with logout_label=_('Back') %}
74+
{% elif back_url %}
75+
<a href="{{ back_url }}">{% translate 'Back' %}</a>
76+
{% endif %}
7377
{% endblock %}

packages/hidp/hidp/templates/hidp/otp/verify_recovery_code.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ <h1>{% translate 'Two-factor authentication' %}</h1>
1414
</form>
1515

1616
{% include 'hidp/includes/forms/logout_form.html' with logout_label=_('Back') %}
17-
1817
{% endblock %}

0 commit comments

Comments
 (0)