mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-25 01:12:16 +00:00
Audit template fixes
This commit is contained in:
22
assets/templates/partials/form_field.html
Normal file
22
assets/templates/partials/form_field.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user