|
|
@ -76,16 +76,13 @@ |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
|
|
|
|
{% if sub.subscription_id %} |
|
|
|
<div class="panel panel-{{ payment_method_status }}"> |
|
|
|
<div class="panel-body settings-block"> |
|
|
|
<h2>Payment Method</h2> |
|
|
|
{% if sub.payment_method_token %} |
|
|
|
<p id="payment-method"> |
|
|
|
<span class="loading">loading…</span> |
|
|
|
</p> |
|
|
|
{% else %} |
|
|
|
<p id="payment-method-missing" class="billing-empty">Not set</p> |
|
|
|
{% endif %} |
|
|
|
<button |
|
|
|
id="update-payment-method" |
|
|
|
class="btn btn-default pull-right"> |
|
|
@ -97,6 +94,7 @@ |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
<div class="col-sm-6"> |
|
|
|
<div class="panel panel-{{ address_status }}"> |
|
|
@ -170,110 +168,104 @@ |
|
|
|
|
|
|
|
<div id="change-billing-plan-modal" class="modal"> |
|
|
|
<div class="modal-dialog"> |
|
|
|
{% if sub.payment_method_token and sub.address_id %} |
|
|
|
<form method="post" class="form-horizontal" autocomplete="off" action="{% url 'hc-set-plan' %}"> |
|
|
|
{% csrf_token %} |
|
|
|
<input type="hidden" id="old-plan-id" value="{{ sub.plan_id }}"> |
|
|
|
<input type="hidden" id="plan-id" name="plan_id" value="{{ sub.plan_id }}"> |
|
|
|
|
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-header"> |
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button> |
|
|
|
<h4>Change Billing Plan</h4> |
|
|
|
</div> |
|
|
|
<div class="modal-body"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-sm-4"> |
|
|
|
<div id="plan-hobbyist" class="panel plan {% if sub.plan_id == "" %}selected{% endif %}"> |
|
|
|
<div class="marker">Selected Plan</div> |
|
|
|
|
|
|
|
<h2>Hobbyist</h2> |
|
|
|
<ul> |
|
|
|
<li>Checks: 20</li> |
|
|
|
<li>Team members: 3</li> |
|
|
|
<li>Log entries: 100</li> |
|
|
|
</ul> |
|
|
|
<h3>Free</h3> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-sm-4"> |
|
|
|
<div id="plan-business" class="panel plan {% if sub.plan_id == "P20" or sub.plan_id == "Y192" %}selected{% endif %}"> |
|
|
|
<div class="marker">Selected Plan</div> |
|
|
|
|
|
|
|
<h2>Business</h2> |
|
|
|
<ul> |
|
|
|
<li>Checks: 100</li> |
|
|
|
<li>Team members: 10</li> |
|
|
|
<li>Log entries: 1000</li> |
|
|
|
</ul> |
|
|
|
<h3> |
|
|
|
<span id="business-price"></span> |
|
|
|
<small>/ month</small> |
|
|
|
</h3> |
|
|
|
</div> |
|
|
|
{% if sub.address_id %} |
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-header"> |
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button> |
|
|
|
<h4>Change Billing Plan</h4> |
|
|
|
</div> |
|
|
|
<div class="modal-body"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-sm-4"> |
|
|
|
<div id="plan-hobbyist" class="panel plan {% if sub.plan_id == "" %}selected{% endif %}"> |
|
|
|
<div class="marker">Selected Plan</div> |
|
|
|
|
|
|
|
<h2>Hobbyist</h2> |
|
|
|
<ul> |
|
|
|
<li>Checks: 20</li> |
|
|
|
<li>Team members: 3</li> |
|
|
|
<li>Log entries: 100</li> |
|
|
|
</ul> |
|
|
|
<h3>Free</h3> |
|
|
|
</div> |
|
|
|
<div class="col-sm-4"> |
|
|
|
<div id="plan-business-plus" class="panel plan {% if sub.plan_id == "P80" or sub.plan_id == "Y768" %}selected{% endif %}"> |
|
|
|
<div class="marker">Selected Plan</div> |
|
|
|
|
|
|
|
<h2>Business Plus</h2> |
|
|
|
<ul> |
|
|
|
<li>Checks: 1000</li> |
|
|
|
<li>Team members: Unlimited</li> |
|
|
|
<li>Log entries: 1000</li> |
|
|
|
</ul> |
|
|
|
<h3> |
|
|
|
<span id="business-plus-price"></span> |
|
|
|
<small>/ month</small> |
|
|
|
</h3> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="col-sm-4"> |
|
|
|
<div id="plan-business" class="panel plan {% if sub.plan_id == "P20" or sub.plan_id == "Y192" %}selected{% endif %}"> |
|
|
|
<div class="marker">Selected Plan</div> |
|
|
|
|
|
|
|
<h2>Business</h2> |
|
|
|
<ul> |
|
|
|
<li>Checks: 100</li> |
|
|
|
<li>Team members: 10</li> |
|
|
|
<li>Log entries: 1000</li> |
|
|
|
</ul> |
|
|
|
<h3> |
|
|
|
<span id="business-price"></span> |
|
|
|
<small>/ month</small> |
|
|
|
</h3> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div id="billing-periods" class="col-sm-6"> |
|
|
|
<p>Billing Period</p> |
|
|
|
|
|
|
|
<label class="radio-container"> |
|
|
|
<input |
|
|
|
id="billing-monthly" |
|
|
|
type="radio" |
|
|
|
name="billing_period" |
|
|
|
value="monthly" |
|
|
|
{% if sub.plan_id == "Y192" or sub.plan_id == "Y768" %}{% else %}checked{% endif %}> |
|
|
|
<span class="radiomark"></span> |
|
|
|
Monthly |
|
|
|
</label> |
|
|
|
<label class="radio-container"> |
|
|
|
<input |
|
|
|
id="billing-annual" |
|
|
|
type="radio" |
|
|
|
name="billing_period" |
|
|
|
value="annual" |
|
|
|
{% if sub.plan_id == "Y192" or sub.plan_id == "Y768" %} checked {% endif %}> |
|
|
|
<span class="radiomark"></span> |
|
|
|
Annual, 20% off |
|
|
|
</label> |
|
|
|
<div class="col-sm-4"> |
|
|
|
<div id="plan-business-plus" class="panel plan {% if sub.plan_id == "P80" or sub.plan_id == "Y768" %}selected{% endif %}"> |
|
|
|
<div class="marker">Selected Plan</div> |
|
|
|
|
|
|
|
<h2>Business Plus</h2> |
|
|
|
<ul> |
|
|
|
<li>Checks: 1000</li> |
|
|
|
<li>Team members: Unlimited</li> |
|
|
|
<li>Log entries: 1000</li> |
|
|
|
</ul> |
|
|
|
<h3> |
|
|
|
<span id="business-plus-price"></span> |
|
|
|
<small>/ month</small> |
|
|
|
</h3> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="text-warning"> |
|
|
|
<strong>No proration.</strong> We currently do not |
|
|
|
support proration when changing billing plans. |
|
|
|
Changing the plan starts a new billing cycle |
|
|
|
and charges your payment method. |
|
|
|
<div class="row"> |
|
|
|
<div id="billing-periods" class="col-sm-6"> |
|
|
|
<p>Billing Period</p> |
|
|
|
|
|
|
|
<label class="radio-container"> |
|
|
|
<input |
|
|
|
id="billing-monthly" |
|
|
|
type="radio" |
|
|
|
name="billing_period" |
|
|
|
value="monthly" |
|
|
|
{% if sub.plan_id == "Y192" or sub.plan_id == "Y768" %}{% else %}checked{% endif %}> |
|
|
|
<span class="radiomark"></span> |
|
|
|
Monthly |
|
|
|
</label> |
|
|
|
<label class="radio-container"> |
|
|
|
<input |
|
|
|
id="billing-annual" |
|
|
|
type="radio" |
|
|
|
name="billing_period" |
|
|
|
value="annual" |
|
|
|
{% if sub.plan_id == "Y192" or sub.plan_id == "Y768" %} checked {% endif %}> |
|
|
|
<span class="radiomark"></span> |
|
|
|
Annual, 20% off |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
|
|
|
<button id="change-plan-btn" type="submit" class="btn btn-primary" disabled="disabled"> |
|
|
|
Change Billing Plan |
|
|
|
</button> |
|
|
|
<div class="text-warning"> |
|
|
|
<strong>No proration.</strong> We currently do not |
|
|
|
support proration when changing billing plans. |
|
|
|
Changing the plan starts a new billing cycle |
|
|
|
and charges your payment method. |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
|
|
|
|
|
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
|
|
|
<button id="change-plan-btn" type="button" class="btn btn-primary" disabled="disabled"> |
|
|
|
Change Billing Plan |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% else %} |
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-header"> |
|
|
@ -281,14 +273,6 @@ |
|
|
|
<h4>Some details are missing…</h4> |
|
|
|
</div> |
|
|
|
<div class="modal-body"> |
|
|
|
{% if not sub.payment_method_token %} |
|
|
|
<div id="no-payment-method"> |
|
|
|
<h4>No payment method.</h4> |
|
|
|
<p>Please add a payment method before changing the billing |
|
|
|
plan. |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
{% endif %} |
|
|
|
{% if not sub.address_id %} |
|
|
|
<div id="no-billing-address"> |
|
|
|
<h4>Country not specified.</h4> |
|
|
@ -315,28 +299,23 @@ |
|
|
|
|
|
|
|
<div id="payment-method-modal" class="modal pm-modal"> |
|
|
|
<div class="modal-dialog"> |
|
|
|
<form id="payment-form" method="post" action="{% url 'hc-payment-method' %}"> |
|
|
|
{% csrf_token %} |
|
|
|
<input id="pmm-nonce" type="hidden" name="payment_method_nonce" /> |
|
|
|
|
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-header"> |
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button> |
|
|
|
<h4>Payment Method</h4> |
|
|
|
</div> |
|
|
|
<div class="modal-body"> |
|
|
|
<div id="dropin"></div> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal"> |
|
|
|
Cancel |
|
|
|
</button> |
|
|
|
<button id="payment-form-submit" type="button" class="btn btn-primary" disabled> |
|
|
|
Confirm Payment Method |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-header"> |
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button> |
|
|
|
<h4>Payment Method</h4> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
<div class="modal-body"> |
|
|
|
<div id="dropin"></div> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal"> |
|
|
|
Cancel |
|
|
|
</button> |
|
|
|
<button id="payment-form-submit" type="button" class="btn btn-primary" disabled> |
|
|
|
Confirm Payment Method |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -510,11 +489,35 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div id="please-wait-modal" class="modal pm-modal"> |
|
|
|
<div class="modal-dialog"> |
|
|
|
<div class="modal-content"> |
|
|
|
<div class="modal-header"> |
|
|
|
<h4>Payment Method</h4> |
|
|
|
</div> |
|
|
|
<div class="modal-body"> |
|
|
|
Processing, please wait… |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-primary" disabled> |
|
|
|
Confirm Payment Method |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<form id="update-subscription-form" method="post" action="{% url 'hc-update-subscription' %}"> |
|
|
|
{% csrf_token %} |
|
|
|
<input id="nonce" type="hidden" name="nonce" /> |
|
|
|
<input type="hidden" id="old-plan-id" value="{{ sub.plan_id }}"> |
|
|
|
<input id="plan-id" type="hidden" name="plan_id" /> |
|
|
|
</form> |
|
|
|
|
|
|
|
{% endblock %} |
|
|
|
|
|
|
|
{% block scripts %} |
|
|
|
<script src="https://js.braintreegateway.com/web/dropin/1.17.1/js/dropin.min.js"></script> |
|
|
|
<script src="https://js.braintreegateway.com/web/dropin/1.20.0/js/dropin.min.js"></script> |
|
|
|
{% compress js %} |
|
|
|
<script src="{% static 'js/jquery-2.1.4.min.js' %}"></script> |
|
|
|
<script src="{% static 'js/bootstrap.min.js' %}"></script> |
|
|
|