Don't show description text on Create Category modal

This commit is contained in:
Neil Lalonde 2014-02-26 13:29:02 -05:00
parent 043901ef46
commit 1165aa2dae
2 changed files with 6 additions and 2 deletions

View File

@ -99,6 +99,10 @@ Discourse.EditCategoryController = Discourse.ObjectController.extend(Discourse.M
return I18n.t('category.delete'); return I18n.t('category.delete');
}.property(), }.property(),
showDescription: function() {
return !this.get('isUncategorized') && this.get('id');
}.property('isUncategorized', 'id'),
actions: { actions: {
selectGeneral: function() { selectGeneral: function() {

View File

@ -33,7 +33,7 @@
{{/if}} {{/if}}
</section> </section>
{{#unless isUncategorized}} {{#if showDescription}}
<section class='field'> <section class='field'>
<label>{{i18n category.description}}</label> <label>{{i18n category.description}}</label>
@ -47,7 +47,7 @@
<button class="btn btn-small" {{action showCategoryTopic}}>{{i18n category.change_in_category_topic}}</button> <button class="btn btn-small" {{action showCategoryTopic}}>{{i18n category.change_in_category_topic}}</button>
{{/if}} {{/if}}
</section> </section>
{{/unless}} {{/if}}
<section class='field'> <section class='field'>
<label>{{i18n category.badge_colors}}</label> <label>{{i18n category.badge_colors}}</label>