From 1488f1cbb29d9605e14621982e1450e5801a8fa2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 9 Jan 2018 09:55:51 +0100 Subject: Workon forms layout --- ishtar_common/widgets.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ishtar_common/widgets.py') diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 6abaa927b..c34642cf1 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -277,6 +277,7 @@ class SquareMeterWidget(forms.TextInput): rendered = t.render(dct) return mark_safe(rendered) + AreaWidget = forms.TextInput if settings.SURFACE_UNIT == 'square-metre': @@ -424,6 +425,8 @@ class JQueryAutoComplete(forms.TextInput): attrs_select['id'] = 'id_select_%s' % name if 'class' not in attrs_select: attrs_select['class'] = 'autocomplete' + + attrs_select['class'] += ' form-control' new = '' if self.new: model_name = self.associated_model._meta.object_name.lower() @@ -440,11 +443,11 @@ class JQueryAutoComplete(forms.TextInput): url_new = reverse(url_new, args=args) new = u' +' % url_new - html = u'''%(new)s\ + html = u"""%(new)s\ \ - ''' % { + """ % { 'attrs_select': flatatt(attrs_select), 'attrs_hidden': flatatt(attrs_hidden), 'js': self.render_js(name), -- cgit v1.2.3