{% extends 'common/layout.html.twig' %}

{% block content %}
<div class='container' style='max-width: 800px;'>
	<h2 class='text-center w-100 mt-3'>{{ "Cotiser pour l'année"|trans }} {{ "now"|date('Y') }}</h2>
	<div class='text-center mb-5'>
		{% if app.user and is_granted('ROLE_ADHERENT') %}
			<h4>{{ 'Solde de eMLC'|trans }} : <b>{{ app.user.adherent.ecompte }}</b></h4>
			<h5>{{ 'Montant minimum de la cotisation'|trans }} : <b>{{ KOH_COTISATION_ADHERENT|default('') }} €</b></h5>
		{% elseif app.user and is_granted('ROLE_PRESTATAIRE') %}
			<h4>{{ 'Solde de eMLC'|trans }} : <b>{{ app.session.get('_prestagere').ecompte }}</b></h4>
			<h5>{{ 'Montant minimum de la cotisation'|trans }} : <b>{{ KOH_COTISATION_PRESTATAIRE|default('') }} €</b></h5>
		{% endif %}
		</h5>
		{{ form_start(form) }}
			{{ form_row(form.operateur) }}
			{{ form_row(form.role) }}
			{{ form_row(form.reference) }}
			{{ form_row(form.montant) }}
			<div class='row mt-4'>
			{% if form.payMLC is defined %}
				<div class='col-6'>
					{{ form_widget(form.payMLC) }}
				</div>
				<div class='col-6'>
			{% else %}
				<div class='col-12'>
			{% endif %}
			{% if form.payCB is defined %}
				<div class='col-6'>
					{{ form_widget(form.payCB) }}
				</div>
				<div class='col-6'>
			{% else %}
				<div class='col-12'>
			{% endif %}
				</div>
			</div>
		{{ form_end(form) }}
	</div>
</div>
{% endblock %}