Changeset - 9954f35f0971
[Not reviewed]
default
0 3 0
Dennis Fink - 4 years ago 2021-06-14 20:44:36
dennis.fink@c3l.lu
Add birthday field
3 files changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
c3l_membership/forms.py
Show inline comments
 
@@ -12,94 +12,96 @@ class MembershipForm(Form):
 
        "Username",
 
        validators=[InputRequired("This field is required!"), Length(max=255)],
 
    )
 
    email = StringField(
 
        "E-Mail", validators=[InputRequired("This field is required!"), Email()]
 
    )
 
    fullname = StringField(
 
        "Full Name",
 
        validators=[InputRequired("This field is required!"), Length(max=65536)],
 
    )
 

	
 
    membership = RadioField(
 
        "Membership Plan",
 
        validators=[InputRequired("Please select one of the options!")],
 
        choices=[
 
            (
 
                "regular",
 
                "Regular membership - Membership with voting rights on the general assembly.",
 
            ),
 
            (
 
                "supporting",
 
                "Supporting membership - Membership without voting rights on the general assembly.",
 
            ),
 
        ],
 
    )
 

	
 
    student = BooleanField(
 
        ("I am a student and would like to have the reduced membership fees."),
 
    )
 

	
 
    starving = BooleanField(
 
        (
 
            "I am a starving hacker and cannot afford the membership! (Please get in touch with us at info@c3l.lu before filling out this membership form)"
 
        )
 
    )
 

	
 
    payment = RadioField(
 
        "Payment Options",
 
        validators=[InputRequired("Please select one of the options!")],
 
        choices=[
 
            ("cash", "by cash"),
 
            ("wire transfer", "by wire transfer"),
 
            ("digicash", "by DigiCash"),
 
            ("bitcoin", "by bitcoin"),
 
            ("ethereum", "by ethereum"),
 
        ],
 
    )
 

	
 
    birthday = DateField("Birthday")
 

	
 
    street = StringField(
 
        "Nr., Street",
 
        validators=[Length(max=4000)],
 
    )
 
    zip = StringField(
 
        "Postal Code",
 
        validators=[Length(max=30)],
 
    )
 

	
 
    city = StringField(
 
        "City/Town",
 
        validators=[Length(max=500)],
 
    )
 

	
 
    state = StringField(
 
        "State/County/Province",
 
        validators=[Length(max=500)],
 
    )
 

	
 
    country = StringField(
 
        "Country",
 
        validators=[Length(max=500)],
 
    )
 

	
 
    gpg = StringField(
 
        "GPG-ID",
 
        validators=[Optional(), Length(max=18)],
 
    )
 
    jabber = StringField("Jabber Handle", validators=[Optional(), Email()])
 
    twitter = StringField("Twitter Handle", validators=[Optional()])
 

	
 
    terms = BooleanField(
 
        (
 
            "By submitting this membership application, you agree to have read and understood "
 
            'the <a href="http://statutes.c3l.lu">statutes of the Chaos Computer Club Lëtzebuerg A.S.B.L.</a>'
 
        ),
 
        validators=[InputRequired()],
 
    )
 

	
 
    minor_member = BooleanField(
 
        (
 
            "I am under 18 years of age and have the approval of my legal representative."
 
        ),
 
    )
 

	
 
    submit = SubmitField("Become a member")
c3l_membership/templates/index.html
Show inline comments
 
@@ -59,96 +59,102 @@
 
              {{ option() }}
 
              {{ option.label.text }}
 
            </label>
 
            {% endfor %}
 
            <div class="pure-g">
 
              <div class="pure-u-1-1">
 
                <label for="{{ form.student.id }}" class="pure-checkbox">
 
                {{ form.student }} {{ form.student.label.text|safe}}
 
                </label>
 
              </div>
 
            </div>
 
            <div class="pure-g">
 
              <div class="pure-u-1-1">
 
                <label for="{{ form.starving.id }}" class="pure-checkbox">
 
                  {{ form.starving }} {{ form.starving.label.text|safe}}
 
                </label>
 
              </div>
 
            </div>
 
            <h3>What's difference between the different membership options?</h3>
 
            <p>All the options include to following benefits:</p>
 
            <ul>
 
              <li>Access to the <a href="https://wiki.c3l.lu/doku.php?id=organization:membership#benefits">services</a> run by us</li>
 
              <li>Access to our <a href="https://wiki.c3l.lu/doku.php?id=chaosstuff:bootstrap">hackerspace: ChaosStuff</a></li>
 
            </ul>
 
            <p>Becoming a regular/student member gives you these additional benefits:</p>
 
            <ul>
 
              <li>Voting rights on general assemblys</li>
 
              <li>Access to our internal mailinglist</li>
 
            </ul>
 
            <p>You can read more on the membership <a href="https://wiki.c3l.lu/doku.php?id=organization:membership">here</a>.</p>
 
            <h3>I cannot afford the membership?</h3>
 
            <p>If you cannot afford the membership, please contact us via info@c3l.lu first, before filling out the membership form. We will try to find a solution together.</p>
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.payment.label }}</b>
 
            {% for option in form.payment %}
 
            <label for="{{ option.id }}" class="pure-radio pure-u-1-1">
 
              {{ option() }}
 
              {{ option.label.text }}
 
            </label>
 
            {% endfor %}
 
          </div>
 
        </div>
 
        <legend>Additional information</legend>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.birthday.label }}</b>
 
            {{ form.birthday(class="pure-u-1-1") }}
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.street.label }}</b>
 
            {{ form.street(class="pure-u-1-1") }}
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.zip.label }}</b>
 
            {{ form.zip(class="pure-u-1-1") }}
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.city.label }}</b>
 
            {{ form.city(class="pure-u-1-1") }}
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.state.label }}</b>
 
            {{ form.state(class="pure-u-1-1") }}
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.country.label }}</b>
 
            {{ form.country(class="pure-u-1-1") }}
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.gpg.label }}</b>
 
            <b>{{ form.gpg(class="pure-u-1-1") }}</b>
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.jabber.label }}</b>
 
            {{ form.jabber(class="pure-u-1-1") }}
 
          </div>
 
        </div>
 
        <div class="pure-g">
 
          <div class="pure-u-1-1">
 
            <b>{{ form.twitter.label }}</b>
 
            {{ form.twitter(class="pure-u-1-1") }}
 
          </div>
 
        </div>
 
        <legend></legend>
 
        <label for="{{ form.minor_member.id }}" class="pure-checkbox">
