new card details option added
This commit is contained in:
parent
bd3c59eb3e
commit
ba8eaa2937
3 changed files with 49 additions and 17 deletions
|
@ -315,8 +315,15 @@
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
.settings-container .credit-card-details-opt {
|
||||
padding-top: 15px;
|
||||
.settings-container .new-card-head {
|
||||
margin-top: 40px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.settings-container .new-card-head h4 {
|
||||
font-size: 15px;
|
||||
margin-top: 8px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.caps-link .svg-img {
|
||||
|
@ -335,7 +342,11 @@
|
|||
.settings-container .btn-vm-contact {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
/* padding: 4px 15px; */
|
||||
}
|
||||
|
||||
.settings-container .choice-btn {
|
||||
letter-spacing: 1px;
|
||||
min-width: 127px;
|
||||
}
|
||||
|
||||
.btn-wide {
|
||||
|
@ -375,4 +386,13 @@
|
|||
outline: none;
|
||||
color: #999;
|
||||
fill: #999;
|
||||
}
|
||||
|
||||
.card-details-box {
|
||||
border: 1px solid #eee;
|
||||
padding: 5px 25px 25px;
|
||||
}
|
||||
|
||||
.thick-hr {
|
||||
border-top: 5px solid #eee;
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
<div class="settings-container">
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-md-6 billing dcl-billing">
|
||||
<h3>{%trans "Billing Address"%}</h3>
|
||||
<h3>{%trans "Billing Address" %}</h3>
|
||||
<hr>
|
||||
<form role="form" id="billing-form" method="post" action="" novalidate>
|
||||
{% for field in form %}
|
||||
|
@ -27,40 +27,52 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="col-sm-7 col-md-6 creditcard-box dcl-creditcard">
|
||||
<h3>{%trans "Credit Card"%}</h3>
|
||||
<h3>{%trans "Credit Card" %}</h3>
|
||||
<hr>
|
||||
<div>
|
||||
{% for card in cards_list %}
|
||||
<div class="credit-card-details">
|
||||
<h5 class="billing-head">{% trans "Credit Card" %}</h5>
|
||||
<h5 class="membership-lead">{% trans "Last" %} 4: *****{{card.last4}}</h5>
|
||||
<h5 class="membership-lead">{% trans "Last" %} 4: ***** {{card.last4}}</h5>
|
||||
<h5 class="membership-lead">{% trans "Type" %}: {{card.cc_brand}}</h5>
|
||||
{% comment %}
|
||||
{% endcomment %}
|
||||
<div class="credit-card-details-opt">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<a class="caps-link" href=""><img src="{% static 'hosting/img/delete.svg' %}" class="svg-img">{% trans "REMOVE CARD" %}</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<a class="btn btn-vm-contact" href="">{% trans "EDIT CARD" %}</a>
|
||||
<a class="btn choice-btn choice-btn-faded" href="">{% trans "SELECT" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if credit_card_data.last4 %}
|
||||
{% else %}
|
||||
{% empty %}
|
||||
<div class="no-cards">
|
||||
<h4>{% trans "No Credit Cards Added" %}</h4>
|
||||
<p>{% blocktrans %}We are using <a href="https://stripe.com">Stripe</a> for payment and do not store your information in our database.{% endblocktrans %}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<h4>{% trans "Add a new Card." %}</h4>
|
||||
<div class="new-card-head">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<h4>{% trans "Add a new credit card" %}</h4>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<button data-toggle="collapse" data-target="#newcard" class="btn choice-btn">
|
||||
<span class="fa fa-plus"></span> {% trans "NEW CARD" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="newcard" class="collapse">
|
||||
<hr class="thick-hr">
|
||||
<div class="card-details-box">
|
||||
<h3>{%trans "New Credit Card" %}</h3>
|
||||
<hr>
|
||||
{% include "hosting/includes/_card_input.html" %}
|
||||
{% comment %}
|
||||
{% endcomment %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -540,7 +540,7 @@ class SettingsView(LoginRequiredMixin, FormView):
|
|||
cards_list = []
|
||||
for order in hosting_orders:
|
||||
credit_card_data = order.get_cc_data()
|
||||
if credit_card_data:
|
||||
if credit_card_data and (credit_card_data not in cards_list):
|
||||
cards_list.append(credit_card_data)
|
||||
context.update({
|
||||
'cards_list': cards_list,
|
||||
|
|
Loading…
Reference in a new issue