From 6764c289ffdc50c9d4a477a8c76caf94fad318ac Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Wed, 17 May 2017 20:17:26 -0600 Subject: [PATCH] Merge last couple of months of work (#45) * Load webpack only in debug. * Clean up. * Pin versions because problems * Add licence. (#40) * Disable form until valid. (#42) * Allow input height to be greater than 24px. (#41) * Add youth payment type. (#43) --- LICENSE | 7 +++ .../bikeshop/settings/production.py | 2 +- .../migrations/0004_auto_20170502_0120.py | 20 ++++++++ bikeshop_project/core/models.py | 1 + bikeshop_project/core/static/scss/screen.scss | 9 +++- bikeshop_project/package.json | 4 +- .../templates/edit_member_form.html | 15 +++++- .../registration/templates/member_form.html | 51 ++++++------------- bikeshop_project/webpack.dev.config.js | 1 - 9 files changed, 68 insertions(+), 42 deletions(-) create mode 100644 LICENSE create mode 100644 bikeshop_project/core/migrations/0004_auto_20170502_0120.py diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2f9b439 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2017 Bridge City Bicycle Co-op Ltd. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bikeshop_project/bikeshop/settings/production.py b/bikeshop_project/bikeshop/settings/production.py index e668e04..704c3a0 100644 --- a/bikeshop_project/bikeshop/settings/production.py +++ b/bikeshop_project/bikeshop/settings/production.py @@ -1,5 +1,5 @@ +import os import sys - import rollbar from .base import * # noqa diff --git a/bikeshop_project/core/migrations/0004_auto_20170502_0120.py b/bikeshop_project/core/migrations/0004_auto_20170502_0120.py new file mode 100644 index 0000000..63494da --- /dev/null +++ b/bikeshop_project/core/migrations/0004_auto_20170502_0120.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.4 on 2017-05-02 01:20 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0003_auto_20170219_1741'), + ] + + operations = [ + migrations.AlterField( + model_name='payment', + name='type', + field=models.CharField(choices=[('NONE', 'None'), ('CASH', 'Cash'), ('CHEQUE', 'Cheque'), ('VOLUNTEERING', 'Volunteering'), ('SQUARE', 'Square'), ('PAYPAL', 'PayPal'), ('YOUTH', 'Youth'), ('UNKNOWN', 'Unknown')], default='NONE', max_length=12), + ), + ] diff --git a/bikeshop_project/core/models.py b/bikeshop_project/core/models.py index c1efc75..8a2884c 100644 --- a/bikeshop_project/core/models.py +++ b/bikeshop_project/core/models.py @@ -40,6 +40,7 @@ class Payment(models.Model): ('VOLUNTEERING', 'Volunteering'), ('SQUARE', 'Square'), ('PAYPAL', 'PayPal'), + ('YOUTH', 'Youth'), ('UNKNOWN', 'Unknown') ) type = models.CharField(max_length=12, choices=payment_choices, default='NONE') diff --git a/bikeshop_project/core/static/scss/screen.scss b/bikeshop_project/core/static/scss/screen.scss index d5c9245..9d19eb9 100644 --- a/bikeshop_project/core/static/scss/screen.scss +++ b/bikeshop_project/core/static/scss/screen.scss @@ -372,4 +372,11 @@ span.mdl-textfield__error, span.error { html [type="button"] { -webkit-appearance: initial !important; -} \ No newline at end of file +} + +#member-form { + .mdl-checkbox { + height: auto; + min-height: 24px; + } +} diff --git a/bikeshop_project/package.json b/bikeshop_project/package.json index 775ec42..b74cd6d 100644 --- a/bikeshop_project/package.json +++ b/bikeshop_project/package.json @@ -17,7 +17,7 @@ "react": "^15.4.1", "react-dom": "^15.4.1", "react-tap-event-plugin": "^2.0.1", - "webpack": "^1.13.1", + "webpack": "1.13.1", "webpack-bundle-tracker": "0.0.93" }, "devDependencies": { @@ -44,6 +44,6 @@ "sass-loader": "^3.2.0", "style-loader": "^0.13.1", "toolbox-loader": "0.0.3", - "webpack-dev-server": "^1.14.1" + "webpack-dev-server": "1.14.1" } } diff --git a/bikeshop_project/registration/templates/edit_member_form.html b/bikeshop_project/registration/templates/edit_member_form.html index 61064b1..50d2bc1 100644 --- a/bikeshop_project/registration/templates/edit_member_form.html +++ b/bikeshop_project/registration/templates/edit_member_form.html @@ -4,7 +4,8 @@ {% block scripts %} {% endblock %} @@ -220,7 +231,7 @@
-
diff --git a/bikeshop_project/registration/templates/member_form.html b/bikeshop_project/registration/templates/member_form.html index ffa6436..c7fa453 100644 --- a/bikeshop_project/registration/templates/member_form.html +++ b/bikeshop_project/registration/templates/member_form.html @@ -25,6 +25,15 @@ var waiverCheckBox = document.getElementById('{{ form.waiver_substitute.id_for_label }}'); var submitButton = document.getElementById('submit'); + var form = document.getElementsByTagName('form')[0]; + var inputs = Array.prototype.slice.call(document.getElementsByTagName('input')); + + for (var anInput of inputs) { + anInput.addEventListener('change', function() { + submitButton.disabled = !form.checkValidity() + }) + } + var requiredCheckboxes = function() { return waiverCheckBox.checked; }; @@ -47,7 +56,7 @@ {% endblock %} {% block content %} -
+

New Contact

The Bridge City Bicycle Co-operative (herein referred to as The BCBC and The Community) is a nonprofit, @@ -182,45 +191,17 @@

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:

(A) Waive, Release and Discharge from any and all liability for my death, disability, personal injury, property damage, property theft or actions of any kind which may hereafter accrue to me including my travelling to and from space or using the shop's bicycle, equipment or other facilities, THE FOLLOWING ENTITIES OR PERSONS: The directors, officers, employees, volunteers, representatives, and agents, the event holders, sponsors, volunteers of the Community;

(B) Indemnify and Hold Harmless the entities and persons set forth in (A) above from any and all liabilities and claims arising from my participation in the Community, including my use of a bicycle belonging to the Community, irrespective of whether the cause of the claims or liability arise from the negligence, acts or omissions of me, a third party, or the Community.

+
-{#
#} -{#

Privacy Policy

#} -{#

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.

#} -{#

Contact BCBC’s Privacy Officer at:#} -{#
905 20th Street West Saskatoon, SK S7M 0Y5 or by:#} -{#
Email: bridgecitybicyclecoop@gmail.com

#} -{#
#} -{#
#} -{#

Membership and Privileges

#} -{#

I acknowledge that my Membership and Privileges in the Bridge City Bicycle Co-operative is contingent#} -{# upon fulfilling the above responsibilities.

#} -{# #} -{#
#} -
- +
+
+ +
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/bikeshop_project/webpack.dev.config.js b/bikeshop_project/webpack.dev.config.js index 8d55b75..7b4f3af 100644 --- a/bikeshop_project/webpack.dev.config.js +++ b/bikeshop_project/webpack.dev.config.js @@ -3,7 +3,6 @@ const BundleTracker = require('webpack-bundle-tracker'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); require('babel-polyfill'); - const config = require('./webpack.base.config.js'); // Use webpack dev server