diff options
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r-- | ishtar_common/widgets.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 9483f9719..e5f4c67b1 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -606,10 +606,7 @@ class JQueryAutoComplete(forms.TextInput): """ self.source = source self.associated_model = associated_model - if callable(tips): - self.tips = tips() - else: - self.tips = tips + self.tips = tips self.options = None if options and len(options) > 0: @@ -733,11 +730,14 @@ class JQueryAutoComplete(forms.TextInput): # "extra_form_modals" list is used for that in form or view model_name = self.associated_model._meta.object_name.lower() if self.tips: + tips = self.tips + if callable(tips): + tips = tips() new += """<span class="input-group-append"> <span class="add-button input-group-text"> <em id="{}-tips">{}</em> </span></span> - """.format(attrs_hidden['id'], self.tips) + """.format(attrs_hidden['id'], tips) if self.modify: new += """ <span class="input-group-append"> |