kpsul/kfet/templates/kfet/form_field_snippet.html
Aurélien Delobelle e60e347a53 Add base templates to extend
- kfet/base_col_1.html for one column content.
- kfet/base_col_2.html for two columns content (left for fixed content,
right for main content).
2017-05-20 13:57:21 +02:00

26 lines
832 B
HTML

{% load widget_tweaks %}
<div class="form-group">
<label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}</label>
<div class="col-sm-10">
{% if field|widget_type == "checkboxselectmultiple" %}
<ul class="list-unstyled checkbox-select-multiple">
{% for choice in form.permissions %}
<li class="col-sm-6 col-lg-4">
<label for="{{ choice.id_for_label }}">
{{ choice.tag }} {{ choice.choice_label }}
</label>
</li>
{% endfor %}
</ul>
{% else %}
{{ field|add_class:'form-control' }}
{% endif %}
{% if field.errors %}
<span class="help-block">{{field.errors}}</span>
{% endif %}
{% if field.help_text %}
<span class="help-block">{{field.help_text}}</span>
{% endif %}
</div>
</div>