|
|
@ -18,17 +18,19 @@
|
|
|
|
{%- endif %}
|
|
|
|
{%- endif %}
|
|
|
|
{%- endmacro %}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
{%- macro form_fields(fields, prepend='', append='', label=True, spacing=True) %}
|
|
|
|
{%- macro form_fields(fields, prepend='', append='', label=True) %}
|
|
|
|
{%- if spacing %}
|
|
|
|
|
|
|
|
{%- set width = (12 / fields|length)|int %}
|
|
|
|
{%- set width = (12 / fields|length)|int %}
|
|
|
|
{%- else %}
|
|
|
|
|
|
|
|
{%- set width = 2 %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
{%- for field in fields %}
|
|
|
|
{%- for field in fields %}
|
|
|
|
<div class="col-lg-{{ width }} col-xs-12 {{ 'has-error' if field.errors else '' }}">
|
|
|
|
<div class="col-lg-{{ width }} col-xs-12 {{ 'has-error' if field.errors else '' }}">
|
|
|
|
|
|
|
|
{%- if field is iterable %}
|
|
|
|
|
|
|
|
{%- for subfield in field %}
|
|
|
|
|
|
|
|
{{ form_individual_field(subfield, prepend=prepend, append=append, label=label, **kwargs) }}
|
|
|
|
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
{%- else %}
|
|
|
|
{{ form_individual_field(field, prepend=prepend, append=append, label=label, **kwargs) }}
|
|
|
|
{{ form_individual_field(field, prepend=prepend, append=append, label=label, **kwargs) }}
|
|
|
|
|
|
|
|
{%- endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|