summaryrefslogtreecommitdiff
path: root/ishtar_common/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r--ishtar_common/forms.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index 7eb36f6cc..f252b83bc 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2010-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -159,7 +159,10 @@ class FormSet(BaseFormSet):
class TableSelect(forms.Form):
def __init__(self, *args, **kwargs):
super(TableSelect, self).__init__(*args, **kwargs)
- key = self.fields.keyOrder[0]
+ # 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'
def get_input_ids(self):