Added url in booking&price menu bar button. Fixed bug when user booked for 1 days and two free days were being given. Created UserBillingAddress. Created UserBillingAddress Form.Created UserBillingAddress after first user payment. Added Previous Billing data to booking payment view if there is one. Moved booking button. Fixed error on free days in booking invoice. Added modal to cancel subscription page. Now a member can booking without entering his billing address or credit card info. Fixed error on free days.Current user billing address is showed on billing and booking order details. Edit billing address form added.Added user_billing_address.html. Added user billing address get views. Filled user billing address view with current user billing address.Now an user can edit his billing address. Added is_free flag in Select Booking Dates in order to now if a booking is free. Changed Booking Order Model in order to allow free payments. Added free payment template. Added free payment into Booking Payment View. Fixed issue #2586: new digitalglarus navbar font change.Fixed issue #2608 : style fix new DG.Fixed #2617: fix input fields and btn responsiveness on DG payment page. Fixed #2620: responsive issue in DG order summary.Fixed #2623: Order history style fix for deativate button and message below.Fixed #2625: DG membership activation page fix. Fixed #2616: fix navbar responsivness for new DG. Fixed #2619: credit card input field responsiveness fix

This commit is contained in:
Levi 2016-10-13 23:33:48 -05:00
commit 082f39e9dc
23 changed files with 500 additions and 80 deletions

View file

@ -39,11 +39,15 @@
</tbody>
</table>
<h2 class="order-head">Billing Adress<btn class="btn btn-primary btn-grey btn-edit">Edit</btn></h2>
<h2 class="history-name">Nico Schottelius<br>
In der Au 7 8762 Schwanden<br>
Switzerland
<h2 class="order-head">Billing Adress<a class="btn btn-primary btn-grey btn-edit" href="{% url 'digitalglarus:user_billing_address' %}">Edit</a></h2>
<h2 class="history-name">
{{request.user.name}}
</h2>
<h2 class="history-name">
{{billing_address.street_address}},{{billing_address.postal_code}}<br>
{{billing_address.city}}, {{billing_address.country}}.
</h2>
</div>
</div>

View file

