{% macro createUniqueOrMultiple(step, actionResponses = null) %} {% set radioAlreadyChecked = false %} {% for action in step.toArray["actions"] %}
{% set break = false %} {% set isChecked = false %} {% set additionalLabel01 = null %} {% set additionalLabel02 = null %} {% set additionalLabel03 = null %} {% for actionResponse in actionResponses %} {% if actionResponse.actionRE.id == action.id %} {% set isChecked = true %} {% set additionalLabel01 = actionResponse.additionnalValue01 %} {% set additionalLabel02 = actionResponse.additionnalValue02 %} {% set additionalLabel03 = actionResponse.additionnalValue03 %} {% break %} {% endif %} {% endfor %} {% if step.actionAdmitted == "unique" %} {% if isChecked %} {% set radioAlreadyChecked = true %} {% else %} {% endif %} {% else %} {% endif %} {% if step.typeStep=="information" %} {% else %} {% endif %} {% if action.helpLabel is not null %}
Info {{ action.helpLabel }} {% endif %}
{% if action.hasAdditionalInfo %} {% if isChecked %} {% set shouldBeDisplay = true %} {% elseif action.isDefaultValue and action.conditionalDefault is null and actionResponses|length == 0 %} {% set shouldBeDisplay = true %} {% else %} {% set shouldBeDisplay = false %} {% endif %}
{% if action.additionalLabel01 is not null %}

{% if action.label01IsNumberInputValue %}
{% else %} {% endif %}
{% endif %} {% if action.additionalLabel02 is not null %}

{% if action.label02IsNumberInputValue %}
{% else %} {% endif %}
{% endif %} {% if action.additionalLabel03 is not null %}

{% if action.label03IsNumberInputValue %}
{% else %} {% endif %}
{% endif %}
{% endif %}
{% endfor %} {% endmacro %} {% macro createText(step, actionResponses = null) %}
{% for action in step.toArray["actions"] %} {% set break = false %} {% set additionalLabel01 = null %} {% set additionalLabel02 = null %} {% set additionalLabel03 = null %} {% for actionResponse in actionResponses %} {% if actionResponse.actionRE.id == action.id %} {% set additionalLabel01 = actionResponse.additionnalValue01 %} {% set additionalLabel02 = actionResponse.additionnalValue02 %} {% set additionalLabel03 = actionResponse.additionnalValue03 %} {% break %} {% endif %} {% endfor %}
{% set break = false %} {% set valueResponded = "" %} {% for actionResponse in actionResponses %} {% if actionResponse.actionRE.id == action.id %} {% set valueResponded = actionResponse.actionInputTextRE %} {% break %} {% endif %} {% endfor %}

{{ action.isNumberInputValue == "number" ? "Ce champ ne peut contenir que des nombres" : "Le champ est obligatoire" }}
{% if action.hasAdditionalInfo %}
{% if action.additionalLabel01 is not null %}

{% if action.label01IsNumberInputValue %}
{% else %} {% endif %}
{% endif %} {% if action.additionalLabel02 is not null %}

{% if action.label02IsNumberInputValue %}
{% else %} {% endif %}
{% endif %} {% if action.additionalLabel03 is not null %}

{% if action.label03IsNumberInputValue %}
{% else %} {% endif %}
{% endif %}
{% endif %} {% if action.helpLabel is not null %}
Aide : {{ action.helpLabel }} {% endif %} {% endfor %}
{% endmacro %}