diff --git a/app/assets/javascripts/discourse/controllers/edit-category.js.es6 b/app/assets/javascripts/discourse/controllers/edit-category.js.es6 index 7f0f6654959..443d3bcb7c4 100644 --- a/app/assets/javascripts/discourse/controllers/edit-category.js.es6 +++ b/app/assets/javascripts/discourse/controllers/edit-category.js.es6 @@ -146,9 +146,9 @@ export default ObjectController.extend(ModalFunctionality, { }).catch(function(error) { if (error && error.responseText) { - self.flash($.parseJSON(error.responseText).errors[0]); + self.flash($.parseJSON(error.responseText).errors[0], 'error'); } else { - self.flash(I18n.t('generic_error')); + self.flash(I18n.t('generic_error'), 'error'); } self.set('saving', false); }); diff --git a/app/assets/javascripts/discourse/models/category.js b/app/assets/javascripts/discourse/models/category.js index 3f0732328fe..3f8bb6edb67 100644 --- a/app/assets/javascripts/discourse/models/category.js +++ b/app/assets/javascripts/discourse/models/category.js @@ -58,6 +58,7 @@ Discourse.Category = Discourse.Model.extend({ return Discourse.ajax(url, { data: { name: this.get('name'), + slug: this.get('slug'), color: this.get('color'), text_color: this.get('text_color'), secure: this.get('secure'), diff --git a/app/assets/javascripts/discourse/templates/modal/edit-category-general.hbs b/app/assets/javascripts/discourse/templates/modal/edit-category-general.hbs index 096441c01a2..7931c5ef57e 100644 --- a/app/assets/javascripts/discourse/templates/modal/edit-category-general.hbs +++ b/app/assets/javascripts/discourse/templates/modal/edit-category-general.hbs @@ -1,7 +1,13 @@