mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 14:30:17 +02:00
[FIX] Mark selected theme in the theme dropdown in the user menu
This commit is contained in:
parent
7ba65968ed
commit
8362d11714
@ -1,9 +1,13 @@
|
||||
{% load i18n %}
|
||||
|
||||
<form action="{% url 'theme' %}?next={{ next|urlencode }}" method="post">
|
||||
{% csrf_token %}
|
||||
<select name="theme" value="theme" class="form-select" aria-label="" onchange="this.form.submit()">
|
||||
<option selected>Select Theme</option>
|
||||
|
||||
<select name="theme" class="form-select" aria-label="" onchange="this.form.submit()">
|
||||
<option selected>{% translate "Select Theme" %}</option>
|
||||
|
||||
{% for theme in themes %}
|
||||
<option value="{{ theme.get_name }}">{{ theme.name }}</option>
|
||||
<option value="{{ theme.get_name }}"{% if selected_theme.name == theme.name %} selected="selected"{% endif %}>{{ theme.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
|
@ -72,5 +72,6 @@ def theme_select(context):
|
||||
request = context['request']
|
||||
return {
|
||||
'next': request.path,
|
||||
'themes': get_hooks('theme_hook')
|
||||
'themes': get_hooks('theme_hook'),
|
||||
'selected_theme': get_theme(request)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user