Fixed ssh key error, Now an existing user is not ask for his credit card again
This commit is contained in:
parent
5861bec4a6
commit
1f10f04a9d
7 changed files with 155 additions and 17 deletions
|
|
@ -8,7 +8,7 @@
|
|||
<div class="col-xs-12 col-md-4 col-md-offset-2 billing">
|
||||
<h3><b>Billing Address</b></h3>
|
||||
<hr>
|
||||
<form role="form" id="billing-form" method="post" action="{% url 'hosting:payment' %}" novalidate>
|
||||
<form role="form" id="billing-form" method="post" action="" novalidate>
|
||||
{% for field in form %}
|
||||
{% csrf_token %}
|
||||
{% bootstrap_field field show_label=False type='fields'%}
|
||||
|
|
@ -23,6 +23,17 @@
|
|||
<hr>
|
||||
<div>
|
||||
<div>
|
||||
{% if credit_card_data.last4 %}
|
||||
<form role="form" id="payment-form-with-creditcard"novalidate>
|
||||
<h5 class="billing-head">Credit Card</h5>
|
||||
<h5 class="membership-lead">Last 4: *****{{credit_card_data.last4}}</h5>
|
||||
<h5 class="membership-lead">Type: {{credit_card_data.cc_brand}}</h5>
|
||||
<input type="hidden" name="credit_card_needed" value="false"/>
|
||||
</form>
|
||||
<button id="payment_button_with_creditcard" class="btn btn-success btn-lg btn-block" type="submit">Submit Payment</button>
|
||||
{% else %}
|
||||
|
||||
|
||||
<form role="form" id="payment-form" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-xs-9 col-md-12">
|
||||
|
|
@ -76,6 +87,7 @@
|
|||
|
||||
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -110,6 +122,7 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- stripe key data -->
|
||||
{% if stripe_key %}
|
||||
<script type="text/javascript">
|
||||
|
|
@ -117,6 +130,13 @@
|
|||
</script>
|
||||
{%endif%}
|
||||
|
||||
{% if credit_card_data.last4 and credit_card_data.cc_brand %}
|
||||
<script type="text/javascript">
|
||||
(function () {window.hasCreditcard = true;})();
|
||||
</script>
|
||||
|
||||
{%endif%}
|
||||
|
||||
{%endblock%}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
{% if private_key %}
|
||||
<div class="alert alert-warning">
|
||||
|
||||
<strong>{% trans "Warning!"%}</strong>{% trans "You can view your SSH private key once. Copy it or if it wasn't downloaded automatically, just click on Download to start it."%}
|
||||
<strong>{% trans "Warning!"%}</strong>{% trans "You can view your SSH private key once. Don't lost your key"%}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" rows="6" id="ssh_key" type="hidden" style="display:none">{{private_key}}</textarea>
|
||||
|
|
@ -101,6 +101,7 @@
|
|||
// Remove anchor from body
|
||||
document.body.removeChild(a);
|
||||
|
||||
|
||||
</script>
|
||||
{%endif%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue