diff --git a/assets/javascripts/discourse/components/wizard-custom-input-pair.js.es6 b/assets/javascripts/discourse/components/wizard-custom-input-pair.js.es6
index 772a3c49..a4666bf6 100644
--- a/assets/javascripts/discourse/components/wizard-custom-input-pair.js.es6
+++ b/assets/javascripts/discourse/components/wizard-custom-input-pair.js.es6
@@ -4,6 +4,6 @@ import { gt } from "@ember/object/computed";
export default Ember.Component.extend({
classNames: 'pair',
connectorNone: 'admin.wizard.connector.none',
- connectors: connectors.map(c => ({ id: c, name: I18n.t(`admin.wizard.connector.${c}`) })),
+ connectors: connectors,
showRemove: gt('pair.index', 0)
})
\ No newline at end of file
diff --git a/assets/javascripts/discourse/components/wizard-custom-step.js.es6 b/assets/javascripts/discourse/components/wizard-custom-step.js.es6
index 27515f6e..c8945b80 100644
--- a/assets/javascripts/discourse/components/wizard-custom-step.js.es6
+++ b/assets/javascripts/discourse/components/wizard-custom-step.js.es6
@@ -1,11 +1,16 @@
-import { observes, default as computed } from 'discourse-common/utils/decorators';
+import {
+ observes,
+ on,
+ default as computed
+} from 'discourse-common/utils/decorators';
export default Ember.Component.extend({
classNames: 'wizard-custom-step',
currentField: null,
currentAction: null,
disableId: Ember.computed.not('step.isNew'),
-
+
+ @on('didInsertElement')
@observes('step')
resetCurrentObjects() {
const fields = this.get('step.fields');
diff --git a/assets/javascripts/discourse/custom-wizard-admin-route-map.js.es6 b/assets/javascripts/discourse/custom-wizard-admin-route-map.js.es6
index 001569f2..205e2454 100644
--- a/assets/javascripts/discourse/custom-wizard-admin-route-map.js.es6
+++ b/assets/javascripts/discourse/custom-wizard-admin-route-map.js.es6
@@ -13,7 +13,6 @@ export default {
});
this.route('adminWizardsTransfer', { path: '/transfer', resetNamespace: true });
-
});
}
};
diff --git a/assets/javascripts/discourse/lib/custom-wizard.js.es6 b/assets/javascripts/discourse/lib/custom-wizard.js.es6
index a56bc9b4..2adc9867 100644
--- a/assets/javascripts/discourse/lib/custom-wizard.js.es6
+++ b/assets/javascripts/discourse/lib/custom-wizard.js.es6
@@ -23,7 +23,22 @@ const profileFields = [
];
const connectors = [
- 'equal'
+ {
+ id: 'eq',
+ name: '='
+ },{
+ id: 'gt',
+ name: '>'
+ },{
+ id: 'lt',
+ name: '<'
+ },{
+ id: 'gte',
+ name: '>='
+ },{
+ id: 'lte',
+ name: '<='
+ }
]
const actionTypes = [
@@ -58,7 +73,7 @@ function newPair(options = {}, index) {
key_type: 'text',
value: '',
value_type: 'text',
- connector: 'equal'
+ connector: 'eq'
}
return Ember.Object.create(params);
diff --git a/assets/javascripts/discourse/templates/admin-wizard.hbs b/assets/javascripts/discourse/templates/admin-wizard.hbs
index 2d1f2d0d..fe5d0965 100644
--- a/assets/javascripts/discourse/templates/admin-wizard.hbs
+++ b/assets/javascripts/discourse/templates/admin-wizard.hbs
@@ -78,7 +78,7 @@
{{input type='checkbox' checked=model.after_time}}
{{i18n 'admin.wizard.after_time_label'}}
- {{d-button action='setNextSessionScheduled' translatedLabel=nextSessionScheduledLabel icon='calendar-o'}}
+ {{d-button action='setNextSessionScheduled' translatedLabel=nextSessionScheduledLabel icon='far-calendar'}}
@@ -111,7 +111,9 @@
content=model.themes
valueProperty='id'
value=model.theme_id
- none='admin.wizard.no_theme'}}
+ options=(hash
+ none='admin.wizard.no_theme'
+ )}}
diff --git a/assets/javascripts/discourse/templates/admin-wizards-api.hbs b/assets/javascripts/discourse/templates/admin-wizards-api.hbs
index 06980f42..cf4ddf9c 100644
--- a/assets/javascripts/discourse/templates/admin-wizards-api.hbs
+++ b/assets/javascripts/discourse/templates/admin-wizards-api.hbs
@@ -92,7 +92,9 @@
{{combo-box
value=api.authType
content=authorizationTypes
- none='admin.wizard.api.auth.type_none'}}
+ options=(hash
+ none='admin.wizard.api.auth.type_none'
+ )}}
@@ -246,15 +248,21 @@
{{combo-box
content=endpointMethods
value=endpoint.method
- none="admin.wizard.api.endpoint.method"}}
+ options=(hash
+ none="admin.wizard.api.endpoint.method"
+ )}}
{{combo-box
content=contentTypes
value=endpoint.content_type
- none="admin.wizard.api.endpoint.content_type"}}
+ options=(hash
+ none="admin.wizard.api.endpoint.content_type"
+ )}}
{{multi-select
content=successCodes
values=endpoint.success_codes
- none="admin.wizard.api.endpoint.success_codes"}}
+ options=(hash
+ none="admin.wizard.api.endpoint.success_codes"
+ )}}
diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs
index 4962b480..87bfcf6b 100644
--- a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs
+++ b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs
@@ -15,7 +15,9 @@
{{combo-box
value=action.type
content=types
- none="admin.wizard.field.type"}}
+ options=(hash
+ none="admin.wizard.field.type"
+ )}}
@@ -30,7 +32,9 @@
content=wizardFields
nameProperty="label"
isDisabled=action.custom_title_enabled
- none='admin.wizard.select_field'}}
+ options=(hash
+ none='admin.wizard.select_field'
+ )}}
{{input type='checkbox' checked=action.custom_title_enabled}}
{{i18n 'admin.wizard.action.custom_title'}}
@@ -51,7 +55,9 @@
content=wizardFields
nameProperty='label'
isDisabled=action.post_builder
- none='admin.wizard.select_field'}}
+ options=(hash
+ none='admin.wizard.select_field'
+ )}}
{{input type='checkbox' checked=action.post_builder}}
{{i18n 'admin.wizard.action.post_builder.checkbox'}}
@@ -100,7 +106,9 @@
value=action.category_id
content=categoryFields
nameProperty="label"
- none='admin.wizard.select_field'}}
+ options=(hash
+ none='admin.wizard.select_field'
+ )}}
{{/if}}
@@ -137,7 +145,9 @@
value=action.custom_tag_field
content=tagFields
nameProperty="label"
- none='admin.wizard.select_field'}}
+ options=(hash
+ none='admin.wizard.select_field'
+ )}}
{{/if}}
@@ -181,7 +191,9 @@
value=action.required
content=wizardFields
nameProperty='label'
- none='admin.wizard.select_field'}}
+ options=(hash
+ none='admin.wizard.select_field'
+ )}}
@@ -231,7 +243,9 @@
value=action.api
content=availableApis
isDisabled=action.custom_title_enabled
- none='admin.wizard.action.send_to_api.select_an_api'}}
+ options=(hash
+ none='admin.wizard.action.send_to_api.select_an_api'
+ )}}
@@ -244,7 +258,9 @@
value=action.api_endpoint
content=availableEndpoints
isDisabled=apiEmpty
- none='admin.wizard.action.send_to_api.select_an_endpoint'}}
+ options=(hash
+ none='admin.wizard.action.send_to_api.select_an_endpoint'
+ )}}
@@ -273,7 +289,9 @@
content=wizardFields
isDisabled=action.custom
nameProperty="label"
- none='admin.wizard.select_field'}}
+ options=(hash
+ none='admin.wizard.select_field'
+ )}}
{{input type='checkbox' checked=action.custom_group_enabled}}
diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs
index a6af6d48..9de83157 100644
--- a/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs
+++ b/assets/javascripts/discourse/templates/components/wizard-custom-field.hbs
@@ -51,7 +51,9 @@
{{combo-box
value=field.type
content=types
- none="admin.wizard.field.type"}}
+ options=(hash
+ none="admin.wizard.field.type"
+ )}}
@@ -85,7 +87,9 @@
{{combo-box
value=field.choices_type
content=choicesTypes
- none="admin.wizard.field.choices_type"}}
+ options=(hash
+ none="admin.wizard.field.choices_type"
+ )}}
{{#if choicesTranslation}}