Skip to content

Commit

Permalink
👽 [#3049] Include the dark/light theme toggle
Browse files Browse the repository at this point in the history
Added in Django 4 in the base templates, which we need to account for
in our overrides.
  • Loading branch information
sergei-maertens committed Feb 21, 2024
1 parent 29d1f4a commit 5cbd1dc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/openforms/templates/admin/base_site.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ settings.PROJECT_NAME }} {% trans 'Administration' %}</a></h1>
{% if user.is_anonymous %}
{% include "admin/color_theme_toggle.html" %}
{% endif %}
{% endblock %}

{# part of block usertools #}
Expand All @@ -43,9 +46,14 @@ <h1 id="site-name"><a href="{% url 'admin:index' %}">{{ settings.PROJECT_NAME }}
<a href="{{ 2fa_account_security_url }}">{% trans "Account security" %}</a> /
{% endif %}

<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit">{% translate 'Log out' %}</button>
</form>

{% multidomain_switcher %}

{% include "admin/color_theme_toggle.html" %}
{% endblock %}

{# end block usertools #}
Expand Down

0 comments on commit 5cbd1dc

Please sign in to comment.