{% set lang = req.body.metadata.pathName.split('/') %} {% set fileServiceURL = "https:/azuregetfile.k8sprod.ottawa.ca/AzureFile/" %} {% macro fileResponse(file) %} {% if file.storage == "s3" %} {{ file.originalName }} {% elif file.storage == "azure" %} {{ file.originalName }} {% endif%} {% endmacro %} {% macro translate(string) %} {% set key = lang[1] + ':' + string %} {% set value = form.properties[key] if form.properties[key] else string %} {{ value }} {% endmacro %} {% macro value(key) %} {{ data | componentValue(key, components) }} {% endmacro %} {% macro submission(data, components) %} {{ data | submissionTable(formInstance) }} {% endmacro %} {% macro label(key) %} {{ key | componentLabel(components) }} {% endmacro %} {% macro dataValue(dValue) %} {% if dValue | is_object %} {% if dValue.storage %} {{ fileResponse(dValue) }} {% else %} {% for dValueKey, dValueValue in dValue %} {% if dValueKey != "" %} {% endif %} {% endfor %}
{{ translate(dValueKey) }} {{ translate(dataValue(dValueValue)) }}

{% endif %} {% elif dValue | is_array %} {% else %} {{ translate(dValue) }} {% endif %} {% endmacro %} {% macro dataTable(components, submissionData, title) %} {% for component in components %} {% if component.type == 'well' %} {{ dataTable(component.components, submissionData) }} {% elif component.type == 'columns' %} {% for column in component.columns %} {{ dataTable(column.components, submissionData) }} {% endfor %} {% endif %} {% endfor %} {% if title %} {% endif %} {% for component in components %} {% if component.type == 'panel' %} {% elif component.type == 'well' %} {% elif component.type == 'html' %} {% elif component.type == 'recaptcha' %} {% elif component.type == 'fieldset' %} {% elif component.type == 'columns' %} {% elif component.type == 'button' %} {% elif not submissionData[component.key] %} {% else %} {% endif %} {% endfor %}

{{ translate(title) }}

{{ translate(component.label) }} {% if component.type == 'password' %} --- PASSWORD --- {% elif component.type == 'address' %} {{ submissionData[component.key].formatted_address }} {% elif component.type == 'radio' %} {{ translate(submissionData[component.key]) }} {% elif component.type == 'selectboxes' %}
    {% for dValueKey, dValueValue in submissionData[component.key] %} {% if dValueValue != false %}
  • {{ translate(dValueKey) }}
  • {% endif %} {% endfor %}
{% elif component.type == 'editgrid' %} {% for editGridData in submissionData[component.key] %} {{ dataTable(component.components, editGridData)}} {% endfor%} {% elif component.type == 'datagrid' %} {% for dataGridData in submissionData[component.key] %} {{ dataTable(component.components, dataGridData)}} {% endfor%} {% else %} {{ dataValue(submissionData[component.key]) }} {% endif %}

{% for component in components %} {% if component.type == 'panel' %} {{ dataTable(component.components, submissionData, component.title) }} {% elif component.type == 'fieldset' %} {{ dataTable(component.components, submissionData, component.legend) }} {% endif %} {% endfor %} {% endmacro %} {% macro table(components, title) %} {{ dataTable(components, data, title) }} {% endmacro %} Form Submission - Soumission du formulaire