Browse Source

Merge pull request #23 from BridgeCityBicycleCoop/feature/fix-date-pickers

Fix date pickers
feature/python-error-tracking
Drew Larson 8 years ago
committed by GitHub
parent
commit
c8304b8b0e
  1. 1
      bikeshop_project/core/templates/membership_form.html
  2. 3
      bikeshop_project/registration/templates/member_form.html
  3. 6
      docker/nginx/conf/nginx-site.conf

1
bikeshop_project/core/templates/membership_form.html

@ -152,6 +152,7 @@
{% block scripts %}
<script src="{% static 'vendor/moment/min/moment.min.js' %}"></script>
<script src="{% static 'vendor/draggabilly/dist/draggabilly.pkgd.min.js' %}"></script>
<script src="{% static 'vendor/md-date-time-picker/dist/js/scroll-into-view-if-needed.js' %}"></script>
<script src="{% static 'vendor/md-date-time-picker/dist/js/mdDateTimePicker.min.js' %}"></script>
<script>
var renewedAt = new mdDateTimePicker.default({

3
bikeshop_project/registration/templates/member_form.html

@ -9,6 +9,7 @@
<script src="{% static 'vendor/moment/min/moment.min.js' %}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/object-observe/0.2.6/object-observe-lite.min.js"></script>
<script src="{% static 'vendor/draggabilly/dist/draggabilly.pkgd.min.js' %}"></script>
<script src="{% static 'vendor/md-date-time-picker/dist/js/scroll-into-view-if-needed.js' %}"></script>
<script src="{% static 'vendor/md-date-time-picker/dist/js/mdDateTimePicker.min.js' %}"></script>
<script>
var dateOfBirth = new mdDateTimePicker.default({
@ -20,7 +21,7 @@
});
Object.observe(dateOfBirth, function(changes) {
var input = document.getElementById('{{ form.date_of_birth.id_for_label }}');
input.value = dateOfBirth.time().format('YYYY-MM-DD');
input.value = dateOfBirth.time.format('YYYY-MM-DD');
input.parentNode.classList.add('is-dirty');
var threshold = moment.duration(18, 'years');

6
docker/nginx/conf/nginx-site.conf

@ -1,4 +1,4 @@
server {
server {
listen 80;
server_name www.shop.bcbc.bike;
# $scheme will get the http protocol
@ -11,9 +11,11 @@ server {
# $scheme will get the http protocol
# and 301 is best practice for tablet, phone, desktop and seo
return 301 https://shop.bcbc.bike$request_uri;
}
}
server {
# resolver 127.0.0.11 ipv6=off;
listen 443 ssl;
# listen 80;
server_name shop.bcbc.bike;
ssl_certificate /etc/letsencrypt/live/shop.bcbc.bike/fullchain.pem;

Loading…
Cancel
Save