mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
inline theme form
This commit is contained in:
parent
3349e9ff6c
commit
0186d23563
@ -226,6 +226,18 @@ def get_color_theme_css(username):
|
||||
return inventree_css_static_url
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def get_available_themes(*args, **kwargs):
|
||||
"""
|
||||
Return the available theme choices
|
||||
"""
|
||||
|
||||
print("available:")
|
||||
print(ColorTheme.get_color_themes_choices())
|
||||
|
||||
return ColorTheme.get_color_themes_choices()
|
||||
|
||||
|
||||
@register.filter
|
||||
def keyvalue(dict, key):
|
||||
"""
|
||||
|
@ -37,6 +37,25 @@
|
||||
<td>{{ user.email }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Theme Settings" %}</h4>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
|
||||
<form action='' method='post'>
|
||||
{% csrf_token %}
|
||||
<input name='next' type='hidden' value='{% url "settings" %}'>
|
||||
<select name='theme' class='select form-control'>
|
||||
{% for theme in get_available_themes %}
|
||||
{{ theme }}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Language Settings" %}</h4>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user