From 6d836ee4dd954fff3e6d67caf9ede1af76649d5e Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Sat, 12 Sep 2020 10:07:31 +0100 Subject: [PATCH] Fix cable table template --- assets/templates/partials/cable_form.html | 17 +++-------------- assets/templates/partials/form_field.html | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) 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 %}