diff --git a/hosting/static/hosting/css/commons.css b/hosting/static/hosting/css/commons.css index 317caabc..7dad471e 100644 --- a/hosting/static/hosting/css/commons.css +++ b/hosting/static/hosting/css/commons.css @@ -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; } \ No newline at end of file diff --git a/hosting/templates/hosting/settings.html b/hosting/templates/hosting/settings.html index 5e898b04..968363d2 100644 --- a/hosting/templates/hosting/settings.html +++ b/hosting/templates/hosting/settings.html @@ -14,7 +14,7 @@
-

{%trans "Billing Address"%}

+

{%trans "Billing Address" %}


{% for field in form %} @@ -27,40 +27,52 @@
-

{%trans "Credit Card"%}

+

{%trans "Credit Card" %}


{% for card in cards_list %}
{% trans "Credit Card" %}
-
{% trans "Last" %} 4: *****{{card.last4}}
+
{% trans "Last" %} 4: ***** {{card.last4}}
{% trans "Type" %}: {{card.cc_brand}}
- {% comment %} - {% endcomment %}
- {% endfor %} - {% if credit_card_data.last4 %} - {% else %} + {% empty %}

{% trans "No Credit Cards Added" %}

{% blocktrans %}We are using Stripe for payment and do not store your information in our database.{% endblocktrans %}

+ {% endfor %} -

{% trans "Add a new Card." %}

+
+
+
+

{% trans "Add a new credit card" %}

+
+
+ +
+
+
+
+
+
+

{%trans "New Credit Card" %}

+
{% include "hosting/includes/_card_input.html" %} - {% comment %} - {% endcomment %} - {% endif %} +
+
diff --git a/hosting/views.py b/hosting/views.py index 9c176f23..9a27b671 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -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,