Permalink
Browse files

Bug fixes

  • Loading branch information...
1 parent da0c144 commit 432744b75d6d10d08920872f0c908f7a29f57795 @dyve committed Mar 20, 2012
@@ -1,16 +1,30 @@
-{% spaceless %}
- {% comment %}
- Spaceless is required here to make sure prepend and append work properly
- {% endcomment %}
- {% with prepend=prepend|default:field.field.widget.bootstrap.prepend|default:"" append=append|default:field.field.widget.bootstrap.append|default:"" %}
- {% if prepend %}
- <div class="input-prepend"><span class="add-on">{{ prepend }}</span>{{ field }}</div>
- {% else %}
- {% if append %}
- <div class="input-append">{{ field }}<span class="add-on">{{ append }}</span></div>
+{% comment %}
+ Spaceless is required here to make sure prepend and append work properly
+{% endcomment %}
+{% if field.field.widget.bootstrap %}
+ {% with bootstrap as field.field.widget.bootstrap %}
+ {% with prepend=prepend|default:field.field.widget.bootstrap.prepend|default:"" append=append|default:field.field.widget.bootstrap.append|default:"" %}
+ {% if prepend %}
+ {% if append %}
+ <div class="input-prepend input-append">
+ <span class="add-on">{{ prepend }}</span>{{ field }}<span class="add-on">{{ append }}</span>
+ </div>
+ {% else %}
+ <div class="input-prepend">
+ <span class="add-on">{{ prepend }}</span>{{ field }}
+ </div>
+ {% endif %}
{% else %}
- {{ field }}
+ {% if append %}
+ <div class="input-append">
+ {{ field }}<span class="add-on">{{ append }}</span>
+ </div>
+ {% else %}
+ {{ field }}
+ {% endif %}
{% endif %}
- {% endif %}
+ {% endwith %}
{% endwith %}
-{% endspaceless %}
+{% else %}
+ {{ field }}
+{% endif %}
@@ -22,7 +22,7 @@
{% include "bootstrap_toolkit/field_errors.html" with inline=False %}
</div>
{% else %}
- <label class="contral-label"{% if field.auto_id %} for="{{ field.auto_id }}"{% endif %}>{{ field.label }}</label>
+ <label class="control-label"{% if field.auto_id %} for="{{ field.auto_id }}"{% endif %}>{{ field.label }}</label>
<div class="controls">
{% include "bootstrap_toolkit/field_default.html" %}
{% include "bootstrap_toolkit/field_help.html" with inline=True %}
View
@@ -2,7 +2,7 @@
setup(
name='django-bootstrap-toolkit',
- version='2.5.1',
+ version='2.5.2',
url='https://github.com/dyve/django-bootstrap-toolkit',
author='Dylan Verheul',
author_email='dylan@dyve.net',

0 comments on commit 432744b

Please sign in to comment.