{% import 'flow/type2component/array2component.html' as a2c with context %} {% import 'flow/type2component/boolean2component.html' as b2c with context %} {% import 'flow/type2component/datatype2component.html' as d2c with context %} {% import 'flow/type2component/file2component.html' as f2c with context %} {% import 'flow/type2component/multipleselect2component.html' as ms2c with context %} {% import 'flow/type2component/number2component.html' as n2c with context %} {% import 'flow/type2component/select2component.html' as s2c with context %} {% import 'flow/type2component/string2component.html' as s2c2 with context %} {% macro create_select_options(inputRow, use_in) -%} {% for option in inputRow.options %} {% set add_attrs1= 'selected' if ('default' in inputRow) and ((option.value | string) == (inputRow.default | string)) else '' %} {% if 'default' not in inputRow %} {% set input_row_default = [] %} {% else %} {% if inputRow.default | isinstance(str | type) %} {% set input_row_default = [inputRow.default] %} {% else %} {% set input_row_default = inputRow.default %} {% endif %} {% endif %} {% set add_attrs2 = 'selected' if (option.value | string) in input_row_default else '' %} {% set add_attrs = add_attrs2 if use_in else add_attrs1 %} {% endfor %} {%- endmacro %} {% macro add_checkbox_control(inputRow) -%} {% if param_checkbox_config == True %}

{% endif %} {%- endmacro %} {% macro generateDisplay(inputList, disabled, parentDivId, treeSessionKey='defaultTree', extra_class=none, draw_hidden_ranges = false) -%}

{% if draw_hidden_ranges %} {% endif %} {% if inputList %}
{% for inputRow in inputList %} {% with %} {% set dt_class = extra_class if extra_class is not none else '' %} {% set dt_class = dt_class ~ ' field-mandatory' if ('required' in inputRow and inputRow.required and not ('locked' in inputRow and inputRow.locked)) %} {% set dt_class = dt_class ~ ' dataset-selector' if (inputRow.type=='select' and 'datatype' in inputRow) else dt_class ~ ' field-type-' ~ inputRow.type %}
{% if 'label' in inputRow %} {% import 'flow/generate_help_tooltip.html' as ght with context %} {% endif %}
{% endwith %}

{% if inputRow.type=='upload' %} {{ f2c.draw_upload(inputRow) }} {% elif inputRow.type == 'array' %} {{ a2c.draw_array_component(inputRow, disabled) }} {% elif inputRow.type == 'str' or inputRow.type == 'list' %} {{ s2c2.draw_string_component(inputRow, disabled) }} {% elif inputRow.type =='bool' %} {{ b2c.draw_bool(inputRow) }} {% elif (inputRow.type =='int') or (inputRow.type=='float') %} {{ n2c.draw_number_component(inputRow, disabled, parentDivId) }} {% elif inputRow.type =='select' and 'datatype' not in inputRow %} {{ s2c.draw_simple_select(inputRow, disabled, parentDivId, treeSessionKey) }} {% elif inputRow.type =='select' and 'datatype' in inputRow %} {{ d2c.draw_datatype_full(inputRow, inputRow['disabled'] if 'disabled' in inputRow else disabled, parentDivId, treeSessionKey) }} {% elif inputRow.type =='selectMultiple' %} {{ ms2c.draw_multipleselect(inputRow, disabled, treeSessionKey) }} {% endif %}

{% if 'inputRow.name' in errors %}

{{ errors[inputRow.name] }}

{% endif %} {% if inputRow.type == 'dict' %}
{{ generateDisplay(inputRow.attributes, true, "dict_" ~ inputRow.name, treeSessionKey) }}
{% endif %}
{% endfor %}
{% endif %}
{%- endmacro %}