summaryrefslogtreecommitdiff
path: root/ishtar_common/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-22 16:45:32 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-22 16:45:32 +0200
commit9e39c3c7f7367e6a5ab21544213866886b1980c4 (patch)
tree3cbb6ff45067d16d52de38102592c0fae75f5864 /ishtar_common/forms.py
parent320e0e65e8dd78869bebb4b2849372d99a5fd40c (diff)
downloadIshtar-9e39c3c7f7367e6a5ab21544213866886b1980c4.tar.bz2
Ishtar-9e39c3c7f7367e6a5ab21544213866886b1980c4.zip
On search forms no field is required
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r--ishtar_common/forms.py3
1 files changed, 3 insertions, 0 deletions
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'