From 178c0b61f2deacfeca3c985871390c16dc86e9ea Mon Sep 17 00:00:00 2001
From: Nathan Chapman
Date: Thu, 19 May 2022 18:50:23 -0600
Subject: [PATCH 1/2] Add ability for customers to change password from account
---
src/static/styles/main.css | 17 +++++++-
.../templates/storefront/customer_detail.html | 40 ++++++++++---------
.../templates/storefront/customer_form.html | 3 ++
src/templates/account/password_change.html | 21 ++++++++++
4 files changed, 61 insertions(+), 20 deletions(-)
create mode 100644 src/templates/account/password_change.html
diff --git a/src/static/styles/main.css b/src/static/styles/main.css
index 613d29b..7cfbe56 100644
--- a/src/static/styles/main.css
+++ b/src/static/styles/main.css
@@ -485,7 +485,7 @@ section:not(:last-child) {
background-blend-mode: multiply;
background-size: cover;
background-position: center;
- color: white;
+ color: #f1e8e2;
text-align: center;
padding: 2rem 1rem;
font-family: 'Vollkorn', serif;
@@ -577,6 +577,11 @@ article > header {
display: flex;
justify-content: space-between;
align-items: center;
+ align-content: center;
+}
+
+.article__header--with-action h1 {
+ margin-bottom: 0;
}
article + article {
@@ -883,6 +888,16 @@ article + article {
}
+/* ==========================================================================
+ Customer/User
+ ========================================================================== */
+.customer__detail-section {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 4rem;
+}
+
+
/* ==========================================================================
diff --git a/src/storefront/templates/storefront/customer_detail.html b/src/storefront/templates/storefront/customer_detail.html
index 52cba99..e833612 100644
--- a/src/storefront/templates/storefront/customer_detail.html
+++ b/src/storefront/templates/storefront/customer_detail.html
@@ -11,25 +11,27 @@
Info
-
- Email address
- {{customer.email}}
- Manage
-
-
- Default shipping address
- {% with shipping_address=customer.default_shipping_address %}
-
- {{shipping_address.first_name}}
- {{shipping_address.last_name}}
- {{shipping_address.street_address_1}}
- {% if shipping_address.street_address_2 %}
- {{shipping_address.street_address_2}}
- {% endif %}
- {{shipping_address.city}}, {{shipping_address.state}}, {{shipping_address.postal_code}}
-
- {% endwith %}
-
+
+
+
Email address
+ {{customer.email}}
+
Manage
+
+
+
Default shipping address
+ {% with shipping_address=customer.default_shipping_address %}
+
+ {{shipping_address.first_name}}
+ {{shipping_address.last_name}}
+ {{shipping_address.street_address_1}}
+ {% if shipping_address.street_address_2 %}
+ {{shipping_address.street_address_2}}
+ {% endif %}
+ {{shipping_address.city}}, {{shipping_address.state}}, {{shipping_address.postal_code}}
+
+ {% endwith %}
+
+
Your addresses
diff --git a/src/storefront/templates/storefront/customer_form.html b/src/storefront/templates/storefront/customer_form.html
index db37b6c..b63ba12 100644
--- a/src/storefront/templates/storefront/customer_form.html
+++ b/src/storefront/templates/storefront/customer_form.html
@@ -5,6 +5,9 @@