From e244a1a3196a3c9da59b7bb88ed5b228e5aea4c0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 8 Jan 2018 15:08:43 -0500 Subject: [PATCH] Extract category name fields into a component --- .../templates/components/category-name-fields.hbs | 10 ++++++++++ .../templates/components/edit-category-general.hbs | 11 +---------- 2 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 app/assets/javascripts/discourse/templates/components/category-name-fields.hbs diff --git a/app/assets/javascripts/discourse/templates/components/category-name-fields.hbs b/app/assets/javascripts/discourse/templates/components/category-name-fields.hbs new file mode 100644 index 00000000000..e0766f48284 --- /dev/null +++ b/app/assets/javascripts/discourse/templates/components/category-name-fields.hbs @@ -0,0 +1,10 @@ +
+
+ + {{text-field value=category.name placeholderKey="category.name_placeholder" maxlength="50"}} +
+
+ + {{text-field value=category.slug placeholderKey="category.slug_placeholder" maxlength="255"}} +
+
diff --git a/app/assets/javascripts/discourse/templates/components/edit-category-general.hbs b/app/assets/javascripts/discourse/templates/components/edit-category-general.hbs index c31406819a7..2e498f77c3f 100644 --- a/app/assets/javascripts/discourse/templates/components/edit-category-general.hbs +++ b/app/assets/javascripts/discourse/templates/components/edit-category-general.hbs @@ -1,14 +1,5 @@
-
-
- - {{text-field value=category.name placeholderKey="category.name_placeholder" maxlength="50"}} -
-
- - {{text-field value=category.slug placeholderKey="category.slug_placeholder" maxlength="255"}} -
-
+ {{category-name-fields category=category tagName=""}} {{#if canSelectParentCategory}}