From 521b089501850847db74fa409c44d8149ee1fe33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Wed, 2 May 2018 21:41:39 +0300 Subject: [PATCH] Remove First & Last name from Billing Details, to limit the amount of personal data we potentially store. --- hc/payments/models.py | 4 +- hc/payments/views.py | 2 +- static/css/billing.css | 4 ++ templates/accounts/billing.html | 69 +++++++++++++-------------- templates/payments/address.html | 8 +--- templates/payments/address_plain.html | 4 +- 6 files changed, 44 insertions(+), 47 deletions(-) diff --git a/hc/payments/models.py b/hc/payments/models.py index f09c7dad..91dd6b42 100644 --- a/hc/payments/models.py +++ b/hc/payments/models.py @@ -11,7 +11,7 @@ else: braintree = None -ADDRESS_KEYS = ("first_name", "last_name", "company", "street_address", +ADDRESS_KEYS = ("company", "street_address", "extended_address", "locality", "region", "postal_code", "country_code_alpha2") @@ -194,7 +194,7 @@ class Subscription(models.Model): def flattened_address(self): if self.address_id: - ctx = {"a": self.address} + ctx = {"a": self.address, "email": self.user.email} return render_to_string("payments/address_plain.html", ctx) else: return self.user.email diff --git a/hc/payments/views.py b/hc/payments/views.py index 7a5e9a37..2ed71b76 100644 --- a/hc/payments/views.py +++ b/hc/payments/views.py @@ -151,7 +151,7 @@ def address(request): request.session["address_status"] = "success" return redirect("hc-billing") - ctx = {"a": sub.address} + ctx = {"a": sub.address, "email": request.user.email} return render(request, "payments/address.html", ctx) diff --git a/static/css/billing.css b/static/css/billing.css index fb79a306..b22290cf 100644 --- a/static/css/billing.css +++ b/static/css/billing.css @@ -5,4 +5,8 @@ #invoice-emailing-status { margin-right: 150px; +} + +#billing-address-modal label { + font-size: 13px; } \ No newline at end of file diff --git a/templates/accounts/billing.html b/templates/accounts/billing.html index 40fe3904..73e4a104 100644 --- a/templates/accounts/billing.html +++ b/templates/accounts/billing.html @@ -118,7 +118,7 @@
-

Billing Address

+

Billing Details

{% if sub.address_id %}
@@ -134,12 +134,12 @@ data-toggle="modal" data-target="#billing-address-modal" class="btn btn-default pull-right"> - Change Billing Address + Change Billing Details
{% if address_status == "success" %} {% endif %}
@@ -283,9 +283,16 @@ {% endif %} {% if not sub.address_id %}
-

No billing address.

-

Please add a billing address before changing - the billing plan. +

Country not specified.

+

For tax accounting purposes, please specify + your Country in the "Billing Details" + section. +

+

+ Optionally, add your + company name, address + and VAT ID + to have them displayed on invoices.

{% endif %} @@ -332,39 +339,18 @@