From 9e39c3c7f7367e6a5ab21544213866886b1980c4 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 22 Aug 2017 16:45:32 +0200 Subject: On search forms no field is required --- ishtar_common/forms.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ishtar_common') diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 4e5a8bd1c..f252b83bc 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -159,6 +159,9 @@ class FormSet(BaseFormSet): class TableSelect(forms.Form): def __init__(self, *args, **kwargs): super(TableSelect, self).__init__(*args, **kwargs) + # no field is required for search + for k in self.fields: + self.fields[k].required = False key = self.fields.keys()[0] self.fields[key].widget.attrs['autofocus'] = 'autofocus' -- cgit v1.2.3