From 3da05e80255cbff53cc1c9ae55926b7c22763f73 Mon Sep 17 00:00:00 2001 From: Levi Date: Mon, 19 Dec 2016 09:33:15 -0500 Subject: [PATCH] Finished responsive issues --- .../static/digitalglarus/js/payment.js | 26 ++++++++-- .../digitalglarus/booking_orders_list.html | 2 +- .../digitalglarus/booking_payment.html | 8 +++ .../templates/digitalglarus/history.html | 16 +++++- .../digitalglarus/membership_orders_list.html | 49 ++++++++++-------- .../digitalglarus/membership_payment.html | 2 +- .../digitalglarus/membership_pricing.html | 2 +- digitalglarus/templates/new_base_glarus.html | 2 +- digitalglarus/views.py | 2 + dump.rdb | Bin 0 -> 8373 bytes membership/models.py | 6 ++- utils/stripe_utils.py | 6 +++ 12 files changed, 89 insertions(+), 32 deletions(-) create mode 100644 dump.rdb diff --git a/digitalglarus/static/digitalglarus/js/payment.js b/digitalglarus/static/digitalglarus/js/payment.js index 3179f721..0d95a109 100644 --- a/digitalglarus/static/digitalglarus/js/payment.js +++ b/digitalglarus/static/digitalglarus/js/payment.js @@ -27,22 +27,42 @@ $( document ).ready(function() { //Acept term and conditions button + var hasCreditcard = window.hasCreditcard; + console.log("has creditcard"); + console.log("has creditcard"); + console.log("has creditcard"); + + var submit_form_btn = $('#payment_button'); + submit_form_btn.on('click', submit_payment); - var submit_form_btn = $('#payment_button'); - submit_form_btn.on('click', submit_payment); function submit_payment(e){ - $('#billing-form').submit(); + e.preventDefault(); + if (hasCreditcard) { + $('#billing-form').submit(); + } + else  { + $('#payment-form').submit(); + + } + + + // $form.submit(); } + var $form = $('#payment-form'); $form.submit(payWithStripe); /* If you're using Stripe for payments */ function payWithStripe(e) { console.log("submiting"); + console.log("token"); + console.log("token"); + // console.log("token", token); + e.preventDefault(); if (!$('.agree-terms').is(':checked')){ diff --git a/digitalglarus/templates/digitalglarus/booking_orders_list.html b/digitalglarus/templates/digitalglarus/booking_orders_list.html index 9fa3d793..a1cb8e39 100644 --- a/digitalglarus/templates/digitalglarus/booking_orders_list.html +++ b/digitalglarus/templates/digitalglarus/booking_orders_list.html @@ -18,7 +18,7 @@

2016.11.13-2016.12.13


Booking history

- +
diff --git a/digitalglarus/templates/digitalglarus/booking_payment.html b/digitalglarus/templates/digitalglarus/booking_payment.html index adfb142e..442a2812 100644 --- a/digitalglarus/templates/digitalglarus/booking_payment.html +++ b/digitalglarus/templates/digitalglarus/booking_payment.html @@ -212,4 +212,12 @@ {%endif%} +{% if credit_card_data.last4 and credit_card_data.cc_brand %} + + +{%endif%} + + {% endblock %} \ No newline at end of file diff --git a/digitalglarus/templates/digitalglarus/history.html b/digitalglarus/templates/digitalglarus/history.html index ae407d34..c54a4a72 100755 --- a/digitalglarus/templates/digitalglarus/history.html +++ b/digitalglarus/templates/digitalglarus/history.html @@ -4,6 +4,20 @@ {% block content %} + + +
@@ -81,7 +95,7 @@
-
+
diff --git a/digitalglarus/templates/digitalglarus/membership_orders_list.html b/digitalglarus/templates/digitalglarus/membership_orders_list.html index dd7ab8dc..ceeea6f1 100644 --- a/digitalglarus/templates/digitalglarus/membership_orders_list.html +++ b/digitalglarus/templates/digitalglarus/membership_orders_list.html @@ -6,12 +6,12 @@ @media only screen and (max-width: 320px) { - body { font-size: 2em; } - + /*body { font-size: 2em; }*/ + h2.section-heading {font-size: 2em !important;} } -h2 {text-transform: lowercase;} + @@ -33,26 +33,29 @@ h2 {text-transform: lowercase;} {% endif %}

Orders history

-
#
- - - - - - - - - - {% for order in orders%} - - - - - - - {% endfor %} - -
#Valid MonthDateInvoice
{{order.id}}{{order.created_at|date:"F"}}{{order.created_at|date}}View
+
+ + + + + + + + + + + + {% for order in orders%} + + + + + + + {% endfor %} + +
#Valid MonthDateInvoice
{{order.id}}{{order.created_at|date:"F"}}{{order.created_at|date}}View
+

Billing AdressEdit

diff --git a/digitalglarus/templates/digitalglarus/membership_payment.html b/digitalglarus/templates/digitalglarus/membership_payment.html index 61c60af9..7e90a7d7 100644 --- a/digitalglarus/templates/digitalglarus/membership_payment.html +++ b/digitalglarus/templates/digitalglarus/membership_payment.html @@ -113,7 +113,7 @@ I accept the Digital Glarus Terms and Conditions, Community Guidelines and Privacy Policy
-
+
diff --git a/digitalglarus/templates/digitalglarus/membership_pricing.html b/digitalglarus/templates/digitalglarus/membership_pricing.html index 6d8033f1..35867858 100644 --- a/digitalglarus/templates/digitalglarus/membership_pricing.html +++ b/digitalglarus/templates/digitalglarus/membership_pricing.html @@ -5,7 +5,7 @@ {% block content %} diff --git a/digitalglarus/templates/new_base_glarus.html b/digitalglarus/templates/new_base_glarus.html index 50d1f24b..116ca4bf 100644 --- a/digitalglarus/templates/new_base_glarus.html +++ b/digitalglarus/templates/new_base_glarus.html @@ -133,7 +133,7 @@