diff options
| 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 | 
| commit | f3eff0ab0b0842fb5a020128879ccd3912def9b6 (patch) | |
| tree | ea6891ed268bbce4b85eb45c96e28f4db238985e /ishtar_common/forms.py | |
| parent | a7f86039ae8a06babdec59c7607f1a025bb712cc (diff) | |
| download | Ishtar-f3eff0ab0b0842fb5a020128879ccd3912def9b6.tar.bz2 Ishtar-f3eff0ab0b0842fb5a020128879ccd3912def9b6.zip | |
Criteria search: do not use textarea for custom fields
Diffstat (limited to 'ishtar_common/forms.py')
| -rw-r--r-- | ishtar_common/forms.py | 3 | 
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']: | 
