diff --git a/input/assets/js/main.js b/input/assets/js/main.js index ba819f054..ef4c0a18c 100755 --- a/input/assets/js/main.js +++ b/input/assets/js/main.js @@ -506,14 +506,12 @@ function closeForm(formClassName) { function initializeEditableData(formClassName) { var formWrapper = $(formClassName); if (formWrapper.hasClass("in")) { - console.log('has class IN'); openForm(formClassName); } else { - console.log('CLOSES'); closeForm(formClassName); } - $("." + formClassName + "-show-btn").click(function(){ console.log('SHOWS BTN CLICKED'); openForm(formClassName); }); - $("." + formClassName + "-hide-btn").click(function(){ console.log('HIDE BTN CLICKED'); closeForm(formClassName); }); + $("." + formClassName + "-show-btn").click(function(){ openForm(formClassName); }); + $("." + formClassName + "-hide-btn").click(function(){ closeForm(formClassName); }); } initializeEditableData("personal-details-edit"); diff --git a/input/i18n/de/my-account.yaml b/input/i18n/de/my-account.yaml index 79b2032dd..c975ef8b0 100644 --- a/input/i18n/de/my-account.yaml +++ b/input/i18n/de/my-account.yaml @@ -10,6 +10,7 @@ myAccountSidebar: signOut: Abmelden changePassword: Passwort ändern personalDetails: + title: Ihre Benutzerdaten shopAllBtn: Alles bestellen updateBtn: Details aktualisieren cancelBtn: Abbrechen @@ -21,7 +22,15 @@ personalDetails: subtitle: Neue Saison, neuer Style welcomeBack: Willkommen zurück welcomeDescription: Für einen besseren Kundenservice geben Sie bitte Ihre Kundennummer an. - personalDetailsTitle: Ihre Benutzerdaten + subscribedToNewsletter: Subscribed to weekly newsletter + personalDetailsForm: + title: Title + firstName: First Name + lastName: Last Name + phone: Telephone Number + email: Email Address + password: Password + confirmPassword: Confirm Password addressBook: title : Addressbuch defaultAddresses: diff --git a/input/i18n/en/my-account.yaml b/input/i18n/en/my-account.yaml index 4efe891f7..4fc01b19a 100644 --- a/input/i18n/en/my-account.yaml +++ b/input/i18n/en/my-account.yaml @@ -10,6 +10,7 @@ myAccountSidebar: signOut: Sign Out changePassword: Change password personalDetails: + title: Your Personal Details shopAllBtn: Shop All updateBtn: Update Details cancelBtn: Cancel @@ -21,7 +22,16 @@ personalDetails: subtitle: Make the great days happen welcomeBack: Welcome back welcomeDescription: for an even better customer service please provide your customer number - personalDetailsTitle: Your Personal Details + subscribedToNewsletter: Subscribed to weekly newsletter + personalDetailsForm: + title: Title + firstName: First Name + lastName: Last Name + phone: Telephone Number + email: Email Address + password: Password + confirmPassword: Confirm Password + subscribeToNewsletter: Please add me to the Sunrise Newsletter addressBook: title : Address Book defaultAddresses: diff --git a/input/templates/my-account-change-password.hbs b/input/templates/my-account-change-password.hbs index 0ea485e66..492c8bba7 100644 --- a/input/templates/my-account-change-password.hbs +++ b/input/templates/my-account-change-password.hbs @@ -29,8 +29,10 @@
- {{> form/global-messages messages=content.changePasswordForm.messages}} - {{> form/global-errors errors=content.changePasswordForm.errors}} +
+ {{> form/global-messages messages=content.changePasswordForm.messages}} + {{> form/global-errors errors=content.changePasswordForm.errors}} +
diff --git a/input/templates/my-account-edit-address.hbs b/input/templates/my-account-edit-address.hbs index 12e159c69..2c3cafd2e 100644 --- a/input/templates/my-account-edit-address.hbs +++ b/input/templates/my-account-edit-address.hbs @@ -32,8 +32,10 @@ - {{> form/global-messages messages=content.editAddressForm.messages}} - {{> form/global-errors errors=content.editAddressForm.errors}} +
+ {{> form/global-messages messages=content.editAddressForm.messages}} + {{> form/global-errors errors=content.editAddressForm.errors}} +
{{> myaccount/my-address-book-address-form form=content.editAddressForm}} diff --git a/input/templates/my-account-login.hbs b/input/templates/my-account-login.hbs index d72b5b05f..5b48f589f 100644 --- a/input/templates/my-account-login.hbs +++ b/input/templates/my-account-login.hbs @@ -17,11 +17,11 @@ - {{> form/global-messages messages=content.newAddressForm.messages}} - {{> form/global-errors errors=content.newAddressForm.errors}} +
+ {{> form/global-messages messages=content.newAddressForm.messages}} + {{> form/global-errors errors=content.newAddressForm.errors}} +
{{> myaccount/my-address-book-address-form form=content.newAddressForm}} diff --git a/input/templates/my-account-personal-details.hbs b/input/templates/my-account-personal-details.hbs index 38d0f62fe..dc7dc74c6 100644 --- a/input/templates/my-account-personal-details.hbs +++ b/input/templates/my-account-personal-details.hbs @@ -1,3 +1,4 @@ + @@ -24,83 +25,79 @@
{{i18n "my-account:personalDetails.welcomeBack"}} - {{content.welcomeName}} + {{content.customerInfo.customer.firstName}}
{{i18n "my-account:personalDetails.welcomeDescription"}}
- {{content.customerNumber}} + {{content.customerInfo.customer.customerNumber}}
-
- {{i18n "my-account:personalDetails.personalDetailsTitle"}} + {{i18n "my-account:personalDetails.title"}} + {{i18n "main:form.required"}}*
-
-
{{content.personalDetails.name}}
-
{{content.personalDetails.phone}}
-
{{content.personalDetails.email}}

-
{{content.personalDetails.subscribed}}
-
- -
-
-
-
- - - -
- {{i18n "my-account:personalDetails.personalDetailsTitle"}} - {{i18n "main:form.required"}}* -
-
-
-
- {{content.editPersonalDetails.title}}
- -
-
-
-
-
-
- {{content.editPersonalDetails.firstName}}*
- + +
+
+
+ {{content.customerInfo.customer.title}} + {{content.customerInfo.customer.firstName}} + {{content.customerInfo.customer.lastName}}
-
- {{content.editPersonalDetails.primaryPhone}}
-
- {{content.editPersonalDetails.formNotesOne}} +
{{content.customerInfo.customer.email}}

+ {{#if content.customerInfo.subscribed}} +
{{i18n "my-account:personalDetails.subscribedToNewsletter"}}
+ {{/if}} +
+
-
-
- {{content.editPersonalDetails.secondName}}*
- +
+ +
+ + +
+ {{> form/global-messages messages=content.personalDetailsForm.messages}} + {{> form/global-errors errors=content.personalDetailsForm.errors}}
-
- {{content.editPersonalDetails.email}}*
-
- {{content.editPersonalDetails.formNotesTwo}} +
+
+ {{> form/choose-title containerClass="form-sections" selectId="personal-details-title-select" selectName="title" options=content.personalDetailsForm.salutations}} +
+
+
+
+ {{i18n "my-account:personalDetails.personalDetailsForm.firstName"}}*
+ +
+
+ {{i18n "my-account:personalDetails.personalDetailsForm.email"}}*
+
+ +
+
+
+
+ {{i18n "my-account:personalDetails.personalDetailsForm.lastName"}}*
+ +
+
+
+
+
+ + + {{i18n "my-account:personalDetails.personalDetailsForm.subscribeToNewsletter"}} + +
+
+ + + +
-
-
-
- - {{content.addMeTo}} {{content.newsletter}} - -
-
- - - - -
- +
@@ -148,3 +145,4 @@ + diff --git a/input/templates/my-account-personal-details.json b/input/templates/my-account-personal-details.json index bf97ce920..ab2165fa0 100644 --- a/input/templates/my-account-personal-details.json +++ b/input/templates/my-account-personal-details.json @@ -2,46 +2,19 @@ "header" : { "$ref" : "common/header.json" }, "footer" : { "$ref" : "common/footer.json" }, "content" : { - "welcomeName" : "Bruce Wayne", - "customerNumber" : "1010101069691010", - "personalDetailsRequired" : "Required", - "personalDetails" : { - "name" : "Mr. Bruce Wayne", - "password" : "Password: ********", - "phone" : "Phone: +49 123 123 123 123", - "email" : "batman@gotham.com", - "subscribed" : "Subscribed to weekly newsletter", - "editBtn" : "Edit" + "customerInfo" : { + "customer" : { "$ref" : "common/customer-1.json" }, + "subscribed" : true }, - "editPersonalDetails" : { - "title" : "Title", - "titleOptions" : [ - { - "text" : "Choose your title", - "value" : "choose your title", - "disabled" : true, - "selected" : true - }, - { - "text" : "Mr.", - "value" : "mr", - "selected" : false - }, - { - "text" : "Mrs.", - "value" : "mrs", - "selected" : false - } - ], - "firstName" : "First Name", - "primaryPhone" : "Primary Telephone Number", - "formNotesOne" : "Please provide your lorem ipsun, bla bla bla, Please provide your lorem ipsun, bla bla bla", - "secondName" : "Second Name", - "email" : "Email Address", - "formNotesTwo" : "Please provide your lorem ipsun, bla bla bla, Please provide your lorem ipsun, bla bla bla" - }, - "addMeTo" : "Please add me to the", - "newsletter" : "SUNRISE Newsletter" + "personalDetailsForm" : { + "salutations" : { "$ref" : "form/choose-title-1.json" }, + "firstName" : "Bruce", + "lastName" : "Wayne", + "email" : "somebody@somewhere.com", + "subscribeToNewsletter" : true, + "messages" : { "$ref" : "form/messages.json" }, + "errors" : { "$ref" : "form/errors.json" } + } }, - "meta" : { "$ref" : "common/meta.json" } + "meta" : { "$ref" : "common/meta.json" } } diff --git a/input/templates/partials/common/customer-1.json b/input/templates/partials/common/customer-1.json new file mode 100644 index 000000000..667a62a27 --- /dev/null +++ b/input/templates/partials/common/customer-1.json @@ -0,0 +1,7 @@ +{ + "customerNumber" : "1010101069691010", + "email" : "somebody@somewhere.com", + "firstName" : "Bruce", + "lastName" : "Wayne", + "title" : "Mr." +} \ No newline at end of file diff --git a/input/templates/partials/common/links.json b/input/templates/partials/common/links.json index 1f36b3138..c8e4fd2f1 100644 --- a/input/templates/partials/common/links.json +++ b/input/templates/partials/common/links.json @@ -25,16 +25,19 @@ "addToWishlist": { "href": "wishlist.html" }, "addReview": { "href": "pdp.html"}, - "signIn": { "href" : "signIn.html" }, - "myAccount": { "href": "myaccount.html" }, - - "checkout": { "href": "checkout-shipping.html" }, + "signIn": { "href" : "my-account-login.html" }, + "logInSubmit": { "href": "my-account-personal-details.html" }, + "signUpSubmit": { "href": "my-account-personal-details.html" }, + "myAccount": { "href": "my-account-personal-details.html" }, + "myPersonalDetails" : { "href": "my-account-personal-details.html" }, + "changePassword": { "href": "my-account-change-password.html" }, "myAddressBook": { "href": "my-account-address-book.html" }, "myAddressBookAddAddress": { "href": "my-account-new-address.html" }, "myAddressBookAddAddressSubmit": { "href": "my-account-address-book.html" }, "myAddressBookEditAddressSubmit": { "href": "my-account-address-book.html" }, "myOrders": { "href": "my-account-my-orders.html" }, + "checkout": { "href": "checkout-shipping.html" }, "checkoutConfirmation": { "href": "checkout-confirmation.html" }, "checkoutConfirmationSubmit": { "href": "checkout-thankyou.html" }, "checkoutThankYou": { "href": "checkout-thankyou.html" }, @@ -47,7 +50,5 @@ "editPaymentInfo": { "href": "checkout-payment.html" }, "checkoutPaymentSubmit": { "href": "checkout-confirmation.html" }, "editShippingMethod": { "href": "checkout-shipping.html#shipping-methods-setting" }, - "continueShopping": { "href": "pop.html" }, - "changePassword": { "href": "my-account-change-password.html" }, - "personalDetails": { "href": "my-account-personal-details.html" } + "continueShopping": { "href": "pop.html" } } diff --git a/input/templates/partials/myaccount/login-box.hbs b/input/templates/partials/myaccount/login-box.hbs index e549a21b2..648a35df0 100644 --- a/input/templates/partials/myaccount/login-box.hbs +++ b/input/templates/partials/myaccount/login-box.hbs @@ -10,31 +10,34 @@