Some stuff I did. Sorry Arlin.

This commit is contained in:
Drew Larson
2016-05-31 09:21:38 -06:00
parent c8848cf7ce
commit 0c99334cd5
9 changed files with 249 additions and 67 deletions
+1 -17
View File
@@ -4,24 +4,11 @@ from registration.models import Member
class MemberForm(ModelForm):
# self_ident_other = CharField(required=False, label='Self identification', widget=TextInput(attrs={'class': 'mdl-textfield__input'}))
# gender_other = CharField(required=False, label='Other', widget=TextInput(attrs={'class': 'mdl-textfield__input'}))
# priveleges = BooleanField(label='I acknowledge', widget=CheckboxInput(attrs={'class': 'mdl-checkbox__input'}))
waiver_substitute = BooleanField(label='I have read and agree to the above terms & conditions.', widget=CheckboxInput(attrs={'class': 'mdl-checkbox__input'}))
class Meta:
model = Member
self_ident_choices = (
('First Nations; Métis; or Inuit', 'First Nations; Métis; or Inuit'),
('visible minority', 'Visible Minority'),
('caucasian', 'Caucasian'),
('Other', 'Other')
)
gender_choices = (
('male', 'Male'),
('female', 'Female'),
('other', 'other')
)
exclude = ('waiver',)
fields = ['email', 'email_consent', 'first_name', 'last_name', 'preferred_name', 'date_of_birth',
'guardian_name', 'phone', 'street', 'city', 'province', 'country', 'post_code', 'waiver']
@@ -40,9 +27,6 @@ class MemberForm(ModelForm):
'country': TextInput(attrs={'class': 'mdl-textfield__input'}),
'post_code': TextInput(attrs={'class': 'mdl-textfield__input',
'pattern': '[A-Za-z][0-9][A-Za-z] [0-9][A-Za-z][0-9]'}),
# 'self_identification': CheckboxSelectMultiple(choices=self_ident_choices,
# attrs={'class': 'mdl-checkbox__input'}),
# 'gender': CheckboxSelectMultiple(choices=gender_choices, attrs={'class': 'mdl-checkbox__input'}),
}
labels = {
@@ -184,48 +184,7 @@
<span class="mdl-textfield__error">{{ form.country.errors }}</span>
{% endif %}
</div>
{# <div class="">#}
{# <h2 class="template__header mdl-typography--title">Voluntary Self Identification</h2>#}
{# <p>We want to make sure that all members of our community, regardless of race, ethnicity, and gender#}
{# are able to participate fully in the BCBC. Please share information about your race and/or#}
{# ethnicity so that we can track how well we are including all communities and whether there may be#}
{# barriers to certain groups participation. Thank you! Do you identify as: (In each category, check#}
{# all that apply)</p>#}
{# {% for checkbox in form.self_identification %}#}
{# <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="{{ checkbox.id_for_label }}">#}
{# {{ checkbox }}#}
{# <span class="mdl-checkbox__label">{{ checkbox.label }}</span>#}
{# </label>#}
{# {% endfor %}#}
{# {% if form.self_identification.errors %}#}
{# <span class="mdl-textfield__error">{{ form.self_identification.errors }}</span>#}
{# {% else %}#}
{# <span class="mdl-textfield__error">Hmm</span>#}
{# {% endif %}#}
{# </div>#}
{# <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label {% if form.gender_other.errors %}is-invalid{% endif %}">#}
{# {{ form.self_ident_other }}#}
{# <label class="mdl-textfield__label" for="{{ form.self_ident_other.id_for_label }}">{{ form.self_ident_other.label }}</label>#}
{# {% if form.self_ident_other.errors %}#}
{# <span class="mdl-textfield__error">{{ form.self_ident_other.errors }}</span>#}
{# {% endif %}#}
{# </div>#}
{# <div class="">#}
{# <h3 class="template__header mdl-typography--body-2">Gender Identification</h3>#}
{# {% for checkbox in form.gender %}#}
{# <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="{{ checkbox.id_for_label }}">#}
{# {{ checkbox }}#}
{# <span class="mdl-checkbox__label">{{ checkbox.label }}</span>#}
{# </label>#}
{# {% endfor %}#}
{# </div>#}
{# <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label {% if form.gender_other.errors %}is-invalid{% endif %}">#}
{# {{ form.gender_other }}#}
{# <label class="mdl-textfield__label" for="{{ form.gender_other.id_for_label }}">{{ form.gender_other.label }}</label>#}
{# {% if form.gender_other.errors %}#}
{# <span class="mdl-textfield__error">{{ form.gender_other.errors }}</span>#}
{# {% endif %}#}
{# </div>#}
<div class="">
<h6 class="template__header mdl-typography--title">Liability Waiver</h6>
<p><strong>Children under the age of 18 must have a parent or guardian co-sign the following waiver form.