Skip to content
Snippets Groups Projects
Verified Commit f3c9cf42 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Use customised colour widget for theme preferences

parent 6c102a9f
No related branches found
No related tags found
1 merge request!473Resolve "Customise django-colorfield for use with Materialize"
Pipeline #5717 passed
......@@ -3,6 +3,7 @@ from django.forms import EmailField, ImageField, URLField
from django.forms.widgets import SelectMultiple
from django.utils.translation import gettext_lazy as _
from colorfield.widgets import ColorWidget
from dynamic_preferences.preferences import Section
from dynamic_preferences.types import (
BooleanPreference,
......@@ -53,6 +54,7 @@ class ColourPrimary(StringPreference):
default = "#0d5eaf"
required = False
verbose_name = _("Primary colour")
widget = ColorWidget
@site_preferences_registry.register
......@@ -62,6 +64,7 @@ class ColourSecondary(StringPreference):
default = "#0d5eaf"
required = False
verbose_name = _("Secondary colour")
widget = ColorWidget
@site_preferences_registry.register
......
......@@ -25,4 +25,6 @@
{% include "core/partials/save_button.html" with caption=_("Save preferences") %}
</form>
</div>
{{ form.media.js }}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment