summaryrefslogtreecommitdiff
path: root/ishtar_common/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r--ishtar_common/widgets.py7
1 files changed, 5 insertions, 2 deletions
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' <a href="#" class="add-button" '\
u'onclick="open_window(\'%s\');">+</a>' % url_new
- html = u'''<input%(attrs_select)s/>%(new)s\
+ html = u"""<input%(attrs_select)s/>%(new)s\
<input type="hidden"%(attrs_hidden)s/>\
<script type="text/javascript"><!--//
%(js)s//--></script>
- ''' % {
+ """ % {
'attrs_select': flatatt(attrs_select),
'attrs_hidden': flatatt(attrs_hidden),
'js': self.render_js(name),