mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	inline theme form
This commit is contained in:
		| @@ -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> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user