SuperSeller3000/templates/totp/manage.html.twig

23 lines
1,019 B
Twig
Raw Normal View History

{% extends 'base.html.twig' %}
{% block title %}Two-Factor Authentication{% endblock %}
{% block body %}
<div style="max-width:500px;margin:4rem auto;font-family:sans-serif">
<h1>Two-Factor Authentication</h1>
{% for message in app.flashes('success') %}
<div style="color:green;margin-bottom:1rem">{{ message }}</div>
{% endfor %}
{% if totp_enabled %}
<p>Two-factor authentication is <strong>enabled</strong>.</p>
<form method="post" action="{{ path('totp_disable') }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('totp_disable') }}">
<button type="submit" style="padding:.5rem 1rem;background:red;color:white;border:none;cursor:pointer">Disable 2FA</button>
</form>
{% else %}
<p>Two-factor authentication is <strong>disabled</strong>.</p>
<a href="{{ path('totp_setup') }}" style="padding:.5rem 1rem;background:green;color:white;text-decoration:none">Enable 2FA</a>
{% endif %}
</div>
{% endblock %}