diff options
| -rw-r--r-- | ishtar_common/widgets.py | 9 | 
1 files changed, 6 insertions, 3 deletions
| 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"<div class='input-group'>"              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'  <a href="#" class="add-button" '\ -                  u'onclick="open_window(\'%s\');">+</a>' % url_new -        html = u"""<input%(attrs_select)s/>%(new)s\ +            new = u'<span class="input-group-addon">'\ +                  u'<a href="#" class="add-button" '\ +                  u'onclick="open_window(\'%s\');">+</a></span></div>' % url_new +        html += u"""<input%(attrs_select)s/>%(new)s\  <input type="hidden"%(attrs_hidden)s/>\          <script type="text/javascript"><!--//          %(js)s//--></script> | 
