Browse Source

Remove fields for a new user.

Will collect these when someone wants to become a member.
feature/python-error-tracking
Drew Larson 9 years ago
parent
commit
dc20ca5888
  1. 15
      bikeshop_project/registration/forms.py
  2. 163
      bikeshop_project/registration/templates/member_form.html

15
bikeshop_project/registration/forms.py

@ -4,9 +4,9 @@ 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'}))
# 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:
@ -24,8 +24,7 @@ class MemberForm(ModelForm):
)
exclude = ('waiver',)
fields = ['email', 'email_consent', 'first_name', 'last_name', 'preferred_name', 'date_of_birth',
'guardian_name', 'phone', 'street', 'city', 'province', 'country', 'post_code', 'self_identification',
'gender', 'waiver']
'guardian_name', 'phone', 'street', 'city', 'province', 'country', 'post_code', 'waiver']
widgets = {
'email': EmailInput(attrs={'class': 'mdl-textfield__input'}),
'email_consent': CheckboxInput(attrs={'class': 'mdl-checkbox__input'}),
@ -41,9 +40,9 @@ 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'}),
# 'self_identification': CheckboxSelectMultiple(choices=self_ident_choices,
# attrs={'class': 'mdl-checkbox__input'}),
# 'gender': CheckboxSelectMultiple(choices=gender_choices, attrs={'class': 'mdl-checkbox__input'}),
}
labels = {

163
bikeshop_project/registration/templates/member_form.html

@ -36,24 +36,17 @@
});
var waiverCheckBox = document.getElementById('{{ form.waiver_substitute.id_for_label }}');
var privelegesCheckBox = document.getElementById('{{ form.priveleges.id_for_label }}');
var submitButton = document.getElementById('submit');
var requiredCheckboxes = function() {
return (waiverCheckBox.checked &&
privelegesCheckBox.checked);
return waiverCheckBox.checked;
};
waiverCheckBox.addEventListener('change', function() {
console.log(requiredCheckboxes())
if (requiredCheckboxes()) {
submitButton.disabled = false;
}
});
privelegesCheckBox.addEventListener('change', function() {
console.log(requiredCheckboxes())
if (requiredCheckboxes()) {
submitButton.disabled = false;
else {
submitButton.disabled = true;
}
});
@ -67,7 +60,7 @@
{% block content %}
<div class="mdl-cell mdl-cell--8-col">
<h1>Membership</h1>
<h1>New Contact</h1>
<p>
The Bridge City Bicycle Co-operative (herein referred to as The BCBC and The Community) is a nonprofit,
community bicycle repair education and resource co-operative. We offer our members nonjudgmental repair
@ -191,50 +184,50 @@
<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="">#}
{# <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">Member Liability Waiver</h6>
<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.
<br>Children under the age of 13 must have guardian supervision when participating in BCBC activities and events.</strong></p>
<p>By signing this form in the space provided below, I hereby assume all of the risks of participating and/or volunteering in the Bridge City Bicycle Co-operative, hereinafter referred to as the BCBC and the Community. I realize that liability may arise from negligence or carelessness on the part of the persons or entities being released, from dangerous or defective equipment or property owned, maintained or controlled by them or because of their possible liability without fault. I acknowledge that this Accident Waiver and Release of Liability form will be used by the Community, sponsors and organizers, in which I may participate and that it will govern my actions and responsibilities during my use of its services. In consideration of my application and permitting me to participate in this program, I hereby take action for myself, my executors, administrators, heirs, next of kin, successors, and assigns as follows:</p>
@ -245,37 +238,37 @@
<span class="mdl-checkbox__label">{{ form.waiver_substitute.label }}</span>
</label>
</div>
<div>
<h2 class="template__header mdl-typography--title">Privacy Policy</h2>
<p>Bridge City Bicycle Co-operative (BCBC) values the trust of its volunteers, staff, and members and
is committed to protecting the privacy of all personal information entrusted to it. BCBC only
collects the limited personal information needed to deliver high quality services and programming.
Collected information will be used only for the purpose expressly identified or for other purposes
which could be reasonably considered to be consistent with out mission. We do not sell, rent or
trade personal information. The personal information collected will be protected with appropriate
physical, organizational, and electronic safeguards to prevent unauthorized use and will be
retained only for as long as needed to achieve the purposes stated above. BCBC may make personal
information available to others or to appropriate authorities without permission if the information
is used to take action during an emergency that threatens the life, health or security of an
individual. Information no longer required will be destroyed or erased. Upon application to the
Privacy Officer individuals may access their personal information held by BCBC unless the
information contains references to other individuals or cannot be disclosed for legal or security
reasons. BCBC commits to promptly correcting any inaccuracies. Complaints should be made in writing
to the Privacy Officer who will immediately acknowledge receipt and will respond to the complaint
within 30 days. Unresolved complaints may be taken to the federal Privacy Commissioner.</p>
<p>Contact BCBC’s Privacy Officer at:
<br>905 20th Street West Saskatoon, SK S7M 0Y5 or by:
<br>Email: <a href="mailto:bridgecitybicyclecoop@gmail.com">bridgecitybicyclecoop@gmail.com</a></p>
</div>
<div>
<h2 class="template__header mdl-typography--title">Membership and Privileges</h2>
<p>I acknowledge that my Membership and Privileges in the Bridge City Bicycle Co-operative is contingent
upon fulfilling the above responsibilities.</p>
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="{{ form.priveleges.id_for_label }}">
{{ form.priveleges }}
<span class="mdl-checkbox__label">{{ form.priveleges.label }}</span>
</label>
</div>
{# <div>#}
{# <h2 class="template__header mdl-typography--title">Privacy Policy</h2>#}
{# <p>Bridge City Bicycle Co-operative (BCBC) values the trust of its volunteers, staff, and members and#}
{# is committed to protecting the privacy of all personal information entrusted to it. BCBC only#}
{# collects the limited personal information needed to deliver high quality services and programming.#}
{# Collected information will be used only for the purpose expressly identified or for other purposes#}
{# which could be reasonably considered to be consistent with out mission. We do not sell, rent or#}
{# trade personal information. The personal information collected will be protected with appropriate#}
{# physical, organizational, and electronic safeguards to prevent unauthorized use and will be#}
{# retained only for as long as needed to achieve the purposes stated above. BCBC may make personal#}
{# information available to others or to appropriate authorities without permission if the information#}
{# is used to take action during an emergency that threatens the life, health or security of an#}
{# individual. Information no longer required will be destroyed or erased. Upon application to the#}
{# Privacy Officer individuals may access their personal information held by BCBC unless the#}
{# information contains references to other individuals or cannot be disclosed for legal or security#}
{# reasons. BCBC commits to promptly correcting any inaccuracies. Complaints should be made in writing#}
{# to the Privacy Officer who will immediately acknowledge receipt and will respond to the complaint#}
{# within 30 days. Unresolved complaints may be taken to the federal Privacy Commissioner.</p>#}
{# <p>Contact BCBC’s Privacy Officer at:#}
{# <br>905 20th Street West Saskatoon, SK S7M 0Y5 or by:#}
{# <br>Email: <a href="mailto:bridgecitybicyclecoop@gmail.com">bridgecitybicyclecoop@gmail.com</a></p>#}
{# </div>#}
{# <div>#}
{# <h2 class="template__header mdl-typography--title">Membership and Privileges</h2>#}
{# <p>I acknowledge that my Membership and Privileges in the Bridge City Bicycle Co-operative is contingent#}
{# upon fulfilling the above responsibilities.</p>#}
{# <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="{{ form.priveleges.id_for_label }}">#}
{# {{ form.priveleges }}#}
{# <span class="mdl-checkbox__label">{{ form.priveleges.label }}</span>#}
{# </label>#}
{# </div>#}
<div>
<button disabled="true" id="submit" type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored">Submit</button>
</div>

Loading…
Cancel
Save