{{ form_row(form.code, {'attr': {
"data-error": false,
'readonly': false,
'placeholder': 'suffixe(optionnel)',
"data-codeurl": path("exercice.form.code"),
"data-code": exercice is defined ? exercice.code : "",
"data-classification": exercice is defined ? exercice.idClassification.id : "",
"data-action": "input->exercice--exercice#changeCode change->exercice--exercice#changeCode",
}
})
}}
Copié!
{% if classificationParent[0] is defined %}
{% set classificationNiveau0 = classificationParent[0].id %}
{% endif %}
{% if classificationParent[1] is defined %}
{% set classificationNiveau1 = classificationParent[1].id %}
{% endif %}
{% if classificationParent[2] is defined %}
{% set classificationNiveau2 = classificationParent[2].id %}
{% endif %}
{% if classificationParent[3] is defined %}
{% set classificationNiveau3 = classificationParent[3].id %}
{% endif %}
{# Niveau 1 #}
{{ form_widget(form.classification, {'attr': {'class': 'u-displaynone'}}) }}
{% if classifications is defined and classifications is not empty %}
{% for key,classification in classifications %}
{# Si Niveau 2 #}
{% if classification.children is defined and classification.children is not empty %}
{# Niveau 2 #}
{% for key1,cl2 in classification.children %}
{# Si Niveau 3 #}
{% if cl2.children is defined and cl2.children is not empty %}
{#
#}
{{ classification.nom }} / {{ cl2.nom }}
{# Niveau 3 #}
{% for key2,cl3 in cl2.children %}
{# Si Niveau 4 #}
{% if cl3.children is defined and cl3.children is not empty %}