diff options
author | Magnus Hagander | 2019-02-13 09:45:10 +0000 |
---|---|---|
committer | Magnus Hagander | 2019-02-16 17:27:25 +0000 |
commit | 497dcba45e6aaafa77645905ebcbd5b92ba1ae79 (patch) | |
tree | d9ede7d2fbdc90b8c0cee7153059e42b83e91cc5 /postgresqleu/util/widgets.py | |
parent | 1b66ea4b5553c8f564d28fb8d246a9cfd69ca5dd (diff) |
Generalize frontend side forms
Reomve a lot of duplicates, and also make the frontend forms actually
use the bootstrap 4 templates that we have for everything else, instead
of using old hardcoded tables.
We already had generalized forms for the backend, but they include a
number of tings that are very backend-specific, so create a simplified
version for the frontend.
Diffstat (limited to 'postgresqleu/util/widgets.py')
-rw-r--r-- | postgresqleu/util/widgets.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/postgresqleu/util/widgets.py b/postgresqleu/util/widgets.py index 34a9cf0d..0dc71695 100644 --- a/postgresqleu/util/widgets.py +++ b/postgresqleu/util/widgets.py @@ -58,3 +58,11 @@ class AdminJsonWidget(PrettyPrintJsonWidget): class StaticTextWidget(TextInput): def render(self, name, value, attrs=None, renderer=None): return mark_safe(value) + + +class Bootstrap4CheckboxSelectMultiple(forms.CheckboxSelectMultiple): + template_name = 'forms/widgets/bs4_checkbox_select.html' + + +class Bootstrap4HtmlDateTimeInput(forms.DateTimeInput): + template_name = 'forms/widgets/bs4_datetime_input.html' |