From 1165aa2dae6a13ccd6b899bb606a1c2b5ee68a87 Mon Sep 17 00:00:00 2001
From: Neil Lalonde <neillalonde@gmail.com>
Date: Wed, 26 Feb 2014 13:29:02 -0500
Subject: [PATCH] Don't show description text on Create Category modal

---
 .../discourse/controllers/edit_category_controller.js         | 4 ++++
 .../discourse/templates/modal/edit_category.js.handlebars     | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/assets/javascripts/discourse/controllers/edit_category_controller.js b/app/assets/javascripts/discourse/controllers/edit_category_controller.js
index a431135eabd..5d64811c1ae 100644
--- a/app/assets/javascripts/discourse/controllers/edit_category_controller.js
+++ b/app/assets/javascripts/discourse/controllers/edit_category_controller.js
@@ -99,6 +99,10 @@ Discourse.EditCategoryController = Discourse.ObjectController.extend(Discourse.M
     return I18n.t('category.delete');
   }.property(),
 
+  showDescription: function() {
+    return !this.get('isUncategorized') && this.get('id');
+  }.property('isUncategorized', 'id'),
+
   actions: {
 
     selectGeneral: function() {
diff --git a/app/assets/javascripts/discourse/templates/modal/edit_category.js.handlebars b/app/assets/javascripts/discourse/templates/modal/edit_category.js.handlebars
index cc45b6b6901..4770195e7cf 100644
--- a/app/assets/javascripts/discourse/templates/modal/edit_category.js.handlebars
+++ b/app/assets/javascripts/discourse/templates/modal/edit_category.js.handlebars
@@ -33,7 +33,7 @@
           {{/if}}
         </section>
 
-        {{#unless isUncategorized}}
+        {{#if showDescription}}
           <section class='field'>
             <label>{{i18n category.description}}</label>
 
@@ -47,7 +47,7 @@
               <button class="btn btn-small" {{action showCategoryTopic}}>{{i18n category.change_in_category_topic}}</button>
             {{/if}}
           </section>
-        {{/unless}}
+        {{/if}}
 
         <section class='field'>
           <label>{{i18n category.badge_colors}}</label>