Audit template fixes

This commit is contained in:
2020-09-01 13:13:44 +01:00
parent 945e521feb
commit 6ee9efa39e
5 changed files with 75 additions and 85 deletions

View File

@@ -0,0 +1,22 @@
{% load widget_tweaks %}
{% load title_spaced from filters %}
{% spaceless %}
<label for="{{ field.id_for_label }}" {% if col %}class="col-2 col-form-label"{% endif %}>{% if title %}{{ title }}{%else%}{{field.name|title_spaced}}{%endif%}</label>
{% if append or prepend %}
<div class="input-group {{col}}">
{% if prepend %}
<div class="input-group-prepend">
<span class="input-group-text">{{ prepend }}</span>
</div>
{% endif %}
{% render_field field|add_class:'form-control' %}
{% if append %}
<div class="input-group-append">
<span class="input-group-text">{{ append }}</span>
</div>
{% endif %}
</div>
{% else %}
{% render_field field|add_class:'form-control'|add_class:col %}
{% endif %}
{% endspaceless %}