diff --git a/app/assets/javascripts/discourse/components/auto-close-form.js.es6 b/app/assets/javascripts/discourse/components/auto-close-form.js.es6 index fdad14df537..51669101067 100644 --- a/app/assets/javascripts/discourse/components/auto-close-form.js.es6 +++ b/app/assets/javascripts/discourse/components/auto-close-form.js.es6 @@ -1,25 +1,29 @@ +import computed from "ember-addons/ember-computed-decorators"; +import { observes } from "ember-addons/ember-computed-decorators"; + export default Ember.Component.extend({ autoCloseValid: false, limited: false, - autoCloseUnits: function() { - var key = this.get("limited") ? "composer.auto_close.limited.units" - : "composer.auto_close.all.units"; + @computed("limited") + autoCloseUnits(limited) { + const key = limited ? "composer.auto_close.limited.units" : "composer.auto_close.all.units"; return I18n.t(key); - }.property("limited"), + }, - autoCloseExamples: function() { - var key = this.get("limited") ? "composer.auto_close.limited.examples" - : "composer.auto_close.all.examples"; + @computed("limited") + autoCloseExamples(limited) { + const key = limited ? "composer.auto_close.limited.examples" : "composer.auto_close.all.examples"; return I18n.t(key); - }.property("limited"), + }, - _updateAutoCloseValid: function() { - var isValid = this._isAutoCloseValid(this.get("autoCloseTime"), this.get("limited")); + @observes("autoCloseTime", "limited") + _updateAutoCloseValid(autoCloseTime, limited) { + var isValid = this._isAutoCloseValid(autoCloseTime, limited); this.set("autoCloseValid", isValid); - }.observes("autoCloseTime", "limited"), + }, - _isAutoCloseValid: function(autoCloseTime, limited) { + _isAutoCloseValid(autoCloseTime, limited) { var t = (autoCloseTime || "").toString().trim(); if (t.length === 0) { // "empty" is always valid diff --git a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs index dd943f94944..722a9f5e1f8 100644 --- a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs +++ b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs @@ -1,54 +1,61 @@ {{auto-close-form autoCloseTime=category.auto_close_hours autoCloseBasedOnLastPost=category.auto_close_based_on_last_post + autoCloseExamples="" limited="true" }} - - - {{input type="checkbox" checked=category.allow_badges}} - {{i18n 'category.allow_badges_label'}} - - - - - - - {{#if emailInEnabled}} - - - {{i18n 'category.email_in'}} - {{text-field value=category.email_in}} - - - - {{input type="checkbox" checked=category.email_in_allow_strangers}} - {{i18n 'category.email_in_allow_strangers'}} - - - {{else}} - {{i18n 'category.email_in_disabled'}} - {{i18n 'category.email_in_disabled_click'}} - {{/if}} - - - - - {{#if showPositionInput}} - {{i18n 'category.position'}} - {{text-field value=category.position class="position-input"}} - {{else}} - {{i18n 'category.position_disabled'}} - {{i18n 'category.position_disabled_click'}} - {{/if}} + + {{input type="checkbox" checked=category.allow_badges}} + {{i18n 'category.allow_badges_label'}} + - + {{input type="checkbox" checked=category.suppress_from_homepage}} {{i18n "category.suppress_from_homepage"}} +{{#if emailInEnabled}} + + + {{input type="checkbox" checked=category.email_in_allow_strangers}} + {{i18n 'category.email_in_allow_strangers'}} + + + + + {{fa-icon "envelope-o"}} + {{i18n 'category.email_in'}} + {{text-field value=category.email_in}} + + +{{/if}} + +{{#if showPositionInput}} + + + {{i18n 'category.position'}} + {{text-field value=category.position class="position-input"}} + + +{{/if}} + +{{#unless emailInEnabled}} + + {{i18n 'category.email_in_disabled'}} + {{i18n 'category.email_in_disabled_click'}} + +{{/unless}} + +{{#unless showPositionInput}} + + {{i18n 'category.position_disabled'}} + {{i18n 'category.position_disabled_click'}} + +{{/unless}} + {{plugin-outlet "category-custom-settings"}} diff --git a/app/assets/stylesheets/common/base/compose.scss b/app/assets/stylesheets/common/base/compose.scss index 4ebe91a7eee..844a9e32d37 100644 --- a/app/assets/stylesheets/common/base/compose.scss +++ b/app/assets/stylesheets/common/base/compose.scss @@ -130,6 +130,9 @@ div.ac-wrap { input[type=text] { width: 50px; } + label { + font-size: .929em; + } } }