Files
PyRIGS/assets/templates/partials/cable_form.html

29 lines
955 B
HTML

{% load widget_tweaks %}
<div class="card mb-2">
<div class="card-header">
Cable Details
</div>
<div class="card-body">
{% if create or edit or duplicate %}
<div class="form-group">
{% include 'partials/form_field.html' with field=form.cable_type %}
</div>
<div class="form-group">
{% include 'partials/form_field.html' with field=form.length append=form.length.help_text %}
</div>
<div class="form-group">
{% include 'partials/form_field.html' with field=form.csa append=form.csa.help_text %}
</div>
{% else %}
<dl>
<dt>Cable Type</dt>
<dd>{% if object.cable_type %}<a href="{{object.cable_type.get_absolute_url}}">{{ object.cable_type }}</a>{%else%}-{%endif%}</dd>
<dt>Length</dt>
<dd>{{ object.length|default_if_none:'-' }}m</dd>
<dt>Cross Sectional Area</dt>
<dd>{{ object.csa|default_if_none:'-' }}mm²</dd>
</dl>
{% endif %}
</div>
</div>