diff --git a/assets/javascripts/discourse/components/custom-field-input.hbs b/assets/javascripts/discourse/components/custom-field-input.hbs index 82c7c62a..55431185 100644 --- a/assets/javascripts/discourse/components/custom-field-input.hbs +++ b/assets/javascripts/discourse/components/custom-field-input.hbs @@ -51,7 +51,11 @@ disabled=this.saveDisabled class="save" }} - {{d-button action=(action "close") icon="times" disabled=this.closeDisabled}} + {{d-button + action=(action "close") + icon="times" + disabled=this.closeDisabled + }} {{else}} diff --git a/assets/javascripts/discourse/components/custom-field-input.js b/assets/javascripts/discourse/components/custom-field-input.js index be3655ba..6f891e1b 100644 --- a/assets/javascripts/discourse/components/custom-field-input.js +++ b/assets/javascripts/discourse/components/custom-field-input.js @@ -122,7 +122,7 @@ export default Component.extend({ setTimeout(() => { if (this.isDestroyed) { return; - }; + } this.set("saveIcon", null); }, 10000); }); diff --git a/assets/javascripts/discourse/components/custom-wizard-editor.hbs b/assets/javascripts/discourse/components/custom-wizard-editor.hbs index 23c26505..8c0a96c1 100644 --- a/assets/javascripts/discourse/components/custom-wizard-editor.hbs +++ b/assets/javascripts/discourse/components/custom-wizard-editor.hbs @@ -2,7 +2,9 @@
{{#if this.showPreview}} -
+
{{html-safe this.preview}}
diff --git a/assets/javascripts/discourse/components/custom-wizard-textarea-editor.js b/assets/javascripts/discourse/components/custom-wizard-textarea-editor.js index eea31f60..9d157432 100644 --- a/assets/javascripts/discourse/components/custom-wizard-textarea-editor.js +++ b/assets/javascripts/discourse/components/custom-wizard-textarea-editor.js @@ -37,4 +37,4 @@ export default class CustomWizardTextareaEditor extends TextareaEditor { this.textarea.removeEventListener("input", this.onInputSmartList); } } -} \ No newline at end of file +} diff --git a/assets/javascripts/discourse/components/wizard-custom-field.hbs b/assets/javascripts/discourse/components/wizard-custom-field.hbs index dcf095c1..dac6ff9a 100644 --- a/assets/javascripts/discourse/components/wizard-custom-field.hbs +++ b/assets/javascripts/discourse/components/wizard-custom-field.hbs @@ -271,7 +271,10 @@
- {{wizard-mapper inputs=this.field.condition options=this.fieldConditionOptions}} + {{wizard-mapper + inputs=this.field.condition + options=this.fieldConditionOptions + }}
@@ -303,6 +306,9 @@ {{/if}} {{#if this.validations}} - {{wizard-realtime-validations field=this.field validations=this.validations}} + {{wizard-realtime-validations + field=this.field + validations=this.validations + }} {{/if}} {{/wizard-subscription-container}} \ No newline at end of file diff --git a/assets/javascripts/discourse/components/wizard-custom-step.hbs b/assets/javascripts/discourse/components/wizard-custom-step.hbs index 10a79ffb..83103c38 100644 --- a/assets/javascripts/discourse/components/wizard-custom-step.hbs +++ b/assets/javascripts/discourse/components/wizard-custom-step.hbs @@ -39,7 +39,10 @@
- {{wizard-mapper inputs=this.step.condition options=this.stepConditionOptions}} + {{wizard-mapper + inputs=this.step.condition + options=this.stepConditionOptions + }}
diff --git a/assets/javascripts/discourse/components/wizard-mapper-pair.hbs b/assets/javascripts/discourse/components/wizard-mapper-pair.hbs index 03b5a86e..bb75faac 100644 --- a/assets/javascripts/discourse/components/wizard-mapper-pair.hbs +++ b/assets/javascripts/discourse/components/wizard-mapper-pair.hbs @@ -35,7 +35,9 @@ {{/if}} {{#if this.showRemove}} - {{d-icon - "times" - }} + {{d-icon "times"}} {{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/components/wizard-subscription-status.hbs b/assets/javascripts/discourse/components/wizard-subscription-status.hbs index 03e740bb..23ac0e12 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-status.hbs +++ b/assets/javascripts/discourse/components/wizard-subscription-status.hbs @@ -1,7 +1,10 @@
{{#if this.authorized}} - + {{#if this.previewEnabled}} - {{d-button action=(action "togglePreview") translatedLabel=this.previewLabel}} + {{d-button + action=(action "togglePreview") + translatedLabel=this.previewLabel + }} {{/if}} {{#if this.fieldsEnabled}} - {{d-button action=(action "togglePopover") translatedLabel=this.popoverLabel}} + {{d-button + action=(action "togglePopover") + translatedLabel=this.popoverLabel + }} {{#if this.showPopover}}
diff --git a/assets/javascripts/discourse/controllers/admin-wizards-custom-fields.js b/assets/javascripts/discourse/controllers/admin-wizards-custom-fields.js index f9e4f0d3..25499249 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-custom-fields.js +++ b/assets/javascripts/discourse/controllers/admin-wizards-custom-fields.js @@ -31,19 +31,16 @@ export default Controller.extend({ } } - setTimeout( - () => { - if (this.isDestroyed) { - return; - } - this.setProperties({ - messageKey: "create", - messageType: null, - messageOpts: null, - }); - }, - 10000 - ); + setTimeout(() => { + if (this.isDestroyed) { + return; + } + this.setProperties({ + messageKey: "create", + messageType: null, + messageOpts: null, + }); + }, 10000); return result; }); diff --git a/assets/javascripts/discourse/controllers/admin-wizards-manager.js b/assets/javascripts/discourse/controllers/admin-wizards-manager.js index 7fe94804..818cfee1 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-manager.js +++ b/assets/javascripts/discourse/controllers/admin-wizards-manager.js @@ -28,7 +28,7 @@ export default Controller.extend({ setTimeout(() => { if (this.isDestroyed) { return; - }; + } this.setProperties({ messageKey: "info", messageOpts: null, diff --git a/assets/javascripts/discourse/initializers/custom-wizard-edits.js b/assets/javascripts/discourse/initializers/custom-wizard-edits.js index 99ff2986..168b80ea 100644 --- a/assets/javascripts/discourse/initializers/custom-wizard-edits.js +++ b/assets/javascripts/discourse/initializers/custom-wizard-edits.js @@ -1,7 +1,6 @@ import DiscourseURL from "discourse/lib/url"; import { withPluginApi } from "discourse/lib/plugin-api"; import getUrl from "discourse-common/lib/get-url"; -import { observes } from "discourse-common/utils/decorators"; import { popupAjaxError } from "discourse/lib/ajax-error"; import { ajax } from "discourse/lib/ajax"; import CustomWizardTextareaEditor from "../components/custom-wizard-textarea-editor"; diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs index e840f227..35639148 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs @@ -181,7 +181,11 @@ {{/wizard-subscription-container}}
- {{wizard-links itemType="step" current=this.currentStep items=this.wizard.steps}} + {{wizard-links + itemType="step" + current=this.currentStep + items=this.wizard.steps + }} {{#if this.currentStep}} {{wizard-custom-step diff --git a/assets/javascripts/discourse/templates/custom-wizard-index.hbs b/assets/javascripts/discourse/templates/custom-wizard-index.hbs index ec856423..2c2227be 100644 --- a/assets/javascripts/discourse/templates/custom-wizard-index.hbs +++ b/assets/javascripts/discourse/templates/custom-wizard-index.hbs @@ -1,7 +1,7 @@ {{#if this.noAccess}} {{/if}} \ No newline at end of file diff --git a/test/javascripts/acceptance/admin-custom-fields-unsubscribed-test.js b/test/javascripts/acceptance/admin-custom-fields-unsubscribed-test.js index b2d53023..e1abd4f2 100644 --- a/test/javascripts/acceptance/admin-custom-fields-unsubscribed-test.js +++ b/test/javascripts/acceptance/admin-custom-fields-unsubscribed-test.js @@ -13,7 +13,6 @@ import { getUnsubscribedAdminWizards, getWizard, } from "../helpers/admin-wizard"; -import { Promise } from "rsvp"; acceptance("Admin | Custom Fields Unsubscribed", function (needs) { needs.user(); diff --git a/test/javascripts/acceptance/field-test.js b/test/javascripts/acceptance/field-test.js index 8b9966c0..139ac676 100644 --- a/test/javascripts/acceptance/field-test.js +++ b/test/javascripts/acceptance/field-test.js @@ -1,16 +1,8 @@ -import { getOwner } from "@ember/application"; -import { - click, - fillIn, - settled, - triggerKeyEvent, - visit, -} from "@ember/test-helpers"; +import { click, fillIn, triggerKeyEvent, visit } from "@ember/test-helpers"; import { test } from "qunit"; import { acceptance, count, - createFile, exists, query, visible, @@ -19,8 +11,6 @@ import { allFieldsWizard } from "../helpers/wizard"; import tagsJson from "../fixtures/tags"; import usersJson from "../fixtures/users"; -const wizardComposerEdtiorEventPrefix = "wizard-editor"; - acceptance("Field | Fields", function (needs) { needs.pretender((server, helper) => { server.get("/w/wizard.json", () => helper.response(allFieldsWizard));