Fixed membership payment view issues, Membership creation after a stripe charge, Membership order creation after stripe charge, Added membership activated view, Added membership activated html, Fixing membership cost function, Added function to format membership date ranges, Added membership calculated dates for first month into membership_payment html and membership_activated html

This commit is contained in:
Levi 2016-08-22 02:52:29 -05:00
commit 1152e41b6e
6 changed files with 212 additions and 29 deletions

View file

@ -0,0 +1,57 @@
{% extends "new_base_glarus.html" %}
{% load staticfiles cms_tags bootstrap3%}
{% block title %}crowdfunding{% endblock %}
{% block content %}
<section id="price">
<div class="signup-container">
<div class="col-xs-12 col-sm-3 col-lg-4 text-center wow fadeInDown"> </div>
<div class="col-xs-12 col-sm-6 col-lg-4 text-center wow fadeInDown">
<!-- <span class="glyphicon glyphicon-user"></span> -->
<div class="payment-box">
<h2 class="billing-head">Membership Activated</h2>
<hr class="greyline-long">
<h2 class="membership-lead">Your Digital Glarus membership is successfully activated for the following date.</h2>
<div class="date-box">
<h2 class="date-oneline">{{membership_dates}}</h2>
<h2 class="activation-lead">Now you can book your next coworking!</h2>
</div>
<!--<hr class="primary">-->
<div class="signup-form form-group row">
<div class="button-booking-box form-inline row">
<button type="submit" class="btn btn-primary btn-blue">Go to Booking</button>
</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>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-lg-4 text-center wow fadeInDown"> </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>
{% endblock %}

View file

@ -8,6 +8,16 @@
padding: 0 !important;
margin: 0 !important;
}
.form-control#id_country{
-webkit-appearance: none;
-moz-appearance: none;
background-position: right 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dW1lbnRJRD0ieG1wLmRpZDo0NkU0MTA2OEY3MUQxMUUyQkRDRUNFMzU3REIzMzIyQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuGsgwQAAAA5SURBVHjaYvz//z8DOYCJgUxAf42MQIzTk0D/M+KzkRGPoQSdykiKJrBGpOhgJFYTWNEIiEeAAAMAzNENEOH+do8AAAAASUVORK5CYII=);
padding: .5em;
padding-right: 1.5em
}
</style>
<section id="price">
@ -23,9 +33,13 @@
Additional day costs
15CHF per day. More than 17 days a month it
will charge only 290CHF/month.</h2>
<h2 class="membership-lead">
You will be charged on the first of the month until you
cancel your subscription. Previous charges won't be refunded.
</h2>
<hr class="greyline-long">
<h2 class="billing-head">Member Name</h2>
<h2 class="member-name">Nico Schottelius</h2>
<h2 class="member-name">{{request.user.name}}</h2>
<hr class="greyline-long">
<h2 class="billing-head">Billing Adress</h2>
<div class="signup-form form-group row">
@ -44,20 +58,14 @@
<div class="row">
<div class="col-xs-9 col-md-12">
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" name="cardName" placeholder="Name on card" required autofocus data-stripe="name" />
<span class="input-group-addon"><i class="fa fa-user" aria-hidden="true"></i></span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-9 col-md-12">
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required data-stripe="number" />
<span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
</div>
</div>
</div>
</div>
@ -75,7 +83,7 @@
</div>
</div>
</div>
<div class="col-xs-4 col-md-6 pull-right nopadding">
<div class="col-xs-4 col-md-6 pull-right">
<div class="form-group">
<label for="cvCode">CV CODE</label>
<input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" />
@ -84,7 +92,7 @@
</div>
<div class="row">
<div class="col-xs-12">
<button class="btn btn-success btn-lg btn-block" type="submit">Purchase membership</button>
<button class="btn btn-primary btn-lg btn-blck " type="submit">Purchase membership</button>
</div>
</div>
<div class="row" style="display:none;">
@ -115,25 +123,25 @@
<div class="order-box">
<h2 class="col-xs-6 order-item">Digital Glarus Membership</h2>
<br>
<h2 class="col-xs-6 order-duration">valid 2016.09.08 - 2016.10.08</h2>
<h2 class="col-xs-6 order-duration">valid {{membership_type.first_month_formated_range}}</h2>
<br/>
<h2 class="order-person">1 person</h2>
<h2 class="col-xs-6 payment-total">Today's Total</h2>
<h2 class="order-sum">0.00CHF</h2>
<h2 class="col-xs-6 payment-total">Today's Total for {{membership_type.days_left}} days </h2>
<h2 class="order-sum">{{membership_type.first_month_price|floatformat}}CHF</h2>
<hr class="greyline">
<h2 class="col-xs-6 payment-total">Total</h2>
<h2 class="order-result">35CHF</h2>
<h2 class="order-result">{{membership_type.first_month_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>
<div class="button-box">
<button type="submit" class="btn btn-primary">Continue to Review</button>
</div>
<div class="button-box">
<p class="order-bottom-text">You can checkout on the next page</p>
</div>
</div>
</div>