diff --git a/assets/templates/partials/cable_form.html b/assets/templates/partials/cable_form.html index 3d5674c1..4409f08f 100644 --- a/assets/templates/partials/cable_form.html +++ b/assets/templates/partials/cable_form.html @@ -6,24 +6,13 @@
{% if create or edit or duplicate %}
- -
- {% render_field form.cable_type|add_class:'form-control' %} -
+ {% include 'partials/form_field.html' with field=form.cable_type %}
- -
- {% render_field form.length|add_class:'form-control' %} - {{ form.length.help_text }} -
+ {% include 'partials/form_field.html' with field=form.length append=form.length.help_text %}
- -
- {% render_field form.csa|add_class:'form-control' value=object.csa %} - {{ form.csa.help_text }} -
+ {% include 'partials/form_field.html' with field=form.csa append=form.csa.help_text %}
{% else %}
diff --git a/assets/templates/partials/form_field.html b/assets/templates/partials/form_field.html index feeacff2..82e328d6 100644 --- a/assets/templates/partials/form_field.html +++ b/assets/templates/partials/form_field.html @@ -17,6 +17,6 @@ {% endif %}
{% else %} -{% render_field field|add_class:'form-control'|add_class:col %} +{% render_field field|add_class:'form-control' class+=col %} {% endif %} {% endspaceless %}