UX: Hide category settings badges checkbox when enable_badges is off

UX: Hide category settings badges checkbox when enable_badges is off

diff --git a/app/assets/javascripts/discourse/app/templates/components/edit-category-settings.hbs b/app/assets/javascripts/discourse/app/templates/components/edit-category-settings.hbs
index 7bac284..f847963 100644
--- a/app/assets/javascripts/discourse/app/templates/components/edit-category-settings.hbs
+++ b/app/assets/javascripts/discourse/app/templates/components/edit-category-settings.hbs
@@ -46,12 +46,14 @@
     </div>
   </section>
 
-  <section class="field">
-    <label>
-      {{input type="checkbox" checked=category.allow_badges}}
-      {{i18n "category.allow_badges_label"}}
-    </label>
-  </section>
+  {{#if siteSettings.enable_badges}}
+    <section class="field allow-badges">
+      <label>
+        {{input type="checkbox" checked=category.allow_badges}}
+        {{i18n "category.allow_badges_label"}}
+      </label>
+    </section>
+  {{/if}}
 
   {{#if siteSettings.topic_featured_link_enabled}}
     <section class="field">

GitHub sha: 50827684

1 Like