comparison templates/default/association/membership.html @ 0:09d66acc7c73

initial commit, website first draft: - presentation page - documentation (generated from backend and Libervia) - social contract (HTML generated from sat repository) - press/conferences (adapted from former website) - association page (adpated from former website) - news (a selected blog is displayed) - fr i18n
author Goffi <goffi@goffi.org>
date Sun, 26 May 2019 22:26:30 +0200
parents
children 67487063f421
comparison
equal deleted inserted replaced
-1:000000000000 0:09d66acc7c73
1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
2 {% import 'input/form.html' as form with context %}
3 {% import 'input/field.html' as field with context %}
4
5 {% block body %}
6 <h1 class='heading__subtitle'>{% trans %}Salut à Toi association membership request{% endtrans %}</h1>
7 <p class='instructions--head'>{% trans %}Please fill the form below if you're willing to join the Salut à Toi association.{% endtrans %}</p>
8 <div>
9 {% call form.form(class="form--paper form__panel--center") %}
10 <h3 class="center">{% trans %}Identity{% endtrans %}</h3 class="center">
11 {{ field.text("firstname",
12 _("firstname"),
13 placeholder=_("Given name"),
14 required=true,
15 class="form__field--big") }}
16 {{ field.text("name",
17 _("name"),
18 placeholder=_("Family name"),
19 required=true,
20 class="form__field--big") }}
21 {{ field.textarea("address",
22 _("address"),
23 placeholder=_("Address, post code, city"),
24 required=true,
25 class="form__field--big") }}
26 <h3 class="center">{% trans %}Contacts{% endtrans %}</h3 class="center">
27 {{ field.email("email",
28 _("email address"),
29 placeholder=_("please double check your email address"),
30 required=true,
31 class="form__field--big") }}
32 {{ field.text("jid",
33 "Jabber ID",
34 placeholder=_("XMPP identifier (may be your SàT login)"),
35 class="form__field--big") }}
36 <h3 class="center">{% trans %}Subscription{% endtrans %}</h3 class="center">
37 {{ field.select("subscription",
38 (("0", _("0€")),
39 ("10", _("10€")),
40 ("20", _("20€")),
41 ("30", _("30€")),
42 ("50", _("50€")),
43 ("80", _("80€")),
44 ("100", _("100€"))),
45 selected=["10"],
46 required=true,
47 class="form__field--big",
48 ) }}
49 <h3 class="center">{% trans %}Reference{% endtrans %}</h3 class="center">
50 {{ field.text("reference",
51 _("reference (in case of renewal)"),
52 placeholder=_("Your adherent number. You may let empty if you don't know it."),
53 class="form__field--big") }}
54 <h3 class="center">{% trans %}Comment{% endtrans %}</h3 class="center">
55 {{ field.textarea("comment",
56 _("comment"),
57 placeholder=_("This is a free field if you have anything to say or request."),
58 class="form__field--big") }}
59
60 {{ field.checkbox("mailing_list",
61 _("I would like to subscribe to the adherents' mailing list (low traffic)."),
62 checked=true) }}
63 {{ field.checkbox("documents_read",
64 _("I have read the %(statutes)s and %(rules)s and I agree with both of them",
65 statutes='<a href="https://repos.goffi.org/sat_docs/raw-file/tip/association/statuts.pdf">'|safe + _("statutes") + '</a>'|safe,
66 rules='<a href="https://repos.goffi.org/sat_docs/raw-file/tip/association/r%C3%A8glement%20int%C3%A9rieur.pdf">'|safe + _("rules") + '</a>'|safe,
67 ),
68 checked=false,
69 required=true) }}
70 {{ field.submit(_("join the association"), id="membership_submit") }}
71 {% endcall %}
72 </div>
73
74 <script>
75 /* Q&D way to have form submit disabled if documents_read is not checked
76
77 TODO: do this in a cleaner way
78 */
79 let membership_submit = document.getElementById("membership_submit");
80 let documents_read = document.getElementById("documents_read")
81
82 documents_read.addEventListener(
83 "click",
84 function() {
85 membership_submit.disabled = !documents_read.checked;
86 }
87 );
88
89 membership_submit.disabled=true;
90 </script>
91 {% endblock body %}