forked from GithubBackups/healthchecks
Remove First & Last name from Billing Details, to limit the amount of personal data we potentially store.
This commit is contained in:
parent
fbe77c9e0a
commit
521b089501
@ -11,7 +11,7 @@ else:
|
|||||||
braintree = None
|
braintree = None
|
||||||
|
|
||||||
|
|
||||||
ADDRESS_KEYS = ("first_name", "last_name", "company", "street_address",
|
ADDRESS_KEYS = ("company", "street_address",
|
||||||
"extended_address", "locality", "region", "postal_code",
|
"extended_address", "locality", "region", "postal_code",
|
||||||
"country_code_alpha2")
|
"country_code_alpha2")
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ class Subscription(models.Model):
|
|||||||
|
|
||||||
def flattened_address(self):
|
def flattened_address(self):
|
||||||
if self.address_id:
|
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)
|
return render_to_string("payments/address_plain.html", ctx)
|
||||||
else:
|
else:
|
||||||
return self.user.email
|
return self.user.email
|
||||||
|
@ -151,7 +151,7 @@ def address(request):
|
|||||||
request.session["address_status"] = "success"
|
request.session["address_status"] = "success"
|
||||||
return redirect("hc-billing")
|
return redirect("hc-billing")
|
||||||
|
|
||||||
ctx = {"a": sub.address}
|
ctx = {"a": sub.address, "email": request.user.email}
|
||||||
return render(request, "payments/address.html", ctx)
|
return render(request, "payments/address.html", ctx)
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,3 +6,7 @@
|
|||||||
#invoice-emailing-status {
|
#invoice-emailing-status {
|
||||||
margin-right: 150px;
|
margin-right: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#billing-address-modal label {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
@ -118,7 +118,7 @@
|
|||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="panel panel-{{ address_status }}">
|
<div class="panel panel-{{ address_status }}">
|
||||||
<div class="panel-body settings-block">
|
<div class="panel-body settings-block">
|
||||||
<h2>Billing Address</h2>
|
<h2>Billing Details</h2>
|
||||||
|
|
||||||
{% if sub.address_id %}
|
{% if sub.address_id %}
|
||||||
<div id="billing-address">
|
<div id="billing-address">
|
||||||
@ -134,12 +134,12 @@
|
|||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#billing-address-modal"
|
data-target="#billing-address-modal"
|
||||||
class="btn btn-default pull-right">
|
class="btn btn-default pull-right">
|
||||||
Change Billing Address
|
Change Billing Details
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{% if address_status == "success" %}
|
{% if address_status == "success" %}
|
||||||
<div class="panel-footer">
|
<div class="panel-footer">
|
||||||
Your billing address has been updated!
|
Your billing details have been updated!
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@ -283,9 +283,16 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not sub.address_id %}
|
{% if not sub.address_id %}
|
||||||
<div id="no-billing-address">
|
<div id="no-billing-address">
|
||||||
<h4>No billing address.</h4>
|
<h4>Country not specified.</h4>
|
||||||
<p>Please add a billing address before changing
|
<p>For tax accounting purposes, please specify
|
||||||
the billing plan.
|
your <strong>Country</strong> in the "Billing Details"
|
||||||
|
section.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Optionally, add your
|
||||||
|
<strong>company name</strong>, <strong>address</strong>
|
||||||
|
and <strong>VAT ID</strong>
|
||||||
|
to have them displayed on invoices.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -332,39 +339,18 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4>Billing Address</h4>
|
<h4>Billing Details</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<input
|
|
||||||
id="first_name"
|
|
||||||
name="first_name"
|
|
||||||
type="text"
|
|
||||||
placeholder="First Name"
|
|
||||||
class="form-control" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<input
|
|
||||||
id="last_name"
|
|
||||||
name="last_name"
|
|
||||||
type="text"
|
|
||||||
placeholder="Last Name"
|
|
||||||
class="input-name form-control" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<label for="company">
|
||||||
|
Company
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
id="company"
|
id="company"
|
||||||
name="company"
|
name="company"
|
||||||
placeholder="Company (optional)"
|
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control" />
|
class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
@ -372,10 +358,12 @@
|
|||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<label for="extended_address">
|
||||||
|
VAT ID
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
id="extended_address"
|
id="extended_address"
|
||||||
name="extended_address"
|
name="extended_address"
|
||||||
placeholder="VAT ID (optional)"
|
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control" />
|
class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
@ -383,21 +371,23 @@
|
|||||||
|
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<label for="company">Street Address</label>
|
||||||
<input
|
<input
|
||||||
id="street_address"
|
id="street_address"
|
||||||
name="street_address"
|
name="street_address"
|
||||||
placeholder="Street Address"
|
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control" />
|
class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
<label for="locality">
|
||||||
|
City
|
||||||
|
</label>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input
|
<input
|
||||||
id="locality"
|
id="locality"
|
||||||
name="locality"
|
name="locality"
|
||||||
placeholder="City"
|
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control" />
|
class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
@ -405,10 +395,12 @@
|
|||||||
|
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<label for="region">
|
||||||
|
State / Region
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
id="region"
|
id="region"
|
||||||
name="region"
|
name="region"
|
||||||
placeholder="State / Region"
|
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control" />
|
class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
@ -416,10 +408,12 @@
|
|||||||
|
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<label for="postal_Code">
|
||||||
|
Postal Code
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
id="postal_code"
|
id="postal_code"
|
||||||
name="postal_code"
|
name="postal_code"
|
||||||
placeholder="Postal Code"
|
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control" />
|
class="form-control" />
|
||||||
</div>
|
</div>
|
||||||
@ -427,6 +421,9 @@
|
|||||||
|
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<label for="country_code_alpha2">
|
||||||
|
Country
|
||||||
|
</label>
|
||||||
<select id="country_code_alpha2" class="form-control" name="country_code_alpha2">
|
<select id="country_code_alpha2" class="form-control" name="country_code_alpha2">
|
||||||
{% include "payments/countries.html" %}
|
{% include "payments/countries.html" %}
|
||||||
</select>
|
</select>
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
{% if a.first_name or a.last_name %}
|
|
||||||
<p>{{ a.first_name|default:"" }} {{ a.last_name|default:"" }}</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if a.company %}
|
{% if a.company %}
|
||||||
<p>{{ a.company }}</p>
|
<p>{{ a.company }}</p>
|
||||||
|
{% else %}
|
||||||
|
<p>{{ email }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if a.extended_address %}
|
{% if a.extended_address %}
|
||||||
@ -30,8 +28,6 @@
|
|||||||
<p>{{ a.postal_code }}</p>
|
<p>{{ a.postal_code }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<input type="hidden" name="first_name" value="{{ a.first_name|default:"" }}">
|
|
||||||
<input type="hidden" name="last_name" value="{{ a.last_name|default:"" }}">
|
|
||||||
<input type="hidden" name="company" value="{{ a.company|default:"" }}">
|
<input type="hidden" name="company" value="{{ a.company|default:"" }}">
|
||||||
<input type="hidden" name="street_address" value="{{ a.street_address|default:"" }}">
|
<input type="hidden" name="street_address" value="{{ a.street_address|default:"" }}">
|
||||||
<input type="hidden" name="extended_address" value="{{ a.extended_address|default:"" }}">
|
<input type="hidden" name="extended_address" value="{{ a.extended_address|default:"" }}">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% if a.first_name or a.last_name %}{{ a.first_name|default:"" }} {{ a.last_name|default:"" }}
|
{% if a.company %}{{ a.company }}
|
||||||
{% endif %}{% if a.company %}{{ a.company }}
|
{% else %}{{ email }}
|
||||||
{% endif %}{% if a.extended_address %}VAT: {{ a.extended_address }}
|
{% endif %}{% if a.extended_address %}VAT: {{ a.extended_address }}
|
||||||
{% endif %}{% if a.street_address %}{{ a.street_address }}
|
{% endif %}{% if a.street_address %}{{ a.street_address }}
|
||||||
{% endif %}{% if a.locality %}{{ a.locality }}
|
{% endif %}{% if a.locality %}{{ a.locality }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user