Commits

Kevin Veroneau committed 1913f6e

Updated base.html to include a javascript block, and added an ID to the control-group in the bootstrap_form to allow JS-based validation errors to work better.

  • Participants
  • Parent commits b19dac3

Comments (0)

Files changed (2)

File bootstrap_theme/templates/bootstrap_form.html

 {% for field in form %}
-<div class="control-group{% if field.errors %} error{% endif %}">
+<div id="grp_{{field.id_for_label}}" class="control-group{% if field.errors %} error{% endif %}">
   {% if not field.is_hidden %}
   <label class="control-label" for="{{field.id_for_label}}">{{field.label}}</label>
   {% endif %}

File bootstrap_theme/templates/bootstrap_theme/base.html

     <script src="{{STATIC_URL}}js/jquery.js"></script>
     <script src="{{STATIC_URL}}js/bootstrap.min.js"></script>
     <script>
+      {% block javascript %}{% endblock %}
       $(function(){
         {% block jquery %}{% endblock %}
       });