From f68d5b29a70d438b4fbc9dd923c2e0a490915dc4 Mon Sep 17 00:00:00 2001 From: George Pattichis Date: Wed, 24 Jul 2024 18:50:52 +0300 Subject: [PATCH 1/5] Grammar Check --- src/Tickets/Commerce/Gateways/Stripe/Settings.php | 2 +- .../tickets-commerce/stripe/modal/signup-complete/content.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tickets/Commerce/Gateways/Stripe/Settings.php b/src/Tickets/Commerce/Gateways/Stripe/Settings.php index 6210f435dc..8296e94df5 100644 --- a/src/Tickets/Commerce/Gateways/Stripe/Settings.php +++ b/src/Tickets/Commerce/Gateways/Stripe/Settings.php @@ -203,7 +203,7 @@ public function get_settings() { $payment_methods_tooltip = sprintf( // Translators: %1$s: Opening `` tag. %2$s: The currency name. %3$s: Closing `` tag. %4$s: Opening `` tag for Stripe link. %5$s: Closing `` tag. - __( '%1$sPayment methods available for %2$s%3$s.

The payment methods listed here are dependent on the currency selected for Tickets Commerce and the currency each payment method support. If you select a payment provider outside of Credit Cards, additional billing information fields will display on checkout as required by Stripe. You can review the payment methods and their availablity for each currency on %4$sStripe\'s documentation%5$s.

', 'event-tickets' ), + __( '%1$sPayment methods available for %2$s%3$s.

The payment methods listed here depend on the currency selected for Tickets Commerce and the currency supported by each payment method. If you select a payment provider other than Credit Cards, additional billing information fields will be displayed at checkout as required by Stripe. You can review the payment methods and their availablity for each currency on %4$sStripe\'s documentation%5$s.

', 'event-tickets' ), '', $currency_name, '', diff --git a/src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php b/src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php index 0c2a77b26a..ab5f7eda52 100644 --- a/src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php +++ b/src/admin-views/settings/tickets-commerce/stripe/modal/signup-complete/content.php @@ -60,7 +60,7 @@ ', '' ); From 6687ccf3e1c86479ebd800b11e0ffd3b45c6dd06 Mon Sep 17 00:00:00 2001 From: George Pattichis Date: Wed, 24 Jul 2024 20:16:13 +0300 Subject: [PATCH 2/5] Design/QA review changes --- .../js/commerce/gateway/stripe/checkout.js | 3 +++ .../postcss/tickets-commerce/_checkout.pcss | 20 +++++++++++++++---- .../postcss/tickets-commerce/_success.pcss | 3 +-- .../tickets-commerce/gateway/free/_all.pcss | 2 +- src/views/v2/commerce/checkout/gateways.php | 4 ++-- .../checkout/purchaser-info/address.php | 10 ++++++++-- .../commerce/checkout/purchaser-info/city.php | 5 ++++- .../checkout/purchaser-info/country.php | 5 ++++- .../checkout/purchaser-info/email.php | 5 ++++- .../commerce/checkout/purchaser-info/name.php | 6 +++++- .../checkout/purchaser-info/state.php | 5 ++++- .../commerce/checkout/purchaser-info/zip.php | 5 ++++- 12 files changed, 56 insertions(+), 17 deletions(-) diff --git a/src/resources/js/commerce/gateway/stripe/checkout.js b/src/resources/js/commerce/gateway/stripe/checkout.js index 914c97f151..ca7eaf010e 100644 --- a/src/resources/js/commerce/gateway/stripe/checkout.js +++ b/src/resources/js/commerce/gateway/stripe/checkout.js @@ -529,9 +529,11 @@ tribe.tickets.commerce.gateway.stripe.checkout = {}; let valid = true; fields.each((index, field) => { field.classList.remove('error'); + field.nextElementSibling.classList.add( obj.selectors.hiddenElement.className() ); if (field.required && field.value === '') { valid = false; field.classList.add('error'); + field.nextElementSibling.classList.remove( obj.selectors.hiddenElement.className() ); } }); @@ -578,6 +580,7 @@ tribe.tickets.commerce.gateway.stripe.checkout = {}; setTimeout(() => { $('.tribe-tickets__commerce-checkout-gateways').get(0).scrollIntoView({behavior: 'smooth'}); $( obj.selectors.submitButton ).removeClass( obj.selectors.hiddenElement.className() ); + $('.tribe-tickets__commerce-checkout-section-header').removeClass( obj.selectors.hiddenElement.className() ) }, 2000); } diff --git a/src/resources/postcss/tickets-commerce/_checkout.pcss b/src/resources/postcss/tickets-commerce/_checkout.pcss index e0d8199ff0..41b90e3348 100644 --- a/src/resources/postcss/tickets-commerce/_checkout.pcss +++ b/src/resources/postcss/tickets-commerce/_checkout.pcss @@ -320,7 +320,11 @@ .tribe-tickets__form-field-description { color: var(--tec-color-icon-primary-alt); - margin: var(--tec-spacer-1) 0; + margin: var(--tec-spacer-1) 0 0; + + &.error { + color: red; + } } &.disabled { @@ -339,7 +343,7 @@ } .tribe-tickets__commerce-checkout-purchaser-info-title { - margin-bottom: var(--tec-spacer-3); + margin: var(--tec-spacer-3) 0; } .tribe-tickets__commerce-checkout-form-submit-button { @@ -348,6 +352,15 @@ width: 100%; } + .tribe-tickets__form-field-input-wrapper { + + input::placeholder { + color: var(--tec-color-border-tertiary); + font-size: var(--tec-font-size-2); + opacity: 1; + } + } + /* ------------------------------------------------------------------------- * Theme Overrides - Twenty Twenty * ------------------------------------------------------------------------- */ @@ -356,8 +369,7 @@ h1, h2, - h3, - h4 { + h3 { margin: initial; } diff --git a/src/resources/postcss/tickets-commerce/_success.pcss b/src/resources/postcss/tickets-commerce/_success.pcss index 42fcb62340..5cd1dee1b7 100644 --- a/src/resources/postcss/tickets-commerce/_success.pcss +++ b/src/resources/postcss/tickets-commerce/_success.pcss @@ -83,8 +83,7 @@ h1, h2, - h3, - h4 { + h3 { margin: initial; } diff --git a/src/resources/postcss/tickets-commerce/gateway/free/_all.pcss b/src/resources/postcss/tickets-commerce/gateway/free/_all.pcss index ac56a1208c..7b5734335b 100644 --- a/src/resources/postcss/tickets-commerce/gateway/free/_all.pcss +++ b/src/resources/postcss/tickets-commerce/gateway/free/_all.pcss @@ -5,6 +5,6 @@ */ .event-tickets { .tribe-tickets__commerce-checkout-section-header { - display: none; + margin-bottom: var(--tec-spacer-5); } } diff --git a/src/views/v2/commerce/checkout/gateways.php b/src/views/v2/commerce/checkout/gateways.php index 9d4daa834a..a1482df486 100644 --- a/src/views/v2/commerce/checkout/gateways.php +++ b/src/views/v2/commerce/checkout/gateways.php @@ -38,8 +38,8 @@ ?>
-

- +

+

required /> +
+ +
/> +
diff --git a/src/views/v2/commerce/checkout/purchaser-info/city.php b/src/views/v2/commerce/checkout/purchaser-info/city.php index 37e62bd62a..2c4c2e4865 100644 --- a/src/views/v2/commerce/checkout/purchaser-info/city.php +++ b/src/views/v2/commerce/checkout/purchaser-info/city.php @@ -31,7 +31,7 @@ ?>
@@ -43,5 +43,8 @@ required /> +
+ +
diff --git a/src/views/v2/commerce/checkout/purchaser-info/country.php b/src/views/v2/commerce/checkout/purchaser-info/country.php index 0fb4c59fb4..096b11e385 100644 --- a/src/views/v2/commerce/checkout/purchaser-info/country.php +++ b/src/views/v2/commerce/checkout/purchaser-info/country.php @@ -38,7 +38,7 @@ ?>
@@ -51,5 +51,8 @@ > +
+ +
diff --git a/src/views/v2/commerce/checkout/purchaser-info/email.php b/src/views/v2/commerce/checkout/purchaser-info/email.php index 1327976a02..a0638bc990 100644 --- a/src/views/v2/commerce/checkout/purchaser-info/email.php +++ b/src/views/v2/commerce/checkout/purchaser-info/email.php @@ -31,7 +31,7 @@ ?> +