Files
@ 9954f35f0971
Branch filter:
Location: C3L/C3L-Membership-Online-Form/c3l_membership/forms.py
9954f35f0971
3.0 KiB
text/x-python
Add birthday field
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | from datetime import date
from flask_wtf import Form
from wtforms import BooleanField, RadioField, StringField, SubmitField
from wtforms.fields.html5 import DateField
from wtforms.validators import Email, InputRequired, Length, Optional, Required
class MembershipForm(Form):
username = StringField(
"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")
|