{% from 'message_box.html' import message_box %} {% macro render_group_panel(membership, group, registration, from_management=false, switchable_plans=()) %} {% set plan = group.pricing_plan %} {% set chosen = group.chosen_plan %} {# Leadership is not taken off a leader whose registration is withdrawn or rejected, so being the recorded leader is not enough to be offered the leader's two buttons: `RHGroupLeaderBase._check_access` refuses both to anybody core no longer calls active, and a button that answers 403 is worse than no button. #} {% set is_leader = group.leader_registration_id == registration.id and registration.is_active %} {% set join_url = url_for_plugin('group_registration.join_link', group.registration_form, join_uuid=group.join_uuid, _external=true) %} {# The hook this macro answers is rendered *inside* `
|
{#
`data-group-balance-due` is read by `balanceBadge.js`, which corrects the
invoice box: core prints "Paid" there from the transaction alone, so a
member repriced above what they handed over is labelled settled on the
very page that shows they are not. The attribute is only on the panel
when there is something to correct.
#}
0 %} data-group-balance-due="{{ membership.balance_due }}"{% endif %}>
{% trans name=group.name %}Group: {{ name }}{% endtrans %}
{% if group.state.name == 'forming' %}
{% trans seats=group.seats_left, target=group.target_size, label=chosen.label if chosen else '' -%} Your group needs {{ seats }} more member(s) to reach {{ target }} and confirm the "{{ label }}" rate. Share the code or the link below -- it will confirm itself the moment the last seat is filled. {%- endtrans %} {% elif group.state.name == 'confirmed' %}{# Whether a confirmed rate is settled is the organizer's `revoke_on_member_loss`: with it on, a member who leaves or is rejected drops the group back to `forming`, and this is the page the member checks afterwards. Saying the amount cannot change and then changing it is the one thing the panel must not do. #} {% if group.reprices_on_member_loss %} {% trans label=chosen.label if chosen else '', target=group.target_size -%} This group is confirmed on the "{{ label }}" rate. It keeps that rate while it has its {{ target }} members -- if one of them leaves or is rejected, the group goes back to forming and has to fill again before the deadline, or everyone in it is repriced. {%- endtrans %} {% else %} {% trans label=chosen.label if chosen else '' -%} This group is confirmed on the "{{ label }}" rate. The amount you pay will not change. {%- endtrans %} {% endif %} {% elif group.state.name == 'short' %}{% if plan %} {% trans aimed=chosen.label if chosen else '', label=plan.label -%} This group did not reach the "{{ aimed }}" seat count by the deadline, so the "{{ label }}" rate was applied instead. {%- endtrans %} {% else %} {% trans aimed=chosen.label if chosen else '' -%} This group did not reach the "{{ aimed }}" seat count by the deadline and does not qualify for a group rate, so the standard rate now applies. {%- endtrans %} {% endif %} {% elif group.state.name == 'dissolved' %}{% trans %}This group has been dissolved by the organizers and no group rate applies.{% endtrans %} {% endif %} {# Not confined to a short group: dissolving one puts its members back on the standard rate, which raises the price of anybody who had already paid the group's. The organizer reads this off the "Outstanding balance" section on their own page instead, which is the one that carries the button. #} {% if membership.balance_due > 0 and not from_management %} {# `i-callout` is not an Indico class; this is the one it really has. #} {% call message_box('warning') %} {% trans balance=format_currency(membership.balance_due, registration.currency) -%} You have an outstanding balance of {{ balance }}. Please contact the organizers to settle it. {%- endtrans %} {% trans -%} Until it is settled your registration stays on "awaiting payment". The checkout cannot take the difference on its own, so please arrange it with the organizers rather than paying again here. {%- endtrans %} {% endcall %} {% endif %} {% if group.state.name == 'forming' %}{% trans %}Send these to the people you want in your group however you like -- we do not e-mail them for you.{% endtrans %} {% endif %}
|
|||||