From d43f0331acc7dbc9b475fe01be83ce4daeffc287 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Tue, 13 Dec 2022 12:25:09 +0100 Subject: [PATCH] Contact information section for email + phone number + add first name and last name to the billing address section --- app/views/split_checkout/_details.html.haml | 30 ++++++++++----------- app/views/split_checkout/_summary.html.haml | 8 +++--- config/locales/en.yml | 16 +++++------ 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/views/split_checkout/_details.html.haml b/app/views/split_checkout/_details.html.haml index 57c26a5767..545b3c52f2 100644 --- a/app/views/split_checkout/_details.html.haml +++ b/app/views/split_checkout/_details.html.haml @@ -3,26 +3,16 @@ %div.checkout-substep -# YOUR DETAILS %div.checkout-title - = t("split_checkout.step1.your_details.title") + = t("split_checkout.step1.contact_information.title") %div.checkout-input - = bill_address.label :firstname, t("split_checkout.step1.your_details.first_name.label") - = bill_address.text_field :firstname, { placeholder: t("split_checkout.step1.your_details.first_name.placeholder") } - = f.error_message_on "bill_address.firstname" - - %div.checkout-input - = bill_address.label :lastname, t("split_checkout.step1.your_details.last_name.label") - = bill_address.text_field :lastname, { placeholder: t("split_checkout.step1.your_details.last_name.placeholder") } - = f.error_message_on "bill_address.lastname" - - %div.checkout-input - = f.label :email, t("split_checkout.step1.your_details.email.label") - = f.text_field :email, { placeholder: t("split_checkout.step1.your_details.email.placeholder") } + = f.label :email, t("split_checkout.step1.contact_information.email.label") + = f.text_field :email, { placeholder: t("split_checkout.step1.contact_information.email.placeholder") } = f.error_message_on :email %div.checkout-input - = bill_address.label :phone, t("split_checkout.step1.your_details.phone.label") - = bill_address.text_field :phone, { placeholder: t("split_checkout.step1.your_details.phone.placeholder") } + = bill_address.label :phone, t("split_checkout.step1.contact_information.phone.label") + = bill_address.text_field :phone, { placeholder: t("split_checkout.step1.contact_information.phone.placeholder") } = f.error_message_on "bill_address.phone" %div.checkout-substep @@ -30,6 +20,16 @@ %div.checkout-title = t("split_checkout.step1.billing_address.title") + %div.checkout-input + = bill_address.label :firstname, t("split_checkout.step1.billing_address.first_name.label") + = bill_address.text_field :firstname, { placeholder: t("split_checkout.step1.billing_address.first_name.placeholder") } + = f.error_message_on "bill_address.firstname" + + %div.checkout-input + = bill_address.label :lastname, t("split_checkout.step1.billing_address.last_name.label") + = bill_address.text_field :lastname, { placeholder: t("split_checkout.step1.billing_address.last_name.placeholder") } + = f.error_message_on "bill_address.lastname" + %div.checkout-input = bill_address.label :address1, t("split_checkout.step1.address.address1.label") = bill_address.text_field :address1, { placeholder: t("split_checkout.step1.address.address1.placeholder") } diff --git a/app/views/split_checkout/_summary.html.haml b/app/views/split_checkout/_summary.html.haml index ce12204a72..e2eb64022c 100644 --- a/app/views/split_checkout/_summary.html.haml +++ b/app/views/split_checkout/_summary.html.haml @@ -5,25 +5,25 @@ %div.summary %span.summary-label - = t("split_checkout.step1.your_details.first_name.label") + = t("split_checkout.step1.billing_address.first_name.label") %span.summary-value = @order.bill_address.firstname %div.summary %span.summary-label - = t("split_checkout.step1.your_details.last_name.label") + = t("split_checkout.step1.billing_address.last_name.label") %span.summary-value = @order.bill_address.lastname %div.summary %span.summary-label - = t("split_checkout.step1.your_details.email.label") + = t("split_checkout.step1.contact_information.email.label") %span.summary-value = @order.user ? @order.user.email : "Change me" %div.summary %span.summary-label - = t("split_checkout.step1.your_details.phone.label") + = t("split_checkout.step1.contact_information.phone.label") %span.summary-value = @order.bill_address.phone diff --git a/config/locales/en.yml b/config/locales/en.yml index 5094cfd038..488f01aab3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1915,14 +1915,8 @@ en: cart: "cart" message_html: "You have an order for this order cycle already. Check the %{cart} to see the items you ordered before. You can also cancel items as long as the order cycle is open." step1: - your_details: - title: Your details - first_name: - label: First Name - placeholder: e.g. Jane - last_name: - label: Last Name - placeholder: e.g. Doe + contact_information: + title: Contact information email: label: Email placeholder: e.g. Janedoe@email.com @@ -1931,6 +1925,12 @@ en: placeholder: e.g. 07987654321 billing_address: title: Billing address + first_name: + label: First Name + placeholder: e.g. Jane + last_name: + label: Last Name + placeholder: e.g. Doe address: address1: label: Address (Street + House Number)