From 3ea67319cd18b8101f318ce4e151ce249fcf0096 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 16 Jan 2018 12:41:07 +0100 Subject: UI: better layout for + button --- ishtar_common/widgets.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index e5cb35db4..59a034c00 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -387,7 +387,9 @@ class JQueryAutoComplete(forms.TextInput): attrs_select['class'] += ' form-control' new = '' + html = u"" if self.new: + html = u"
" model_name = self.associated_model._meta.object_name.lower() limits = [] for k in self.limit: @@ -400,9 +402,10 @@ class JQueryAutoComplete(forms.TextInput): if self.url_new: url_new = self.url_new url_new = reverse(url_new, args=args) - new = u' +' % url_new - html = u"""%(new)s\ + new = u''\ + u'+
' % url_new + html += u"""%(new)s\ \ -- cgit v1.2.3