ebs/templates/pages/group/show/_logged_without_link.html.twig
Sarahshr 20251f6caf
Feat/adhesion payante front (#716)
* list only user groups with enabled services in create and edit service forms

* feat: add platform membership payment (wip)

* WIP

* revert mollie api key

* remove all option for visibility in services forms

* add quit platform membership

* remove quit platform feature

* fix good route name for payment

* fix review

* fix review 2
2024-10-08 09:48:47 +02:00

31 lines
1.2 KiB
Twig

<div class="row mb-5 flex-lg-column">
{# 1.1 group is free and public, we can join it #}
{% if is_public and group.membership.isFree %}
<form action="{{ path('app_user_group_join', {id: group.id}) }}" method="post">
<input type="hidden"
name="token"
value="{{ csrf_token('join_group') }}"
/>
<div class="d-grid col col-lg-4 mx-auto">
<button class="btn btn-primary"
type="submit">
<i class="bi bi-person-fill-add"></i>
{{ (i18n_prefix ~ '.group_join.form.submit')|trans }}
</button>
</div>
</form>
{# 1.2 group is not free, we have to pay, display the offers #}
{% elseif group.hasActiveOffers %}
{% include 'components/group/_first_offer.html.twig' with {group} %}
{% include 'components/group/_modal_offers.html.twig' with {
offers: group.activeOffers,
prepare_path: 'app_payment_prepare'
} %}
{# 1.3 group is not correclty configured, it doesn't have any offer configured yet. #}
{% else %}
<p class="text-center">{{ (i18n_prefix ~ '.no_offer')|trans }}</p>
{% endif %}
</div>