From 85c2628049522aca1b07412b54a80d8069e53d09 Mon Sep 17 00:00:00 2001 From: Rishabh Garg Date: Tue, 9 Mar 2021 23:55:06 +0530 Subject: [PATCH] Added validation to not allow empty accent color (#1863) closes https://github.com/TryGhost/Team/issues/535 To ensure accent color is always set for a site, this updates brand settings screen and launch wizard to not allow empty accent color to be set or updated, adding the relevant error on the page which needs to be fixed before saving or continuing on the screens. - Shows error message for empty accent color on brand settings and launch wizard - Shows error message for invalid accent color on brand settings and launch wizard - Blocks save and continue with invalid/empty accent color on brand settings and launch wizard Co-authored-by: Peter Zimon --- ghost/admin/app/components/gh-brand-settings-form.hbs | 7 +++++-- ghost/admin/app/components/gh-brand-settings-form.js | 9 +++++---- .../components/gh-launch-wizard/customise-design.js | 4 ++++ ghost/admin/app/components/modal-branding.js | 3 +++ ghost/admin/app/styles/layouts/settings.css | 10 ++++++++++ ghost/admin/app/styles/patterns/buttons.css | 4 ++-- 6 files changed, 29 insertions(+), 8 deletions(-) diff --git a/ghost/admin/app/components/gh-brand-settings-form.hbs b/ghost/admin/app/components/gh-brand-settings-form.hbs index a7a5474d37..db98317888 100644 --- a/ghost/admin/app/components/gh-brand-settings-form.hbs +++ b/ghost/admin/app/components/gh-brand-settings-form.hbs @@ -1,11 +1,14 @@
-
+
Accent color
Primary color used in your publication theme
{{#each uploader.errors as |error|}}
{{or error.context error.message}}
{{/each}} +
+ +
@@ -18,7 +21,7 @@