From 79ecf7ad94273476e4f0bc4c0351e6a6dbde090e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 12 Sep 2019 21:19:19 +0200 Subject: New management of popup for new items - manage author and persons --- ishtar_common/widgets.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'ishtar_common/widgets.py') diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 14d153651..79a705e43 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -703,6 +703,9 @@ class JQueryAutoComplete(forms.TextInput): new = '' html = u"" if self.new: + # WARNING: the modal for the form must be in the main template + # "extra_form_modals" list is used for that in view or wizard + html = u"
" model_name = self.associated_model._meta.object_name.lower() limits = [] @@ -716,9 +719,12 @@ class JQueryAutoComplete(forms.TextInput): if self.url_new: url_new = self.url_new url_new = reverse(url_new, args=args) - new = u''\ - u'+
' % url_new + new = """ + + + + + """.format(url_new, model_name, model_name) old_value = "" if 'value' in attrs_select and attrs_select['value']: -- cgit v1.2.3