mirror of
https://github.com/ae-utbm/sith.git
synced 2026-05-14 04:58:06 +00:00
Apply review comments
This commit is contained in:
@@ -6,41 +6,29 @@
|
||||
>
|
||||
{% csrf_token %}
|
||||
|
||||
{% set alpine_input_attrs = {
|
||||
'id_member': 'x-ref=userSelect,x-model=selectedUser',
|
||||
'id_birthdate': ':value=dateOfBirth,:hidden=dateOfBirthHidden',
|
||||
} %}
|
||||
|
||||
{% set alpine_field_attrs = {
|
||||
'id_birthdate': (':hidden=dateOfBirthHidden', 'x-cloack')
|
||||
} %}
|
||||
|
||||
<div x-data="existing_user_subscription_form()" class="form-content existing-user">
|
||||
<div x-data="existing_user_subscription_form" class="form-content existing-user">
|
||||
<fieldset>
|
||||
{% if form.errors %}
|
||||
{{ form.errors.__all__ }}
|
||||
{% endif %}
|
||||
{% for field in form %}
|
||||
<div
|
||||
class="form-group"
|
||||
{% for attr in alpine_field_attrs.get(field.auto_id, []) %}
|
||||
{{ attr }}
|
||||
{% endfor %}>
|
||||
{{ field.label_tag() }}
|
||||
{{ field|add_attr(alpine_input_attrs.get(field.auto_id, "")) }}
|
||||
{% if field.help_text %}
|
||||
<span class="helptext">{{ field.help_text }}</span>
|
||||
{% endif %}
|
||||
{% if field.name == "payment_method" %}
|
||||
<i>
|
||||
{% trans trimmed %}
|
||||
If the subscription is done using the AE account,
|
||||
you must also click it on the AE counter.
|
||||
{% endtrans %}
|
||||
</i>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{{ form.non_field_errors() }}
|
||||
<div class="form-group">
|
||||
{{ form.member.label_tag() }}
|
||||
{{ form.member|add_attr("x-ref=userSelect,x-model=selectedUser") }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.birthdate.label_tag() }}
|
||||
{{ form.birthdate|add_attr(":value=dateOfBirth,:hidden=dateOfBirthHidden,:type=dateOfBirthHidden ? 'hidden' : 'date'") }}
|
||||
<span class="helptext">{{ form.birthdate.help_text }}</span>
|
||||
</div>
|
||||
<div class="form-group">{{ form.subscription_type.as_field_group() }}</div>
|
||||
<div class="form-group">
|
||||
{{ form.payment_method.as_field_group() }}
|
||||
<i>
|
||||
{% trans trimmed %}
|
||||
If the subscription is done using the AE account,
|
||||
you must also click it on the AE counter.
|
||||
{% endtrans %}
|
||||
</i>
|
||||
</div>
|
||||
<div class="form-group">{{ form.location.as_field_group() }}</div>
|
||||
</fieldset>
|
||||
<div
|
||||
id="subscription-form-user-mini-profile"
|
||||
|
||||
Reference in New Issue
Block a user