{% extends "admin/layout.html.twig" %} {% block content %}

Edition EventDate

Modification des EventDates...

{{ form_start(form) }}

Configuration Event

{{ form_label(form.client,'Client')}} {{ form_row(form.client,{'attr':{'readonly':'readonly'}})}}
{{ form_label(form.distributeur,'Distributeur')}} {{ form_row(form.distributeur,{'attr':{'readonly':'readonly'}})}}

Configuration Dates

{{form_label(form.client,'Nom du mailing')}} {{form_row(form.name)}}
{% if is_granted('ROLE_SUPER_ADMIN') %}
{{form_label(form.Status,'Status')}} {{form_row(form.Status)}}
{% else %}
{{form_label(form.Status,'Status')}} {{ form_row(form.Status,{'attr':{'readonly':'readonly'}}) }}
{% endif %}

{% for Dates in form.children.Dates %}
{% if Dates.Status.vars.data == "pending" %}
{{ form_errors(Dates) }} {{ form_row(Dates.Date,{'attr':{'readonly':'readonly'}}) }}
{{form_label(form.Status,'Évènement en cours...')}} {{ form_row(Dates.Libelle,{'attr':{'readonly':'readonly','class':'text-danger'}}) }}
{{ form_errors(Dates) }} {{ form_row(Dates.Status,{'attr':{'readonly':'readonly'}}) }}
{% else %}
{{ form_errors(Dates) }} {{ form_row(Dates.Date,{'attr': {'class':'form-control datepicker','id':'date', 'placeholder':'JJ-MM-AAAA HH-SS'}}) }}
{% if is_granted('ROLE_SUPER_ADMIN') %}
{{form_label(form.Status,'Évènement')}} {{ form_row(Dates.Libelle) }}
{% else %}
{{form_label(form.Status,'Évènement')}} {{ form_row(Dates.Libelle,{'attr':{'readonly':'readonly'}}) }}
{% endif %}
{{ form_errors(Dates) }} {{ form_row(Dates.Status,{'attr':{'readonly':'readonly'}}) }}
{% endif %}
{% endfor %}
{{ form_row(form._token) }}
{{ form_end(form,{'render_rest': false}) }}
{% endblock %}