diff --git a/app/assets/javascripts/admin/components/penalty-post-action.js.es6 b/app/assets/javascripts/admin/components/penalty-post-action.js.es6
index 6a703105fbf..09f267390ca 100644
--- a/app/assets/javascripts/admin/components/penalty-post-action.js.es6
+++ b/app/assets/javascripts/admin/components/penalty-post-action.js.es6
@@ -21,13 +21,11 @@ export default Component.extend({
actions: {
penaltyChanged() {
- let postAction = this.postAction;
-
// If we switch to edit mode, jump to the edit textarea
- if (postAction === "edit") {
+ if (this.postAction === "edit") {
scheduleOnce("afterRender", () => {
- let elem = this.element;
- let body = elem.closest(".modal-body");
+ const elem = this.element;
+ const body = elem.closest(".modal-body");
body.scrollTop(body.height());
elem.querySelector(".post-editor").focus();
});
diff --git a/app/assets/javascripts/admin/components/permalink-form.js.es6 b/app/assets/javascripts/admin/components/permalink-form.js.es6
index 34d222d30f6..e1b62a11df6 100644
--- a/app/assets/javascripts/admin/components/permalink-form.js.es6
+++ b/app/assets/javascripts/admin/components/permalink-form.js.es6
@@ -20,6 +20,19 @@ export default Component.extend({
];
},
+ didInsertElement() {
+ this._super(...arguments);
+
+ schedule("afterRender", () => {
+ $(this.element.querySelector(".external-url")).keydown(e => {
+ // enter key
+ if (e.keyCode === 13) {
+ this.send("submit");
+ }
+ });
+ });
+ },
+
focusPermalink() {
schedule("afterRender", () =>
this.element.querySelector(".permalink-url").focus()
@@ -64,19 +77,10 @@ export default Component.extend({
}
);
}
+ },
+
+ onChangePermalinkType(type) {
+ this.set("permalinkType", type);
}
- },
-
- didInsertElement() {
- this._super(...arguments);
-
- schedule("afterRender", () => {
- $(this.element.querySelector(".external-url")).keydown(e => {
- // enter key
- if (e.keyCode === 13) {
- this.send("submit");
- }
- });
- });
}
});
diff --git a/app/assets/javascripts/admin/components/site-settings/category-list.js.es6 b/app/assets/javascripts/admin/components/site-settings/category-list.js.es6
index ff83e13e520..24e9bb23b96 100644
--- a/app/assets/javascripts/admin/components/site-settings/category-list.js.es6
+++ b/app/assets/javascripts/admin/components/site-settings/category-list.js.es6
@@ -1,16 +1,15 @@
-import discourseComputed from "discourse-common/utils/decorators";
import Component from "@ember/component";
import Category from "discourse/models/category";
+import { computed } from "@ember/object";
export default Component.extend({
- @discourseComputed("value")
- selectedCategories: {
- get(value) {
- return Category.findByIds(value.split("|"));
- },
- set(value) {
- this.set("value", value.mapBy("id").join("|"));
- return value;
+ selectedCategories: computed("value", function() {
+ return Category.findByIds(this.value.split("|").filter(Boolean));
+ }),
+
+ actions: {
+ onChangeSelectedCategories(value) {
+ this.set("value", (value || []).mapBy("id").join("|"));
}
}
});
diff --git a/app/assets/javascripts/admin/components/site-settings/compact-list.js.es6 b/app/assets/javascripts/admin/components/site-settings/compact-list.js.es6
new file mode 100644
index 00000000000..f68e78b5722
--- /dev/null
+++ b/app/assets/javascripts/admin/components/site-settings/compact-list.js.es6
@@ -0,0 +1,43 @@
+import Component from "@ember/component";
+import { computed } from "@ember/object";
+import { makeArray } from "discourse-common/lib/helpers";
+
+export default Component.extend({
+ tokenSeparator: "|",
+
+ createdChoices: null,
+
+ settingValue: computed("value", function() {
+ return this.value
+ .toString()
+ .split(this.tokenSeparator)
+ .filter(Boolean);
+ }),
+
+ settingChoices: computed(
+ "settingValue",
+ "setting.choices.[]",
+ "createdChoices.[]",
+ function() {
+ return [
+ ...new Set([
+ ...makeArray(this.settingValue),
+ ...makeArray(this.setting.choices),
+ ...makeArray(this.createdChoices)
+ ])
+ ];
+ }
+ ),
+
+ actions: {
+ onChangeListSetting(value) {
+ this.set("value", value.join(this.tokenSeparator));
+ },
+
+ onChangeChoices(choices) {
+ this.set("createdChoices", [
+ ...new Set([...makeArray(this.createdChoices), ...makeArray(choices)])
+ ]);
+ }
+ }
+});
diff --git a/app/assets/javascripts/admin/components/site-settings/group-list.js.es6 b/app/assets/javascripts/admin/components/site-settings/group-list.js.es6
index 97736c36ca1..41dcdbcb4d5 100644
--- a/app/assets/javascripts/admin/components/site-settings/group-list.js.es6
+++ b/app/assets/javascripts/admin/components/site-settings/group-list.js.es6
@@ -1,11 +1,25 @@
-import discourseComputed from "discourse-common/utils/decorators";
+import { computed } from "@ember/object";
import Component from "@ember/component";
export default Component.extend({
- @discourseComputed()
- groupChoices() {
- return this.site.get("groups").map(g => {
+ tokenSeparator: "|",
+
+ nameProperty: "name",
+ valueProperty: "id",
+
+ groupChoices: computed("site.groups", function() {
+ return (this.site.groups || []).map(g => {
return { name: g.name, id: g.id.toString() };
});
+ }),
+
+ settingValue: computed("value", function() {
+ return (this.value || "").split(this.tokenSeparator).filter(Boolean);
+ }),
+
+ actions: {
+ onChangeGroupListSetting(value) {
+ this.set("value", value.join(this.tokenSeparator));
+ }
}
});
diff --git a/app/assets/javascripts/admin/components/value-list.js.es6 b/app/assets/javascripts/admin/components/value-list.js.es6
index 6582f20e7f3..99f1cc00d44 100644
--- a/app/assets/javascripts/admin/components/value-list.js.es6
+++ b/app/assets/javascripts/admin/components/value-list.js.es6
@@ -1,20 +1,18 @@
import discourseComputed from "discourse-common/utils/decorators";
import { makeArray } from "discourse-common/lib/helpers";
-import { empty, alias } from "@ember/object/computed";
+import { empty, reads } from "@ember/object/computed";
import Component from "@ember/component";
import { on } from "discourse-common/utils/decorators";
export default Component.extend({
classNameBindings: [":value-list"],
-
inputInvalid: empty("newValue"),
-
inputDelimiter: null,
inputType: null,
newValue: "",
collection: null,
values: null,
- noneKey: alias("addKey"),
+ noneKey: reads("addKey"),
@on("didReceiveAttrs")
_setupCollection() {
@@ -47,7 +45,7 @@ export default Component.extend({
addValue(newValue) {
if (this.inputInvalid) return;
- this.set("newValue", "");
+ this.set("newValue", null);
this._addValue(newValue);
},
@@ -62,12 +60,26 @@ export default Component.extend({
_addValue(value) {
this.collection.addObject(value);
+
+ if (this.choices) {
+ this.set("choices", this.choices.rejectBy("id", value));
+ } else {
+ this.set("choices", []);
+ }
+
this._saveValues();
},
_removeValue(value) {
- const collection = this.collection;
- collection.removeObject(value);
+ this.collection.removeObject(value);
+
+ const item = { id: value, name: value };
+ if (this.choices) {
+ this.choices.addObject(item);
+ } else {
+ this.set("choices", makeArray(item));
+ }
+
this._saveValues();
},
diff --git a/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6
index 140353e1435..411f50534aa 100644
--- a/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-badges-show.js.es6
@@ -1,5 +1,5 @@
import discourseComputed, { observes } from "discourse-common/utils/decorators";
-import { alias } from "@ember/object/computed";
+import { reads } from "@ember/object/computed";
import { inject } from "@ember/controller";
import Controller from "@ember/controller";
import { popupAjaxError } from "discourse/lib/ajax-error";
@@ -10,15 +10,37 @@ export default Controller.extend(bufferedProperty("model"), {
adminBadges: inject(),
saving: false,
savingStatus: "",
-
- badgeTypes: alias("adminBadges.badgeTypes"),
- badgeGroupings: alias("adminBadges.badgeGroupings"),
- badgeTriggers: alias("adminBadges.badgeTriggers"),
- protectedSystemFields: alias("adminBadges.protectedSystemFields"),
-
- readOnly: alias("buffered.system"),
+ badgeTypes: reads("adminBadges.badgeTypes"),
+ badgeGroupings: reads("adminBadges.badgeGroupings"),
+ badgeTriggers: reads("adminBadges.badgeTriggers"),
+ protectedSystemFields: reads("adminBadges.protectedSystemFields"),
+ readOnly: reads("buffered.system"),
showDisplayName: propertyNotEqual("name", "displayName"),
+ init() {
+ this._super(...arguments);
+
+ // this is needed because the model doesnt have default values
+ // and as we are using a bufferedProperty it's not accessible
+ // in any other way
+ Ember.run.next(() => {
+ if (!this.model.badge_type_id) {
+ this.model.set("badge_type_id", this.get("badgeTypes.firstObject.id"));
+ }
+
+ if (!this.model.badge_grouping_id) {
+ this.model.set(
+ "badge_grouping_id",
+ this.get("badgeGroupings.firstObject.id")
+ );
+ }
+
+ if (!this.model.trigger) {
+ this.model.set("trigger", this.get("badgeTriggers.firstObject.id"));
+ }
+ });
+ },
+
@discourseComputed("model.query", "buffered.query")
hasQuery(modelQuery, bufferedQuery) {
if (bufferedQuery) {
diff --git a/app/assets/javascripts/admin/controllers/admin-user-index.js.es6 b/app/assets/javascripts/admin/controllers/admin-user-index.js.es6
index 51d53509adb..0460c314c75 100644
--- a/app/assets/javascripts/admin/controllers/admin-user-index.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-user-index.js.es6
@@ -278,7 +278,7 @@ export default Controller.extend(CanCheckEmails, {
},
resetCustomGroups() {
- this.set("customGroupIdsBuffer", null);
+ this.set("customGroupIdsBuffer", this.model.customGroups.mapBy("id"));
},
savePrimaryGroup() {
diff --git a/app/assets/javascripts/admin/controllers/modals/admin-color-scheme-select-base.js.es6 b/app/assets/javascripts/admin/controllers/modals/admin-color-scheme-select-base.js.es6
index ea64338a83f..e0b7bfe7e6e 100644
--- a/app/assets/javascripts/admin/controllers/modals/admin-color-scheme-select-base.js.es6
+++ b/app/assets/javascripts/admin/controllers/modals/admin-color-scheme-select-base.js.es6
@@ -5,6 +5,17 @@ import ModalFunctionality from "discourse/mixins/modal-functionality";
export default Controller.extend(ModalFunctionality, {
adminCustomizeColors: inject(),
+ selectedBaseThemeId: null,
+
+ init() {
+ this._super(...arguments);
+
+ const defaultScheme = this.get(
+ "adminCustomizeColors.baseColorSchemes.0.base_scheme_id"
+ );
+ this.set("selectedBaseThemeId", defaultScheme);
+ },
+
actions: {
selectBase() {
this.adminCustomizeColors.send(
diff --git a/app/assets/javascripts/admin/routes/admin-user-index.js.es6 b/app/assets/javascripts/admin/routes/admin-user-index.js.es6
index 51af9f2d2e8..a0aeadd590d 100644
--- a/app/assets/javascripts/admin/routes/admin-user-index.js.es6
+++ b/app/assets/javascripts/admin/routes/admin-user-index.js.es6
@@ -19,7 +19,7 @@ export default DiscourseRoute.extend({
controller.setProperties({
originalPrimaryGroupId: model.primary_group_id,
availableGroups: this._availableGroups,
- customGroupIdsBuffer: null,
+ customGroupIdsBuffer: model.customGroups.mapBy("id"),
model
});
}
diff --git a/app/assets/javascripts/admin/templates/api-keys-new.hbs b/app/assets/javascripts/admin/templates/api-keys-new.hbs
index 4ddc37befd4..aea83704d38 100644
--- a/app/assets/javascripts/admin/templates/api-keys-new.hbs
+++ b/app/assets/javascripts/admin/templates/api-keys-new.hbs
@@ -20,7 +20,7 @@
{{/admin-form-row}}
{{#admin-form-row label="admin.api.user_mode"}}
- {{combo-box content=userModes value=userMode onSelect=(action "changeUserMode")}}
+ {{combo-box content=userModes value=userMode onChange=(action "changeUserMode")}}
{{/admin-form-row}}
{{#if showUserSelector}}
@@ -28,11 +28,11 @@
{{user-selector single="true"
usernames=model.username
placeholderKey="admin.api.user_placeholder"
- }}
+ }}
{{/admin-form-row}}
{{/if}}
{{#admin-form-row}}
{{d-button icon="check" label="admin.api.save" action=(action "save") class="btn-primary"}}
{{/admin-form-row}}
{{/if}}
-
\ No newline at end of file
+
diff --git a/app/assets/javascripts/admin/templates/badges-show.hbs b/app/assets/javascripts/admin/templates/badges-show.hbs
index 7a50b1084bf..72147c85408 100644
--- a/app/assets/javascripts/admin/templates/badges-show.hbs
+++ b/app/assets/javascripts/admin/templates/badges-show.hbs
@@ -23,30 +23,35 @@
- {{combo-box name="badge_type_id"
- value=buffered.badge_type_id
- content=badgeTypes
- allowInitialValueMutation=true
- isDisabled=readOnly}}
+ {{combo-box
+ name="badge_type_id"
+ value=buffered.badge_type_id
+ content=badgeTypes
+ onChange=(action (mut buffered.badge_type_id))
+ isDisabled=readOnly
+ }}
- {{combo-box name="badge_grouping_id"
+ {{combo-box
+ name="badge_grouping_id"
value=buffered.badge_grouping_id
content=badgeGroupings
class="badge-selector"
- nameProperty="name"}}
+ nameProperty="name"
+ onChange=(action (mut buffered.badge_grouping_id))
+ }}
{{d-button
class="btn-default"
action=(route-action "editGroupings")
icon="pencil-alt"}}
+ }}
-
{{#if buffered.system}}
@@ -95,12 +100,13 @@
- {{combo-box name="trigger"
- value=buffered.trigger
- content=badgeTriggers
- optionValuePath="content.id"
- optionLabelPath="content.name"
- disabled=readOnly}}
+ {{combo-box
+ name="trigger"
+ value=buffered.trigger
+ content=badgeTriggers
+ onChange=(action (mut buffered.trigger))
+ disabled=readOnly
+ }}
{{/if}}
{{/if}}
diff --git a/app/assets/javascripts/admin/templates/components/admin-report.hbs b/app/assets/javascripts/admin/templates/components/admin-report.hbs
index bdc3b5b12a7..f8a36fa7d3c 100644
--- a/app/assets/javascripts/admin/templates/components/admin-report.hbs
+++ b/app/assets/javascripts/admin/templates/components/admin-report.hbs
@@ -130,7 +130,10 @@
- {{date-input date=startDate onChange=(action "onChangeStartDate")}}
+ {{date-input
+ date=startDate
+ onChange=(action "onChangeStartDate")
+ }}
@@ -140,7 +143,10 @@
- {{date-input date=endDate onChange=(action "onChangeEndDate")}}
+ {{date-input
+ date=endDate
+ onChange=(action "onChangeEndDate")
+ }}
{{/if}}
diff --git a/app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs b/app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs
index a23d21f6e97..68b1810a8ce 100644
--- a/app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs
+++ b/app/assets/javascripts/admin/templates/components/admin-user-field-item.hbs
@@ -1,6 +1,10 @@
{{#if editing}}
{{#admin-form-row label="admin.user_fields.type"}}
- {{combo-box content=fieldTypes value=buffered.field_type}}
+ {{combo-box
+ content=fieldTypes
+ value=buffered.field_type
+ onChange=(action (mut buffered.field_type))
+ }}
{{/admin-form-row}}
{{#admin-form-row label="admin.user_fields.name"}}
diff --git a/app/assets/javascripts/admin/templates/components/embeddable-host.hbs b/app/assets/javascripts/admin/templates/components/embeddable-host.hbs
index 559544abcef..b7833d621d3 100644
--- a/app/assets/javascripts/admin/templates/components/embeddable-host.hbs
+++ b/app/assets/javascripts/admin/templates/components/embeddable-host.hbs
@@ -13,7 +13,11 @@
{{i18n "admin.embedding.category"}}
- {{category-chooser value=categoryId class="small"}}
+ {{category-chooser
+ value=categoryId
+ class="small"
+ onChange=(action (mut categoryId))
+ }}
|
{{d-button icon="check" action=(action "save") class="btn-primary" disabled=cantSave}}
diff --git a/app/assets/javascripts/admin/templates/components/penalty-post-action.hbs b/app/assets/javascripts/admin/templates/components/penalty-post-action.hbs
index 1c8ffe56d8e..1a672329cd2 100644
--- a/app/assets/javascripts/admin/templates/components/penalty-post-action.hbs
+++ b/app/assets/javascripts/admin/templates/components/penalty-post-action.hbs
@@ -4,7 +4,11 @@
{{{i18n 'admin.user.penalty_post_actions'}}}
- {{combo-box value=postAction content=penaltyActions onSelect=(action "penaltyChanged")}}
+ {{combo-box
+ value=postAction
+ content=penaltyActions
+ onChange=(action "penaltyChanged")
+ }}
{{#if editing}}
diff --git a/app/assets/javascripts/admin/templates/components/permalink-form.hbs b/app/assets/javascripts/admin/templates/components/permalink-form.hbs
index 8efdbbf581a..1f5d1c06f21 100644
--- a/app/assets/javascripts/admin/templates/components/permalink-form.hbs
+++ b/app/assets/javascripts/admin/templates/components/permalink-form.hbs
@@ -8,7 +8,11 @@
autocorrect="off"
autocapitalize="off"}}
-{{combo-box content=permalinkTypes value=permalinkType}}
+{{combo-box
+ content=permalinkTypes
+ value=permalinkType
+ onChange=(action (mut permalinkType))
+}}
{{text-field
value=permalink_type_value
diff --git a/app/assets/javascripts/admin/templates/components/report-filters/category.hbs b/app/assets/javascripts/admin/templates/components/report-filters/category.hbs
index 94aa60f7d05..62de5e0bed0 100644
--- a/app/assets/javascripts/admin/templates/components/report-filters/category.hbs
+++ b/app/assets/javascripts/admin/templates/components/report-filters/category.hbs
@@ -1,7 +1,5 @@
{{search-advanced-category-chooser
filterable=true
value=category
- castInteger=true
- onSelectNone=(action "onChange")
- onDeselect=(action "onDeselect")
- onSelect=(action "onChange")}}
+ onChange=(action (mut category))
+}}
diff --git a/app/assets/javascripts/admin/templates/components/report-filters/file-extension.hbs b/app/assets/javascripts/admin/templates/components/report-filters/file-extension.hbs
index 871179d63d6..88d71d0747e 100644
--- a/app/assets/javascripts/admin/templates/components/report-filters/file-extension.hbs
+++ b/app/assets/javascripts/admin/templates/components/report-filters/file-extension.hbs
@@ -4,5 +4,5 @@
allowAny=filter.allow_any
value=filter.default
none="admin.dashboard.report_filter_any"
- onSelectNone=(action "onChange")
- onSelect=(action "onChange")}}
+ onChange=(action "onChange")
+}}
diff --git a/app/assets/javascripts/admin/templates/components/report-filters/group.hbs b/app/assets/javascripts/admin/templates/components/report-filters/group.hbs
index 0209c1cb6e8..9e17bda2ac3 100644
--- a/app/assets/javascripts/admin/templates/components/report-filters/group.hbs
+++ b/app/assets/javascripts/admin/templates/components/report-filters/group.hbs
@@ -1,10 +1,9 @@
{{combo-box
- castInteger=true
filterable=true
- valueAttribute="value"
+ valueProperty="value"
content=groupOptions
value=groupId
allowAny=filter.allow_any
none="admin.dashboard.reports.groups"
- onSelectNone=(action "onChange")
- onSelect=(action "onChange")}}
+ onChange=(action "onChange")
+}}
diff --git a/app/assets/javascripts/admin/templates/components/screened-ip-address-form.hbs b/app/assets/javascripts/admin/templates/components/screened-ip-address-form.hbs
index 6bc99fdbd11..2be732079ea 100644
--- a/app/assets/javascripts/admin/templates/components/screened-ip-address-form.hbs
+++ b/app/assets/javascripts/admin/templates/components/screened-ip-address-form.hbs
@@ -1,4 +1,10 @@
{{i18n 'admin.logs.screened_ips.form.label'}}
{{text-field value=ip_address disabled=formSubmitted class="ip-address-input" placeholderKey="admin.logs.screened_ips.form.ip_address" autocorrect="off" autocapitalize="off"}}
-{{combo-box content=actionNames value=actionName}}
+
+{{combo-box
+ content=actionNames
+ value=actionName
+ onChange=(action (mut actionName))
+}}
+
{{d-button class="btn-default" action=(action "submit") disabled=formSubmitted label="admin.logs.screened_ips.form.add"}}
diff --git a/app/assets/javascripts/admin/templates/components/site-settings/category-list.hbs b/app/assets/javascripts/admin/templates/components/site-settings/category-list.hbs
index 0aadec18d81..14d7210604c 100644
--- a/app/assets/javascripts/admin/templates/components/site-settings/category-list.hbs
+++ b/app/assets/javascripts/admin/templates/components/site-settings/category-list.hbs
@@ -1,3 +1,7 @@
-{{category-selector categories=selectedCategories}}
+{{category-selector
+ categories=selectedCategories
+ onChange=(action "onChangeSelectedCategories")
+}}
+
{{{unbound setting.description}}}
{{setting-validation-message message=validationMessage}}
diff --git a/app/assets/javascripts/admin/templates/components/site-settings/category.hbs b/app/assets/javascripts/admin/templates/components/site-settings/category.hbs
index e3ab41137c1..d6b6bee5658 100644
--- a/app/assets/javascripts/admin/templates/components/site-settings/category.hbs
+++ b/app/assets/javascripts/admin/templates/components/site-settings/category.hbs
@@ -1,3 +1,7 @@
-{{category-chooser value=value allowUncategorized="true"}}
+{{category-chooser
+ value=value
+ allowUncategorized=true
+ onChange=(action (mut value))
+}}
{{setting-validation-message message=validationMessage}}
{{{unbound setting.description}}}
diff --git a/app/assets/javascripts/admin/templates/components/site-settings/compact-list.hbs b/app/assets/javascripts/admin/templates/components/site-settings/compact-list.hbs
index 551ca3d45d3..86fce97f15e 100644
--- a/app/assets/javascripts/admin/templates/components/site-settings/compact-list.hbs
+++ b/app/assets/javascripts/admin/templates/components/site-settings/compact-list.hbs
@@ -1,3 +1,11 @@
-{{list-setting settingValue=value choices=setting.choices settingName=setting.setting allowAny=allowAny}}
+{{list-setting
+ value=settingValue
+ settingName=setting.setting
+ allowAny=allowAny
+ choices=settingChoices
+ onChange=(action "onChangeListSetting")
+ onChangeChoices=(action "onChangeChoices")
+}}
+
{{setting-validation-message message=validationMessage}}
{{{unbound setting.description}}}
diff --git a/app/assets/javascripts/admin/templates/components/site-settings/enum.hbs b/app/assets/javascripts/admin/templates/components/site-settings/enum.hbs
index 9b3da3178e3..2612679d723 100644
--- a/app/assets/javascripts/admin/templates/components/site-settings/enum.hbs
+++ b/app/assets/javascripts/admin/templates/components/site-settings/enum.hbs
@@ -1,4 +1,15 @@
-{{combo-box castInteger=true valueAttribute="value" content=setting.validValues value=value none=setting.allowsNone}}
+{{combo-box
+ valueProperty="value"
+ content=setting.validValues
+ value=value
+ onChange=(action (mut value))
+ allowAny=setting.allowsNone
+}}
+
{{preview}}
+
{{setting-validation-message message=validationMessage}}
-{{{unbound setting.description}}}
+
+
+ {{{unbound setting.description}}}
+
diff --git a/app/assets/javascripts/admin/templates/components/site-settings/group-list.hbs b/app/assets/javascripts/admin/templates/components/site-settings/group-list.hbs
index 005f14398ee..768311c3f96 100644
--- a/app/assets/javascripts/admin/templates/components/site-settings/group-list.hbs
+++ b/app/assets/javascripts/admin/templates/components/site-settings/group-list.hbs
@@ -1,3 +1,10 @@
-{{list-setting settingValue=value choices=groupChoices settingName='name'}}
+{{list-setting
+ value=settingValue
+ choices=groupChoices
+ settingName="name"
+ nameProperty=nameProperty
+ valueProperty=valueProperty
+ onChange=(action "onChangeGroupListSetting")
+}}
{{setting-validation-message message=validationMessage}}
{{{unbound setting.description}}}
diff --git a/app/assets/javascripts/admin/templates/components/value-list.hbs b/app/assets/javascripts/admin/templates/components/value-list.hbs
index 372de2ac1d1..a5ade53ee08 100644
--- a/app/assets/javascripts/admin/templates/components/value-list.hbs
+++ b/app/assets/javascripts/admin/templates/components/value-list.hbs
@@ -2,12 +2,19 @@
{{#each collection as |value index|}}
- {{d-button action=(action "removeValue")
- actionParam=value
- icon="times"
- class="btn-default remove-value-btn btn-small"}}
+ {{d-button
+ action=(action "removeValue")
+ actionParam=value
+ icon="times"
+ class="remove-value-btn btn-small"
+ }}
- {{input title=value value=value class="value-input" focus-out=(action "changeValue" index)}}
+ {{input
+ title=value
+ value=value
+ class="value-input"
+ focus-out=(action "changeValue" index)
+ }}
{{/each}}
@@ -15,7 +22,10 @@
{{combo-box
allowAny=true
- allowContentReplacement=true
none=noneKey
+ valueProperty=null
+ nameProperty=null
+ value=newValue
content=filteredChoices
- onSelect=(action "selectChoice")}}
+ onChange=(action "selectChoice")
+}}
diff --git a/app/assets/javascripts/admin/templates/customize-email-templates.hbs b/app/assets/javascripts/admin/templates/customize-email-templates.hbs
index d89624e477f..55434c9e463 100644
--- a/app/assets/javascripts/admin/templates/customize-email-templates.hbs
+++ b/app/assets/javascripts/admin/templates/customize-email-templates.hbs
@@ -1,8 +1,8 @@
{{combo-box
content=sortedTemplates
- valueAttribute="id"
+ valueProperty="id"
nameProperty="title"
- onSelect=(action "selectTemplate")
+ onChange=(action "selectTemplate")
}}
{{outlet}}
diff --git a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs
index bba9a724ca0..d48127916ac 100644
--- a/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs
+++ b/app/assets/javascripts/admin/templates/logs/staff-action-logs.hbs
@@ -30,7 +30,13 @@
{{/if}}
{{else}}
- {{i18n "admin.logs.staff_actions.filter"}} {{combo-box content=userHistoryActions value=filterActionId none="admin.logs.staff_actions.all" onSelect=(action "filterActionIdChanged")}}
+ {{i18n "admin.logs.staff_actions.filter"}}
+ {{combo-box
+ content=userHistoryActions
+ value=filterActionId
+ none="admin.logs.staff_actions.all"
+ onChange=(action "filterActionIdChanged")
+ }}
{{/if}}
{{d-button class="btn-default" action=(action "exportStaffActionLogs") label="admin.export_csv.button_text" icon="download"}}
diff --git a/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs b/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs
index e1978b918ab..15a39314cd3 100644
--- a/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs
+++ b/app/assets/javascripts/admin/templates/modal/admin-color-scheme-select-base.hbs
@@ -1,16 +1,20 @@
{{#d-modal-body title="admin.customize.colors.select_base.title"}}
{{i18n "admin.customize.colors.select_base.description"}}
- {{combo-box content=model
- value=selectedBaseThemeId
- allowInitialValueMutation=true
- valueAttribute="base_scheme_id"}}
+ {{combo-box
+ content=model
+ value=selectedBaseThemeId
+ onChange=(action (mut selectedBaseThemeId))
+ valueProperty="base_scheme_id"
+ }}
{{/d-modal-body}}
+
diff --git a/app/assets/javascripts/admin/templates/modal/admin-install-theme.hbs b/app/assets/javascripts/admin/templates/modal/admin-install-theme.hbs
index a41bfa93a94..7307abb411a 100644
--- a/app/assets/javascripts/admin/templates/modal/admin-install-theme.hbs
+++ b/app/assets/javascripts/admin/templates/modal/admin-install-theme.hbs
@@ -89,7 +89,12 @@
{{input value=name placeholder=placeholder}}
{{I18n "admin.customize.theme.create_type"}}
- {{combo-box valueAttribute="value" content=createTypes value=selectedType}}
+ {{combo-box
+ valueProperty="value"
+ content=createTypes
+ value=selectedType
+ onChange=(action (mut selectedType))
+ }}
{{/if}}
diff --git a/app/assets/javascripts/admin/templates/modal/admin-silence-user.hbs b/app/assets/javascripts/admin/templates/modal/admin-silence-user.hbs
index 7f830916cd4..0b123cdc6a3 100644
--- a/app/assets/javascripts/admin/templates/modal/admin-silence-user.hbs
+++ b/app/assets/javascripts/admin/templates/modal/admin-silence-user.hbs
@@ -8,7 +8,9 @@
label="admin.user.silence_duration"
includeFarFuture=true
clearable=false
- input=silenceUntil}}
+ input=silenceUntil
+ onChangeInput=(action (mut silenceUntil))
+ }}
diff --git a/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs b/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs
index cc4a075fe8f..a10ecd9c952 100644
--- a/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs
+++ b/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs
@@ -9,7 +9,9 @@
label="admin.user.suspend_duration"
includeFarFuture=true
clearable=false
- input=suspendUntil}}
+ input=suspendUntil
+ onChangeInput=(action (mut suspendUntil))
+ }}
{{suspension-details reason=reason message=message}}
diff --git a/app/assets/javascripts/admin/templates/reports-show.hbs b/app/assets/javascripts/admin/templates/reports-show.hbs
index dac1aa0bbe0..6c6a8fb279e 100644
--- a/app/assets/javascripts/admin/templates/reports-show.hbs
+++ b/app/assets/javascripts/admin/templates/reports-show.hbs
@@ -4,4 +4,5 @@
filters=model
reportOptions=reportOptions
showFilteringUI=true
- onRefresh=(route-action "onParamsChange")}}
+ onRefresh=(route-action "onParamsChange")
+}}
diff --git a/app/assets/javascripts/admin/templates/search-logs-index.hbs b/app/assets/javascripts/admin/templates/search-logs-index.hbs
index 805c4fe4cfc..b56a1400fbb 100644
--- a/app/assets/javascripts/admin/templates/search-logs-index.hbs
+++ b/app/assets/javascripts/admin/templates/search-logs-index.hbs
@@ -1,6 +1,11 @@
- {{period-chooser period=period}}
- {{combo-box content=searchTypeOptions value=searchType class='search-logs-filter'}}
+ {{period-chooser period=period onChange=(action (mut period))}}
+ {{combo-box
+ content=searchTypeOptions
+ value=searchType
+ class="search-logs-filter"
+ onChange=(action (mut searchType))
+ }}
{{#conditional-loading-spinner condition=loading}}
diff --git a/app/assets/javascripts/admin/templates/search-logs-term.hbs b/app/assets/javascripts/admin/templates/search-logs-term.hbs
index e31a80d590e..91d5d31361b 100644
--- a/app/assets/javascripts/admin/templates/search-logs-term.hbs
+++ b/app/assets/javascripts/admin/templates/search-logs-term.hbs
@@ -1,6 +1,11 @@
- {{period-chooser period=period}}
- {{combo-box content=searchTypeOptions value=searchType class='search-logs-filter'}}
+ {{period-chooser period=period onChange=(action (mut period))}}
+ {{combo-box
+ content=searchTypeOptions
+ value=searchType
+ class="search-logs-filter"
+ onChange=(action (mut searchType))
+ }}
diff --git a/app/assets/javascripts/admin/templates/user-badges.hbs b/app/assets/javascripts/admin/templates/user-badges.hbs
index 9f81cd2f741..6b6716b4847 100644
--- a/app/assets/javascripts/admin/templates/user-badges.hbs
+++ b/app/assets/javascripts/admin/templates/user-badges.hbs
@@ -15,8 +15,13 @@
{{else}}
|