Fix logout

main
yaemiku 2023-12-26 05:13:56 +01:00
parent 4cd9f78065
commit 9de4f15d3c
Signed by: podlaskizbs
GPG Key ID: ADC039636B3E4AAB
1 changed files with 17 additions and 3 deletions

View File

@ -75,8 +75,22 @@
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}">{% translate 'Change password' %}</a> /
{% endif %}
<form>
<form id="logout-form" method="post" action="/admin/logout/">
{% csrf_token %}
<button formmethod="{% url 'admin:logout' %}" formmethod="post" type="submit">{% translate 'Log out' %}</button>
<button type="submit">{% translate 'Log out' %}</button>
</form>
<button class="theme-toggle">
<div class="visually-hidden theme-label-when-auto">Przełącz motyw (bieżący motyw: auto)</div>
<div class="visually-hidden theme-label-when-light">Przełącz motyw (bieżący motyw: jasny)</div>
<div class="visually-hidden theme-label-when-dark">Przełącz motyw (bieżący motyw: ciemny)</div>
<svg aria-hidden="true" class="theme-icon-when-auto">
<use xlink:href="#icon-auto"></use>
</svg>
<svg aria-hidden="true" class="theme-icon-when-dark">
<use xlink:href="#icon-moon"></use>
</svg>
<svg aria-hidden="true" class="theme-icon-when-light">
<use xlink:href="#icon-sun"></use>
</svg>
</button>
{% endblock %}