From 6964674b2d7f2fb74ee34ec6b39df84ada7896fb Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Thu, 29 Aug 2024 18:51:50 +0530 Subject: [PATCH] Include country in validation check. --- assets/css/create-account.css | 5 +++-- assets/js/admin.js | 3 ++- includes/admin/templates/create-account-page.php | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/css/create-account.css b/assets/css/create-account.css index 8eeb623..8d9fb2b 100644 --- a/assets/css/create-account.css +++ b/assets/css/create-account.css @@ -314,12 +314,13 @@ .mailchimp-sf-form-wrapper .box.form-error { color: red; } -.mailchimp-sf-form-wrapper .box.form-error p { +.mailchimp-sf-form-wrapper .box.form-error p.error-field { margin-bottom: 0px; font-size: 14px; } -.mailchimp-sf-form-wrapper .box.form-error input { +.mailchimp-sf-form-wrapper .box.form-error input, +.mailchimp-sf-form-wrapper .box.form-error select { border-color: red; } diff --git a/assets/js/admin.js b/assets/js/admin.js index cf2d4d9..919fb67 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -207,6 +207,7 @@ 'business_name', 'email', 'address', + 'country', 'city', 'state', 'zip', @@ -234,7 +235,7 @@ const inputIds = Object.keys(errors); inputIds.forEach((key) => { - const inputElementId = `${wrapperId} input#${key}`; + const inputElementId = `${wrapperId} #${key}`; const errorElementId = `${wrapperId} #mailchimp-sf-${key}-error`; if (errors[key] !== null) { diff --git a/includes/admin/templates/create-account-page.php b/includes/admin/templates/create-account-page.php index 467f6b4..ad9a4f1 100644 --- a/includes/admin/templates/create-account-page.php +++ b/includes/admin/templates/create-account-page.php @@ -196,12 +196,14 @@
+