summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-15 21:39:00 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-15 21:39:00 +0200
commit0ec0194197b848e3bd2eb6eb715d1f6af9e39b65 (patch)
treeea6891ed268bbce4b85eb45c96e28f4db238985e /ishtar_common
parent143ede4455deadd686e0576e22e220af59629abf (diff)
downloadIshtar-0ec0194197b848e3bd2eb6eb715d1f6af9e39b65.tar.bz2
Ishtar-0ec0194197b848e3bd2eb6eb715d1f6af9e39b65.zip
Criteria search: do not use textarea for custom fields
Diffstat (limited to 'ishtar_common')
-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 76b33b638..24972ed3b 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -278,6 +278,7 @@ class CustomForm(BSForm):
:return: ((order1, key1, field1), ...)
"""
fields = []
+ is_search = "search_vector" in cls.base_fields
q = custom_form.json_fields.values(
'label', 'help_text', 'order', 'json_field__key',
'json_field__value_type', 'json_field__name',
@@ -288,6 +289,8 @@ class CustomForm(BSForm):
if field['json_field__value_type'] in JSON_VALUE_TYPES_FIELDS:
field_cls, widget = JSON_VALUE_TYPES_FIELDS[
field['json_field__value_type']]
+ if is_search and field['json_field__value_type'] == "LT":
+ widget = None
attrs = {'label': field['label'] or field['json_field__name'],
'required': False}
if field['help_text']: