Template improvements

* refactors templates/table.html into templates/generic_index.html
* adds DummyFilterInput as do-not-render-widget
* hardens combination of q filter and other filters on index view rendering
This commit is contained in:
mipel
2021-07-28 09:53:14 +02:00
parent 1d77eb293e
commit c76a061740
5 changed files with 115 additions and 94 deletions
+10
View File
@@ -218,3 +218,13 @@ class OpenInterventionForm(EditInterventionForm):
# Disable all form fields
for field in self.fields:
self.disable_form_field(field)
class DummyFilterInput(forms.HiddenInput):
""" A dummy input widget
Does not render anything. Can be used to keep filter logic using django_filter without having a pre defined
filter widget being rendered to the template.
"""
template_name = "intervention/dummy-filter-input.html"