From 19b20116018828f267ba507fa33351a69fe153da Mon Sep 17 00:00:00 2001 From: Roman Rizzi Date: Mon, 18 Jan 2021 13:13:38 -0300 Subject: [PATCH] UX: Show a warning on the category edit page when category style is none and colors are disabled. (#11742) --- .../templates/components/edit-category-general.hbs | 13 +++++++++---- config/locales/client.en.yml | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/app/templates/components/edit-category-general.hbs b/app/assets/javascripts/discourse/app/templates/components/edit-category-general.hbs index e5ec4c44d13..353f1be1302 100644 --- a/app/assets/javascripts/discourse/app/templates/components/edit-category-general.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/edit-category-general.hbs @@ -50,8 +50,13 @@ {{/if}} - {{#unless noCategoryStyle}} -
+
+ {{#if noCategoryStyle}} + + {{else}}
{{html-safe categoryBadgePreview}} @@ -72,6 +77,6 @@
-
- {{/unless}} + {{/if}} +
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 5468e5520e5..67818f65031 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -3085,6 +3085,7 @@ en: list_filters: all: "all topics" none: "no subcategories" + colors_disabled: "You can’t select colors because you have a category style of none." flagging: title: "Thanks for helping to keep our community civil!"