@ -27,7 +27,7 @@
<h2 class="section-heading payment-head">Booking</h2>
<!-- <h2 class="membership-amount">35CHF</h2> -->
<hr class="greyline-long">
<h2 class="billing-head">Billing Adress</h2>
<h2 class="membership-lead">
Your Digital Glarus Membership enables
you to use our coworking space and it includes
@ -37,7 +37,25 @@
15CHF per day. More than 17 days a month it
will charge only 290CHF/month.
</h2>
{% if is_free %}
<h2 class="billing-head">Billing Adress</h2>
<div class="signup-form form-group row">
<form role="form" id="billing-form" method="post" action="{% url 'digitalglarus:booking_payment' %}" novalidate>
{% for field in form %}
{% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
{% bootstrap_form_errors form type='non_fields'%}
<br>
</form>
</div>
<hr class="greyline-long">
<br/>
<h2 class="billing-head">Your Booking is TOTALLY FREE</h2>
<br/><br/>
{% else %}
<h2 class="billing-head">Billing Adress</h2>
<div class="signup-form form-group row">
<form role="form" id="billing-form" method="post" action="{% url 'digitalglarus:booking_payment' %}" novalidate>
{% for field in form %}
@ -48,18 +66,26 @@
<br>
</form>
</div>
<h2 class="billing-head">Credit Card</h2>
{% if credit_card_data %}
<form role="form" id="billing-form" method="post" action="{% url 'digitalglarus:booking_payment' %}" novalidate>
<h2 class="billing-head">Credit Card</h2>
<h2 class="membership-lead">Last 4: {{credit_card_data.last4}}</h2>
<h2 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h2>
<input type="hidden" name="credit_card_needed" value="false"/>
</form>
{% else %}
<h2 class="billing-head">Credit Card (Last used)</h2>
<div class="signup-form form-group row">
<form role="form" id="payment-form" novalidate>
<div class="row">
<div class="col-xs-9 col-md-12">
<div class="col-xs-12 col-md-12">
<div class="form-group">
<input type="text" class="form-control" name="cardName" placeholder="Name on card" required autofocus data-stripe="name" />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-9 col-md-12">
<div class="col-xs-12 col-md-12">
<div class="form-group">
<input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required data-stripe="number" />
</div>
@ -86,11 +112,6 @@
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<button class="btn btn-primary btn-lg btn-blck " type="submit">Book</button>
</div>
</div>
<div class="row" style="display:none;">
<div class="col-xs-12">
<p class="payment-errors"></p>
@ -109,6 +130,8 @@
</form>
<br>
</div>
{% endif %}
{% endif %}
</div>
</div>
<div class="col-xs-12 col-sm-4 col-lg-4 wow fadeInDown">
@ -136,18 +159,20 @@
<h2 class="col-xs-6 payment-total">Total</h2>
<h2 class="order-result">{{final_price|floatformat}}CHF</h2>
<div class="text-center">
<label class="custom-control custom-checkbox">
<br/>
<input type="checkbox" class="custom-control-input">
<span class="custom-control-indicator"></span>
<span class="custom-control-description">I accept the Digital Glarus <a href=#>Terms and Conditions</a>, <a href=#>Community Guidelines</a> and <a href=#>Privacy Policy</a></span>
</label>
<label class="custom-control custom-checkbox">
<br/>
<input type="checkbox" class="custom-control-input">
<span class="custom-control-indicator"></span>
<span class="custom-control-description">I accept the Digital Glarus <a href=#>Terms and Conditions</a>, <a href=#>Community Guidelines</a> and <a href=#>Privacy Policy</a></span>
</label>
<div class="button-box">
<div class="row">
<div class="col-xs-12">
<button id="payment_button" class="btn btn-primary btn-lg btn-blck " type="submit">Book</button>
</div>
<div class="button-box">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -24,7 +24,7 @@
<a class="btn btn-primary btn-blue" href={% url 'digitalglarus:booking' %}>Go to Booking</a>
</div>
<div class="notice-box text-left">
<p class="order-bottom-text">Your membership will be automatically renewed each month. For deactivating go to<a href=#>my page</a></p>
<p class="order-bottom-text">Your membership will be automatically renewed each month. For deactivating go to<a href="{% url 'digitalglarus:membership_deactivate' %}">deactivate page</a></p>
</div>
</div>

View file

@ -22,7 +22,28 @@
<form method="POST" action="">
{% csrf_token %}
<button type="submit" class="btn btn-primary btn-blue">Cancel my Membership</button>
<button type="button" class="btn btn-primary btn-blue" data-toggle="modal" data-target="#cancel-subscription-modal">Cancel my Membership</button>
<div class="modal fade bs-example-modal-sm" id="cancel-subscription-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Cancel Subscription</h4>
</div>
<div class="modal-body">
<p>Do you want to cancel your subscription?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<button type="submit" class="btn btn-primary">Yes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</form>
</div>
@ -32,6 +53,9 @@
</p>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-lg-4 text-center wow fadeInDown"> </div>

View file

@ -60,6 +60,7 @@
<h2 class="col-xs-6 payment-total">Membership month {{order.created_at|date:"F"}}</h2>
<h2 class="order-sum">{{order.amount|floatformat}}CHF</h2>
<br/>
<hr class="greyline">
<h2 class="col-xs-6 payment-total">Total</h2>
<h2 class="order-result">{{order.amount|floatformat}}CHF</h2>

View file

@ -38,11 +38,14 @@
{% endfor %}
</tbody>
</table>
<h2 class="order-head">Billing Adress<btn class="btn btn-primary btn-grey btn-edit">Edit</btn></h2>
<h2 class="history-name">Nico Schottelius<br>
In der Au 7 8762 Schwanden<br>
Switzerland
<h2 class="order-head">Billing Adress<a class="btn btn-primary btn-grey btn-edit" href="{% url 'digitalglarus:user_billing_address' %}">Edit</a></h2>
<h2 class="history-name">
{{request.user.name}}
</h2>
<h2 class="history-name">
{{billing_address.street_address}},{{billing_address.postal_code}}<br>
{{billing_address.city}}, {{billing_address.country}}.
</h2>
<hr class="greyline-long">
@ -50,14 +53,15 @@
<h2 class="history-name">
Dates: {{membership_start_date|date}} - {{membership_end_date|date}}<br>
</h2>
<h2 class="history-name">
<div class="edit-button">
<a class="btn btn-primary btn-grey btn-edit print" href="{% url 'digitalglarus:membership_deactivate' %}">Deactivate</a>
</h2>
<a class="btn btn-primary btn-grey btn-deactivate print" href="{% url 'digitalglarus:membership_deactivate' %}">Deactivate</a>
</div>
<hr class="greyline-long">
<div class="row">
<div class="col-md-10">
<span>You will be charged on the first of the month until you
cancel your subscription. Previous charges won't be refunded.</span>
<div class="col-md-12 notice-box">
<p class="order-bottom-text">You will be charged on the first of the month until you
cancel your subscription. Previous charges won't be refunded.</p>
</div>
</div>
@ -66,19 +70,38 @@
<div class="col-xs-12 col-sm-4 col-lg-4 wow fadeInDown">
<div class="order-summary">
<h2 class="thankyou">Thank You!</h2>
{% if messages %}
<div class="order-box">
<h2 class="thankyou">Message</h2>
<hr class="greyline">
{% for message in messages %}
<h2 class="signup-lead text-center">{{ message }}</h2>
{% endfor %}
</div>
{% else %}
<h2 class="thankyou">Thank You!</h2>
<div class="order-box">
<span class="glyphicon glyphicon-heart icon-up"></span>
<h2 class="signup-lead text-center">Digital Glarus lives with your love!<br>
Our coworking space is here because of your love and support.</h2>
<hr class="greyline">
<p class="order-bottom-text text-center">This box is here just to thank you</p>
{% endif %}
<p class="order-bottom-text text-center">This box is here just to thank you</p>
</div>
</div>
</div>
</div>
</section>

View file

@ -56,14 +56,14 @@
<div class="signup-form form-group row">
<form role="form" id="payment-form" novalidate>
<div class="row">
<div class="col-xs-9 col-md-12">
<div class="col-xs-12 col-md-12">
<div class="form-group">
<input type="text" class="form-control" name="cardName" placeholder="Name on card" required autofocus data-stripe="name" />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-9 col-md-12">
<div class="col-xs-12 col-md-12">
<div class="form-group">
<input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required data-stripe="number" />
</div>
@ -92,7 +92,7 @@
</div>
<div class="row">
<div class="col-xs-12">
<button class="btn btn-primary btn-lg btn-blck " type="submit">Purchase membership</button>
<button class="btn btn-primary btn-md btn-blck " type="submit">Purchase membership</button>
</div>
</div>
<div class="row" style="display:none;">

View file

@ -0,0 +1,83 @@
{% extends "new_base_glarus.html" %}
{% load staticfiles bootstrap3 i18n %}
{% block content %}
<style type="text/css">
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
.form-control#id_country{
-webkit-appearance: none;
-moz-appearance: none;
background-position: right 50%;
background-repeat: no-repeat;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAMCAYAAABSgIzaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlY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eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuGsgwQAAAA5SURBVHjaYvz//z8DOYCJgUxAf42MQIzTk0D/M+KzkRGPoQSdykiKJrBGpOhgJFYTWNEIiEeAAAMAzNENEOH+do8AAAAASUVORK5CYII=);
padding: .5em;
padding-right: 1.5em
}
</style>
<section id="price">
<div class="signup-container">
<div class="col-xs-12 col-sm-6 col-lg-8 text-center wow fadeInDown">
<div class="payment-box">
<h2 class="section-heading payment-head">Billing Address Info</h2>
<!-- <h2 class="membership-amount">35CHF</h2> -->
<hr class="greyline-long">
<h2 class="billing-head">Billing Adress</h2>
<div class="signup-form form-group row">
<form role="form" id="billing-address-form" method="post" action="{% url 'digitalglarus:user_billing_address' %}" novalidate>
{% for field in form %}
{% csrf_token %}
{% bootstrap_field field show_label=False type='fields'%}
{% endfor %}
{% bootstrap_form_errors form type='non_fields'%}
<br>
<div class="row">
<div class="col-xs-12">
<button id="payment_button" class="btn btn-primary btn-lg btn-blck " type="submit">Save</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="contact">
<div class="fill">
<div class="row" class="wow fadeInDown">
<div class="col-lg-12 text-center wow fadeInDown">
<div class="col-md-4 map-title">
Digital Glarus<br>
<span class="map-caption">In der Au 7 Schwanden 8762 Switzerland
<br>info@digitalglarus.ch
<br>
(044) 534-66-22
<p>&nbsp;</p>
</span>
</div>
<p>&nbsp;</p>
</div>
</div>
</div>
</section>
<!-- stripe key data -->
{% if stripe_key %}
<script type="text/javascript">
(function () {window.stripeKey = "{{stripe_key}}";})();
</script>
{%endif%}
{% endblock %}

View file

@ -107,7 +107,7 @@
<a href="#page-top"></a>
</li>
<li>
<a class="page-scroll" href="#portfolio">booking & price</a>
<a class="page-scroll" href="{% url 'digitalglarus:booking' %}">booking & price</a>
</li>
<li>
<a class="page-scroll" href="{% url 'digitalglarus:history' %}">history</a>