{% extends '@kohinos/block/block_collapse.html.twig' %}

{% block blocktitle %}
	<i class="fa fa-user-tie mr-4"></i> {{ getSolidoumeParam('name')|default('Sécurité Sociale Alimentaire') }}
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
{% block blockcontent %}
	{% set participation = getSolidoumeParticipation() %}
	{% if participation == null %}
		<p>{{ getSolidoumeParam('description')|raw }}</p><br/>
		<a class='btn btn-primary' href='{{ path('solidoume_adherer') }}'>{{ "Participer"|trans }}</a>
	{% else %}
		<p>Vous participez déjà au programme {{ getSolidoumeParam('name') }} à hauteur de <b>{{ participation.amount }} &euro;</b>.</p>
		<a class='btn btn-primary' href='{{ path('solidoume_adherer') }}'>{{ "Modifier votre participation"|trans }}</a>
	{% endif %}
	{# {% set form = getSolidoumeForm() %}
	{% if form != null %}
		<p>{{ getSolidoumeParam('description')|raw }}</p>
		{{form_start(form)}}
			{{ form_row(form.user) }}
			{{ form_row(form.adherent) }}
			<div class='mb-4'>{{ form_row(form.amount) }}</div>
			{{ form_row(form.isRecurrent) }}
			{{ form_row(form.paiementDate) }}
			{{ form_row(form.isDonation) }}
			{{ form_row(form.save) }}
		{{form_end(form)}}
	{% endif %} #}
{% endblock blockcontent %}