c3l_membership/templates/member.html
Show inline comments
 
<!DOCTYPE html>
 
<html>
 
  <head>
 
   <title>Membership Application - {{ form.username.data }}</title>
 
   <link rel="stylesheet" href="{{ url_for('static', filename='pdf.css') }}" />
 
  </head>
 
  <body>
 
    <img src="{{ url_for('static', filename='images/logo.png') }}"></img>
 
    <h1>Membership Application</h1>
 
    <dl>
 
      <dt>Username:</dt>
 
      <dd>{{ form.username.data }}</dd>
 
      <dt>E-Mail:</dt>
 
      <dd>{{ form.email.data }}</dd>
 
      <dt>Full Name:</dt>
 
      <dd>{{ form.fullname.data }}</dd>
 
      <dt>Birthday:</dt>
 
      <dd>{{ form.birthday.data }}</dd>
 
      <dt>Street:</dt>
 
      <dd>{{ form.street.data if form.street.data else "<i>Not specified</i>"|safe }}</dd>
 
      <dt>ZIP-Code:</dt>
 
      <dd>{{ form.zip.data if form.zip.data else "<i>Not specified</i>"|safe }}</dd>
 
      <dt>City:</dt>
 
      <dd>{{ form.city.data if form.city.data else "<i>Not specified</i>"|safe }}</dd>
 
      <dt>State/County/Province:</dt>
 
      <dd>{{ form.state.data if form.state.data else "<i>Not specified</i>"|safe }}</dd>
 
      <dt>Country:</dt>
 
      <dd>{{ form.country.data if form.country.data else "<i>Not specified</i>"|safe }}</dd>
 
      <dt>Membership Plan:</dt>
 
      <dd>{{ form.membership.data }}</dd>
 
      <dt>Student:</dt>
 
      <dd>{{ "Yes" if form.student.data else "No" }}</dd>
 
      <dt>Starving:</dt>
 
      <dd>{{ "Yes" if form.starving.data else "No" }}</dd>
 
      <dt>Payment:</dt>
 
      <dd>{{ form.payment.data }}</dd>
 
      <dt>Agreed to Terms &amp; Conditions:</dt>
 
      <dd>{{ "Yes" if form.terms.data else "No" }}</dd>
 
      <dt>Minor Member:</dt>
 
      <dd>{{ "Yes" if form.minor_member.data else "No" }}</dd>
 
      <dt>GPG-ID:</dt>
 
      <dd>{{ form.gpg.data or "<i>Not specified</i>"|safe }}</dd>
 
      <dt>Jabber Handle:</dt>
 
      <dd>{{ form.jabber.data or "<i>Not specified</i>"|safe }}</dd>
 
      <dt>Twitter Handle:</dt>
 
      <dd>{{ form.twitter.data or "<i>Not specified</i>"|safe }}</dd>
 
    </dl>
 
    <p>Send this document to the Chaos Computer Club Lëtzebuerg!</p>
 
    {% if form.payment.data == 'wire transfer' %}
 
      <ul class="bank">
 
        <li>Account Holder: Chaos Computer Club Lëtzebuerg</li>
 
        <li>BIC/Swift: BCEELULLXXX</li>
 
        <li>IBAN: LU29 0019 2855 3890 4000</li>
 
        <li>Message: Membership fee {{ year }} {{ form.username.data }}</li>
 
        <li>Amount: {{ price }}€</li>
 
      </ul>
 
    {% elif form.payment.data == 'cash' %}
 
      <p>Please bring {{ price }}€ with you the next time you meet us!</p>
 
    {% elif form.payment.data == 'bitcoin' %}
 
      <div>
 
          <ul class='btctext'>
 
            <li><b>Address:</b> 3BV5UPToMUmXJiqUVndHjSSq2HqDW8npRd</li>
 
            <li><b>Label:</b> Membership Fee</li>
 
            <li><b>Message:</b> {{ year }} {{ form.username.data }}</li>
 
            <li><b>Amount:</b> {{ price }} BTC</li>
 
         </ul>
0 comments (0 inline, 0 general)