diff --git a/assets/javascripts/discourse/components/custom-wizard-composer-editor.js.es6 b/assets/javascripts/discourse/components/custom-wizard-composer-editor.js.es6 index 5335da81..5560a126 100644 --- a/assets/javascripts/discourse/components/custom-wizard-composer-editor.js.es6 +++ b/assets/javascripts/discourse/components/custom-wizard-composer-editor.js.es6 @@ -14,7 +14,8 @@ import { uploadIcon } from "discourse/lib/uploads"; import { dasherize } from "@ember/string"; import showModal from "discourse/lib/show-modal"; -const IMAGE_MARKDOWN_REGEX = /!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g; +const IMAGE_MARKDOWN_REGEX = + /!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g; export default ComposerEditor.extend({ classNameBindings: ["fieldClass"], @@ -116,9 +117,8 @@ export default ComposerEditor.extend({ event.target.closest(".button-wrapper").dataset.imageIndex, 10 ); - const matchingPlaceholder = this.get("composer.reply").match( - IMAGE_MARKDOWN_REGEX - ); + const matchingPlaceholder = + this.get("composer.reply").match(IMAGE_MARKDOWN_REGEX); this.session.set("wizardEventFieldId", this.field.id); this.appEvents.trigger( diff --git a/assets/javascripts/discourse/connectors/admin-menu/wizards-nav-button.hbs b/assets/javascripts/discourse/connectors/admin-menu/wizards-nav-button.hbs index f893d4ac..0aef2dcb 100644 --- a/assets/javascripts/discourse/connectors/admin-menu/wizards-nav-button.hbs +++ b/assets/javascripts/discourse/connectors/admin-menu/wizards-nav-button.hbs @@ -4,4 +4,4 @@ {{#if wizardErrorNotice}} {{d-icon "exclaimation-circle"}} {{/if}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/connectors/category-custom-settings/custom-wizard-category-settings.hbs b/assets/javascripts/discourse/connectors/category-custom-settings/custom-wizard-category-settings.hbs index 5ce96f2f..2c6a6975 100644 --- a/assets/javascripts/discourse/connectors/category-custom-settings/custom-wizard-category-settings.hbs +++ b/assets/javascripts/discourse/connectors/category-custom-settings/custom-wizard-category-settings.hbs @@ -9,8 +9,7 @@ value=wizardListVal content=wizardList onChange=(action "changeWizard") - options=(hash - none="admin.wizard.select" - )}} + options=(hash none="admin.wizard.select") + }} - + \ No newline at end of file diff --git a/assets/javascripts/discourse/connectors/top-notices/prompt-completion.hbs b/assets/javascripts/discourse/connectors/top-notices/prompt-completion.hbs index 70c0b7c4..10057345 100644 --- a/assets/javascripts/discourse/connectors/top-notices/prompt-completion.hbs +++ b/assets/javascripts/discourse/connectors/top-notices/prompt-completion.hbs @@ -1,7 +1,10 @@ {{#each site.complete_custom_wizard as |wizard|}}
- {{i18n "wizard.complete_custom" name=wizard.name}} + {{i18n + "wizard.complete_custom" + name=wizard.name + }}
-{{/each}} +{{/each}} \ No newline at end of file diff --git a/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 index 11bf94d7..c08e820c 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 @@ -21,29 +21,8 @@ export default Controller.extend({ "application/x-www-form-urlencoded", ]), successCodes: selectKitContent([ - 100, - 101, - 102, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 226, - 300, - 301, - 302, - 303, - 303, - 304, - 305, - 306, - 307, - 308, + 100, 101, 102, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, + 302, 303, 303, 304, 305, 306, 307, 308, ]), @discourseComputed( diff --git a/assets/javascripts/discourse/controllers/next-session-scheduled.js.es6 b/assets/javascripts/discourse/controllers/next-session-scheduled.js.es6 index 4ea22d38..b8f51d1f 100644 --- a/assets/javascripts/discourse/controllers/next-session-scheduled.js.es6 +++ b/assets/javascripts/discourse/controllers/next-session-scheduled.js.es6 @@ -5,7 +5,10 @@ export default Controller.extend({ title: "admin.wizard.after_time_modal.title", setup() { - this.set("bufferedDateTime", moment(this.model.dateTime)); + this.set( + "bufferedDateTime", + this.model.dateTime ? moment(this.model.dateTime) : moment(Date.now()) + ); }, @discourseComputed("bufferedDateTime") diff --git a/assets/javascripts/discourse/initializers/custom-wizard-redirect.js.es6 b/assets/javascripts/discourse/initializers/custom-wizard-redirect.js.es6 index 5667bdf8..70676bb0 100644 --- a/assets/javascripts/discourse/initializers/custom-wizard-redirect.js.es6 +++ b/assets/javascripts/discourse/initializers/custom-wizard-redirect.js.es6 @@ -1,14 +1,16 @@ -import ApplicationRoute from "discourse/routes/application"; +import DiscourseURL from "discourse/lib/url"; +import { withPluginApi } from "discourse/lib/plugin-api"; +import { dasherize } from "@ember/string"; export default { name: "custom-wizard-redirect", after: "message-bus", - initialize: function (container) { + initialize(container) { const messageBus = container.lookup("service:message-bus"); const siteSettings = container.lookup("service:site-settings"); - if (!siteSettings.custom_wizard_enabled || !messageBus) { + if (!siteSettings.custom_wizard_enabled) { return; } @@ -17,28 +19,26 @@ export default { window.location.href = wizardUrl; }); - ApplicationRoute.reopen({ - actions: { - willTransition(transition) { - const redirectToWizard = this.get("currentUser.redirect_to_wizard"); - const excludedPaths = this.siteSettings.wizard_redirect_exclude_paths + withPluginApi("0.8.36", (api) => { + api.onAppEvent("page:changed", (data) => { + const currentUser = api.getCurrentUser(); + + if (currentUser) { + const redirectToWizard = currentUser.redirect_to_wizard; + const excludedPaths = siteSettings.wizard_redirect_exclude_paths .split("|") .concat(["loading"]); - if ( redirectToWizard && - (!transition.intent.name || - !excludedPaths.find((p) => { - return transition.intent.name.indexOf(p) > -1; - })) + data.currentRouteName !== "customWizardStep" && + !excludedPaths.find((p) => { + return data.currentRouteName.indexOf(p) > -1; + }) ) { - transition.abort(); - window.location = "/w/" + redirectToWizard.dasherize(); + DiscourseURL.routeTo(`/w/${dasherize(redirectToWizard)}`); } - - return this._super(transition); - }, - }, + } + }); }); }, }; diff --git a/assets/javascripts/discourse/routes/custom-wizard.js.es6 b/assets/javascripts/discourse/routes/custom-wizard.js.es6 index d03714a2..1a214a2d 100644 --- a/assets/javascripts/discourse/routes/custom-wizard.js.es6 +++ b/assets/javascripts/discourse/routes/custom-wizard.js.es6 @@ -1,6 +1,7 @@ import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard"; import I18n from "I18n"; import DiscourseRoute from "discourse/routes/discourse"; +import bootbox from "bootbox"; export default DiscourseRoute.extend({ titleToken() { diff --git a/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs index 89387446..5270aa28 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs @@ -8,7 +8,12 @@ {{/if}} {{/if}} - {{d-button label="admin.wizard.api.save" action=(action "save") class="btn-primary" disabled=saveDisabled}} + {{d-button + label="admin.wizard.api.save" + action=(action "save") + class="btn-primary" + disabled=saveDisabled + }} {{#if showRemove}} {{d-button action=(action "remove") label="admin.wizard.api.remove"}} @@ -62,10 +67,12 @@ {{authErrorMessage}} {{/if}} {{/if}} - {{d-button label="admin.wizard.api.auth.btn" - action=(action "authorize") - disabled=authDisabled - class="btn-primary"}} + {{d-button + label="admin.wizard.api.auth.btn" + action=(action "authorize") + disabled=authDisabled + class="btn-primary" + }} {{/if}} @@ -99,9 +106,8 @@ value=api.authType content=authorizationTypes onChange=(action (mut api.authType)) - options=(hash - none="admin.wizard.api.auth.type_none" - )}} + options=(hash none="admin.wizard.api.auth.type_none") + }} @@ -110,9 +116,7 @@
- +
{{/if}} @@ -120,27 +124,21 @@
- +
- +
- +
@@ -157,10 +155,18 @@ @value={{this.param.value}} placeholder={{i18n "admin.wizard.value"}} /> - {{d-button action=(action "removeParam") actionParam=param icon="times"}} + {{d-button + action=(action "removeParam") + actionParam=param + icon="times" + }} {{/each}} - {{d-button label="admin.wizard.api.auth.params.new" icon="plus" action=(action "addParam")}} + {{d-button + label="admin.wizard.api.auth.params.new" + icon="plus" + action=(action "addParam") + }} {{/if}} @@ -169,18 +175,14 @@
- +
- +
{{/if}} @@ -249,7 +251,11 @@
- {{d-button action=(action "addEndpoint") label="admin.wizard.api.endpoint.add" icon="plus"}} + {{d-button + action=(action "addEndpoint") + label="admin.wizard.api.endpoint.add" + icon="plus" + }} {{#if api.endpoints}}
@@ -268,33 +274,34 @@ placeholder={{i18n "admin.wizard.api.endpoint.url"}} class="endpoint-url" /> - {{d-button action=(action "removeEndpoint") - actionParam=endpoint - icon="times" - class="remove-endpoint"}} + {{d-button + action=(action "removeEndpoint") + actionParam=endpoint + icon="times" + class="remove-endpoint" + }}
{{combo-box content=endpointMethods value=endpoint.method onChange=(action (mut endpoint.method)) - options=(hash - none="admin.wizard.api.endpoint.method" - )}} + options=(hash none="admin.wizard.api.endpoint.method") + }} {{combo-box content=contentTypes value=endpoint.content_type onChange=(action (mut endpoint.content_type)) - options=(hash - none="admin.wizard.api.endpoint.content_type" - )}} + options=(hash none="admin.wizard.api.endpoint.content_type") + }} {{multi-select value=endpoint.success_codes content=successCodes onChange=(action (mut endpoint.success_codes)) options=(hash none="admin.wizard.api.endpoint.success_codes" - )}} + ) + }}
@@ -312,7 +319,8 @@ {{d-button action=(action "clearLogs") class="clear-logs" - label="admin.wizard.api.log.clear"}} + label="admin.wizard.api.log.clear" + }} @@ -332,7 +340,10 @@ {{logentry.time}}
- {{avatar logentry imageSize="medium"}} + {{avatar logentry imageSize="medium"}}
{{logentry.status}} @@ -343,4 +354,4 @@ - + \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-api.hbs b/assets/javascripts/discourse/templates/admin-wizards-api.hbs index af91d0fb..6a6c5832 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-api.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-api.hbs @@ -3,16 +3,16 @@ value=apiName content=apiList onChange=(route-action "changeApi") - options=(hash - none="admin.wizard.api.select" - )}} + options=(hash none="admin.wizard.api.select") + }} {{d-button action=(route-action "createApi") label="admin.wizard.api.create" - icon="plus"}} + icon="plus" + }}
{{outlet}} -
+ \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs b/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs index a90f6299..4dda0ac8 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-custom-fields.hbs @@ -5,7 +5,8 @@ {{d-button label="admin.wizard.custom_field.add" icon="plus" - action=(action "addField")}} + action=(action "addField") + }} @@ -14,7 +15,8 @@ opts=messageOpts type=messageType url=documentationUrl - component="custom_fields"}} + component="custom_fields" +}}
{{#if customFields}} @@ -32,9 +34,10 @@ {{custom-field-input field=field removeField=(action "removeField") - saveField=(action "saveField")}} + saveField=(action "saveField") + }} {{/each}} {{/if}} -
+ \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-logs-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-logs-show.hbs index 270d5c21..deb7ed8b 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-logs-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-logs-show.hbs @@ -9,7 +9,8 @@ label="refresh" icon="sync" action=(action "refresh") - class="refresh"}} + class="refresh" + }} @@ -31,7 +32,10 @@ {{#each logs as |log|}} {{#each-in log as |field value|}} - {{wizard-table-field field=field value=value}} + {{wizard-table-field + field=field + value=value + }} {{/each-in}} {{/each}} @@ -42,4 +46,4 @@ {{conditional-loading-spinner condition=refreshing}} {{/load-more}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-logs.hbs b/assets/javascripts/discourse/templates/admin-wizards-logs.hbs index 45738a9f..703f4fa3 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-logs.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-logs.hbs @@ -3,17 +3,17 @@ value=wizardId content=wizardList onChange=(route-action "changeWizard") - options=(hash - none="admin.wizard.select" - )}} + options=(hash none="admin.wizard.select") + }} {{wizard-message key=messageKey opts=messageOpts url=documentationUrl - component="logs"}} + component="logs" +}}
{{outlet}} -
+ \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-manager.hbs b/assets/javascripts/discourse/templates/admin-wizards-manager.hbs index 38ef54d2..f2de0783 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-manager.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-manager.hbs @@ -20,22 +20,26 @@ {{d-button id="upload-button" label="admin.wizard.manager.upload" - action=(action "upload")}} + action=(action "upload") + }} {{d-button id="import-button" label="admin.wizard.manager.import" action=(action "import") - disabled=importDisabled}} + disabled=importDisabled + }} {{d-button id="export-button" label="admin.wizard.manager.export" action=(action "export") - disabled=exportDisabled}} + disabled=exportDisabled + }} {{d-button id="destroy-button" label="admin.wizard.manager.destroy" action=(action "destroy") - disabled=destoryDisabled}} + disabled=destoryDisabled + }} @@ -46,7 +50,8 @@ opts=messageOpts items=messageItems loading=loading - component="manager"}} + component="manager" +}}
@@ -83,4 +88,4 @@ {{/each}}
-
+ \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-submissions-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-submissions-show.hbs index 72ec7c38..96a24a9d 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-submissions-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-submissions-show.hbs @@ -58,4 +58,4 @@ {{conditional-loading-spinner condition=loadingMore}} {{/load-more}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-submissions.hbs b/assets/javascripts/discourse/templates/admin-wizards-submissions.hbs index 07dd1682..1ccaa3b8 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-submissions.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-submissions.hbs @@ -3,17 +3,17 @@ value=wizardId content=wizardList onChange=(route-action "changeWizard") - options=(hash - none="admin.wizard.select" - )}} + options=(hash none="admin.wizard.select") + }} {{wizard-message key=messageKey opts=messageOpts url=documentationUrl - component="submissions"}} + component="submissions" +}}
{{outlet}} -
+ \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs index 4b04878e..053deb73 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs @@ -9,11 +9,23 @@
{{#if wizard.name}} {{#if copiedUrl}} - {{d-button class="btn-hover pull-right" icon="copy" label="ip_lookup.copied"}} + {{d-button + class="btn-hover pull-right" + icon="copy" + label="ip_lookup.copied" + }} {{else}} - {{d-button action=(action "copyUrl") class="pull-right no-text" icon="copy"}} + {{d-button + action=(action "copyUrl") + class="pull-right no-text" + icon="copy" + }} {{/if}} - {{wizardUrl}} + {{wizardUrl}} {{/if}}
@@ -43,9 +55,8 @@ valueProperty="id" value=wizard.theme_id onChange=(action (mut wizard.theme_id)) - options=(hash - none="admin.wizard.no_theme" - )}} + options=(hash none="admin.wizard.no_theme") + }} @@ -60,10 +71,7 @@
- + {{i18n "admin.wizard.save_submissions_label"}}
@@ -73,10 +81,7 @@
- + {{i18n "admin.wizard.multiple_submissions_label"}}
@@ -86,10 +91,7 @@
- + {{i18n "admin.wizard.after_signup_label"}}
@@ -99,10 +101,7 @@
- + {{i18n "admin.wizard.prompt_completion_label"}}
@@ -112,16 +111,14 @@
- + {{i18n "admin.wizard.after_time_label"}} {{d-button action=(action "setNextSessionScheduled") translatedLabel=nextSessionScheduledLabel class="btn-after-time" - icon="far-calendar"}} + icon="far-calendar" + }}
@@ -131,10 +128,7 @@
- + {{i18n "admin.wizard.required_label"}}
@@ -144,10 +138,7 @@
- + {{i18n "admin.wizard.restart_on_revisit_label"}}
@@ -167,16 +158,14 @@ userFieldSelection="key" textSelection="value" inputConnector="and" - )}} + ) + }} {{/wizard-subscription-container}} - {{wizard-links - itemType="step" - current=currentStep - items=wizard.steps}} + {{wizard-links itemType="step" current=currentStep items=wizard.steps}} {{#if currentStep}} {{wizard-custom-step @@ -185,14 +174,16 @@ currentField=currentField wizardFields=wizardFields fieldTypes=filteredFieldTypes - subscribed=subscribed}} + subscribed=subscribed + }} {{/if}} {{wizard-links itemType="action" current=currentAction items=wizard.actions - generateLabels=true}} + generateLabels=true + }} {{#each wizard.actions as |wizardAction|}} {{wizard-custom-action @@ -202,11 +193,17 @@ apis=apis removeAction="removeAction" wizardFields=wizardFields - fieldTypes=filteredFieldTypes}} + fieldTypes=filteredFieldTypes + }} {{/each}}
- @@ -222,4 +219,4 @@ {{d-icon "times"}}{{error}} {{/if}}
-{{/if}} +{{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs index c96f8009..7a33dac1 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs @@ -3,21 +3,18 @@ value=wizardListVal content=wizardList onChange=(route-action "changeWizard") - options=(hash - none="admin.wizard.select" - )}} + options=(hash none="admin.wizard.select") + }} {{d-button action=(route-action "createWizard") label="admin.wizard.create" - icon="plus"}} + icon="plus" + }} -{{wizard-message - key=messageKey - url=messageUrl - component="wizard"}} +{{wizard-message key=messageKey url=messageUrl component="wizard"}}
{{outlet}} -
+ \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/admin-wizards.hbs b/assets/javascripts/discourse/templates/admin-wizards.hbs index cea77942..452193b1 100644 --- a/assets/javascripts/discourse/templates/admin-wizards.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards.hbs @@ -1,12 +1,21 @@ {{#admin-nav}} {{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}} - {{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}} - {{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}} + {{nav-item + route="adminWizardsCustomFields" + label="admin.wizard.custom_field.nav_label" + }} + {{nav-item + route="adminWizardsSubmissions" + label="admin.wizard.submissions.nav_label" + }} {{#if showApi}} {{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}} {{/if}} {{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}} - {{nav-item route="adminWizardsManager" label="admin.wizard.manager.nav_label"}} + {{nav-item + route="adminWizardsManager" + label="admin.wizard.manager.nav_label" + }}
{{wizard-subscription-badge}} @@ -16,4 +25,4 @@
{{outlet}} -
+
\ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-field-input.hbs b/assets/javascripts/discourse/templates/components/custom-field-input.hbs index 8c532cc9..4e3fa2f0 100644 --- a/assets/javascripts/discourse/templates/components/custom-field-input.hbs +++ b/assets/javascripts/discourse/templates/components/custom-field-input.hbs @@ -5,9 +5,8 @@ feature="custom_field" attribute="klass" onChange=(action (mut field.klass)) - options=(hash - none="admin.wizard.custom_field.klass.select" - )}} + options=(hash none="admin.wizard.custom_field.klass.select") + }} {{wizard-subscription-selector @@ -15,9 +14,8 @@ feature="custom_field" attribute="type" onChange=(action (mut field.type)) - options=(hash - none="admin.wizard.custom_field.type.select" - )}} + options=(hash none="admin.wizard.custom_field.type.select") + }} {{#if loading}} @@ -46,16 +43,15 @@ action=(action "destroy") icon="trash-alt" class="destroy" - disabled=destroyDisabled}} + disabled=destroyDisabled + }} {{d-button icon="save" action=(action "save") disabled=saveDisabled - class="save"}} - {{d-button - action=(action "close") - icon="times" - disabled=closeDisabled}} + class="save" + }} + {{d-button action=(action "close") icon="times" disabled=closeDisabled}} {{else}} @@ -81,4 +77,4 @@ {{d-button action=(action "edit") icon="pencil-alt"}} {{/if}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-composer-editor.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-composer-editor.hbs index baa6a17a..70286603 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-composer-editor.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-composer-editor.hbs @@ -14,7 +14,8 @@ wizardComposer=true fieldId=field.id disabled=disableTextarea - outletArgs=(hash composer=composer editorType="composer")}} + outletArgs=(hash composer=composer editorType="composer") +}} +/> \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-date-input.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-date-input.hbs index 0f798714..3f1cc4c6 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-date-input.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-date-input.hbs @@ -8,4 +8,4 @@ autocomplete="off" /> -
+
\ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-date-time-input.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-date-time-input.hbs index 4fed9c95..051ce6f8 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-date-time-input.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-date-time-input.hbs @@ -26,9 +26,5 @@ {{/if}} {{#if clearable}} - {{d-button - class="clear-date-time" - icon="times" - action=(action "onClear") - }} -{{/if}} + {{d-button class="clear-date-time" icon="times" action=(action "onClear")}} +{{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs index 6350594c..fd10299c 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs @@ -2,7 +2,7 @@
{{#if showPreview}} -
+
{{html-safe preview}}
@@ -18,13 +18,16 @@ onExpand=(action b.action b) class=b.className content=popupMenuOptions - options=(hash - popupTitle=b.title - icon=b.icon - )}} + options=(hash popupTitle=b.title icon=b.icon) + }} {{else}}
{{d.icon}}
-
{{/if}} -
+
\ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-category.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-category.hbs index 79180dc4..ee777850 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-category.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-category.hbs @@ -4,6 +4,5 @@ whitelist=field.content onChange=(action (mut categories)) tabindex=field.tabindex - options=(hash - maximum=field.limit - )}} + options=(hash maximum=field.limit) +}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-checkbox.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-checkbox.hbs index 0ceeb11b..dd75b5fb 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-checkbox.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-checkbox.hbs @@ -4,4 +4,4 @@ @checked={{this.field.value}} tabindex={{this.field.tabindex}} class={{this.fieldClass}} -/> +/> \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-composer-preview.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-composer-preview.hbs index 508cf31d..7e4e777f 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-composer-preview.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-composer-preview.hbs @@ -2,4 +2,4 @@
{{html-safe field.preview_template}}
- + \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-composer.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-composer.hbs index 5e54636b..ecc8058b 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-composer.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-composer.hbs @@ -7,14 +7,19 @@ cannotSeeMention=(action "cannotSeeMention") importQuote=(action "importQuote") togglePreview=(action "togglePreview") - afterRefresh=(action "afterRefresh")}} + afterRefresh=(action "afterRefresh") +}}
- {{#if field.char_counter}} {{wizard-char-counter field.value field.max_length}} {{/if}} -
+ \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-date-time.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-date-time.hbs index f6d6c588..5faeb3fb 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-date-time.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-date-time.hbs @@ -2,4 +2,4 @@ date=dateTime onChange=(action "onChange") tabindex=field.tabindex -}} +}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-date.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-date.hbs index d0368564..14504896 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-date.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-date.hbs @@ -3,4 +3,4 @@ onChange=(action "onChange") tabindex=field.tabindex format=field.format -}} +}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-dropdown.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-dropdown.hbs index 42fc63e8..f03bb975 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-dropdown.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-dropdown.hbs @@ -4,6 +4,5 @@ content=field.content tabindex=field.tabindex onChange=(action "onChangeValue") - options=(hash - none="select_kit.default_header_text" - )}} + options=(hash none="select_kit.default_header_text") +}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-group.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-group.hbs index 75a5b2b1..da487422 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-group.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-group.hbs @@ -6,6 +6,5 @@ value=field.value tabindex=field.tabindex onChange=(action (mut field.value)) - options=(hash - none="select_kit.default_header_text" - )}} + options=(hash none="select_kit.default_header_text") +}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-number.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-number.hbs index 3049ab08..0bfc99be 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-number.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-number.hbs @@ -5,5 +5,4 @@ @value={{this.field.value}} tabindex={{this.field.tabindex}} class={{this.fieldClass}} -/> - +/> \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-tag.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-tag.hbs index 17f68b92..71ffe7d7 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-tag.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-tag.hbs @@ -4,7 +4,5 @@ tabindex=field.tabindex tagGroups=field.tag_groups everyTag=true - options=(hash - maximum=field.limit - allowAny=field.can_create_tag - )}} + options=(hash maximum=field.limit allowAny=field.can_create_tag) +}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-text.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-text.hbs index ed3f4f37..76dbee2a 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-text.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-text.hbs @@ -5,4 +5,4 @@ class={{this.fieldClass}} placeholder={{this.field.translatedPlaceholder}} autocomplete={{this.autocomplete}} -/> +/> \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-textarea.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-textarea.hbs index 1d43813e..5431538c 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-textarea.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-textarea.hbs @@ -4,4 +4,4 @@ tabindex={{this.field.tabindex}} class={{this.fieldClass}} placeholder={{this.field.translatedPlaceholder}} -/> +/> \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-time.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-time.hbs index 1c790a81..665028d0 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-time.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-time.hbs @@ -2,4 +2,4 @@ date=time onChange=(action "onChange") tabindex=field.tabindex -}} +}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-upload.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-upload.hbs index 022e6a94..f899f580 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-upload.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-upload.hbs @@ -1,4 +1,7 @@ -