{% macro fieldrow(id, field, norow = false, nohide = false, em = false) %} {% if field.visible is not defined or (field.visible is defined and field.visible) or nohide == true %} {% if norow == false and (field.type != 'hidden' or (field.type == 'hidden' and field.display is defined and field.display is not empty)) %}
{% if field.prior_infotext is defined and field.prior_infotext|length > 0 %}
{{ field.prior_infotext }}
{% endif %} {% if field.label is iterable %} {% else %} {% endif %}
{% endif %} {% if field.type == 'text' or field.type == 'password' or field.type == 'number' or field.type == 'file' or field.type == 'email' or field.type == 'url' or field.type == 'hidden' or field.type == 'date' or field.type == 'datetime-local' %} {{ _self.input(id, field) }} {% elseif field.type == 'textul' %} {{ _self.input_ul(id, field) }} {% elseif field.type == 'checkbox' %} {{ _self.bool(id, field) }} {% elseif field.type == 'checkrequired' %} {{ _self.chk_required(id, field) }} {% elseif field.type == 'select' %} {{ _self.select(id, field) }} {% elseif field.type == 'textarea' %} {{ _self.textarea(id, field) }} {% elseif field.type == 'label' %} {{ _self.plain(id, field) }} {% elseif field.type == 'link' %} {{ _self.link(id, field) }} {% elseif field.type == 'itemlist' %} {{ _self.itemlist(id, field) }} {% elseif field.type == 'infotext' %} {{ _self.infotext(id, field) }} {% elseif field.type == 'image' %} {{ _self.image(id, field) }} {% else %} {% endif %} {% if field.note is defined and field.note is not empty %} {{ field.note|raw }} {% endif %} {% if norow == false and (field.type != 'hidden' or (field.type == 'hidden' and field.display is defined and field.display is not empty)) %}
{% endif %} {% endif %} {% endmacro %} {# installation specific format #} {% macro field(id, field, norow = true, nohide = false, em = false) %} {% if field.type == 'checkbox' %}
{% elseif field.type == 'hidden' %} {{ _self.fieldrow(id, field, norow, nohide, em) }} {% else %}
{{ _self.fieldrow(id, field, norow, nohide, em) }}
{% endif %} {% endmacro %} {% macro bool(id, field) %} {% if field.is_array is defined and field.is_array == 1 and field.values is not empty %} {% for subfield in field.values %}
{% endfor %} {% else %}
{% endif %} {% endmacro %} {% macro chk_required(id, field) %}
{% endmacro %} {% macro infotext(id, field) %} {% if field.next_to is defined %}
{% endif %} {{ field.value|raw }} {% if field.next_to is defined %} {% for nid, nfield in field.next_to %} {% if nfield.next_to_prefix is defined %} {{ nfield.next_to_prefix }} {% endif %} {{ _self.fieldrow(nid, nfield, true) }} {% endfor %}
{% endif %} {% endmacro %} {% macro plain(id, field) %} {% if field.next_to is defined %} {% for nid, nfield in field.next_to %} {% if nfield.next_to_prefix is defined %} {{ nfield.next_to_prefix }} {% endif %} {{ _self.fieldrow(nid, nfield, true) }} {% endfor %} {% endif %} {% endmacro %} {% macro input(id, field) %} {% if field.next_to is defined %}
{% endif %} {% if field.type == 'hidden' and field.display is defined %} {% endif %} {% if field.next_to is defined %} {% for nid, nfield in field.next_to %} {% if nfield.next_to_prefix is defined %} {{ nfield.next_to_prefix }} {% endif %} {{ _self.fieldrow(nid, nfield, true) }} {% endfor %}
{% endif %} {% endmacro %} {% macro image(id, field) %} {% if field.value is not empty %} Current Image
{% endif %} {% set field = field|merge({'type':'file'}) %} {{ _self.input(id, field) }} {% endmacro %} {% macro input_ul(id, field) %} {% set max = "" %} {% if field.maxlength is defined %} {% for i in 1..field.maxlength %} {% set max = max ~ "9" %} {% endfor %} {% endif %}
{% endmacro %} {% macro select(id, field) %} {% if field.next_to is defined %}
{% endif %} {% if field.next_to is defined %} {% for nid, nfield in field.next_to %} {% if nfield.next_to_prefix is defined %} {{ nfield.next_to_prefix }} {% endif %} {{ _self.fieldrow(nid, nfield, true) }} {% endfor %}
{% endif %} {% endmacro %} {% macro textarea(id, field) %} {% endmacro %} {% macro link(id, field) %} {{ field.label|raw }} {% endmacro %} {% macro itemlist(id, field) %} {% if field.values is not empty %} {% for value in field.values %}

{{ value.item|raw }} {% if value.href is defined and value.href is not empty %} {{ _self.link(id, value) }} {% endif %}

{% endfor %} {% endif %} {% if field.next_to is defined %} {% for nid, nfield in field.next_to %} {{ _self.fieldrow(nid, nfield, true) }} {% endfor %} {% endif %} {% endmacro %}