From 78d0cab761d4b64c54f6822acf662a522b060041 Mon Sep 17 00:00:00 2001 From: merefield Date: Wed, 18 Oct 2023 13:14:15 +0100 Subject: [PATCH 1/4] FIX: realtime validations --- .../templates/components/wizard-realtime-validations.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs b/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs index 1d29c655..04f2b1c4 100644 --- a/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-realtime-validations.hbs @@ -7,7 +7,7 @@
  • {{i18n (concat "admin.wizard.field.validations." type)}}

    - + {{i18n "admin.wizard.field.validations.enabled"}}
    @@ -36,7 +36,7 @@
    {{combo-box From 8740622b8e397eaa5559390b3bcf65cb402f26be Mon Sep 17 00:00:00 2001 From: merefield Date: Wed, 18 Oct 2023 13:15:10 +0100 Subject: [PATCH 2/4] COMPATIBILITY: resolve getOwner import deprecation --- .../discourse/components/wizard-mapper-selector.js.es6 | 2 +- assets/javascripts/discourse/lib/wizard-schema.js.es6 | 4 ++-- assets/javascripts/discourse/mixins/subscription.js.es6 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-mapper-selector.js.es6 b/assets/javascripts/discourse/components/wizard-mapper-selector.js.es6 index e19e4917..d7cf846b 100644 --- a/assets/javascripts/discourse/components/wizard-mapper-selector.js.es6 +++ b/assets/javascripts/discourse/components/wizard-mapper-selector.js.es6 @@ -4,7 +4,7 @@ import { default as discourseComputed, observes, } from "discourse-common/utils/decorators"; -import { getOwner } from "discourse-common/lib/get-owner"; +import { getOwner } from "@ember/application"; import { defaultSelectionType, selectionTypes } from "../lib/wizard-mapper"; import { generateName, diff --git a/assets/javascripts/discourse/lib/wizard-schema.js.es6 b/assets/javascripts/discourse/lib/wizard-schema.js.es6 index 47257d82..959185da 100644 --- a/assets/javascripts/discourse/lib/wizard-schema.js.es6 +++ b/assets/javascripts/discourse/lib/wizard-schema.js.es6 @@ -1,5 +1,5 @@ import { get, set } from "@ember/object"; -import { getOwner } from "discourse-common/lib/get-owner"; +import { getOwnerWithFallback } from "discourse-common/lib/get-owner"; const wizard = { basic: { @@ -279,7 +279,7 @@ export function filterValues(currentWizard, feature, attribute, values = null) { return values; } -const siteSettings = getOwner(this).lookup("service:site-settings"); +const siteSettings = getOwnerWithFallback(this).lookup("service:site-settings"); if (siteSettings.wizard_apis_enabled) { wizardSchema.action.types.send_to_api = { api: null, diff --git a/assets/javascripts/discourse/mixins/subscription.js.es6 b/assets/javascripts/discourse/mixins/subscription.js.es6 index 219a602b..9ea9382d 100644 --- a/assets/javascripts/discourse/mixins/subscription.js.es6 +++ b/assets/javascripts/discourse/mixins/subscription.js.es6 @@ -1,5 +1,5 @@ import Mixin from "@ember/object/mixin"; -import { getOwner } from "discourse-common/lib/get-owner"; +import { getOwner } from "@ember/application"; import { readOnly } from "@ember/object/computed"; import discourseComputed from "discourse-common/utils/decorators"; From 2b121d009cc1aff04640fb1131b6a9ecce6d9cab Mon Sep 17 00:00:00 2001 From: merefield Date: Wed, 18 Oct 2023 13:22:22 +0100 Subject: [PATCH 3/4] COMPATIBILITY: resolve pluginId warning --- .../discourse/initializers/custom-wizard-edits.js.es6 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 index ca72fa4b..2fef6452 100644 --- a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 +++ b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 @@ -85,6 +85,8 @@ export default { }); api.modifyClass("component:category-chooser", { + pluginId: "custom-wizard", + categoriesByScope(options = {}) { let categories = this._super(options); const currentUser = this.currentUser; From 69ecc7068b49b650a60f59cc40450e4cd54dbb91 Mon Sep 17 00:00:00 2001 From: merefield Date: Wed, 18 Oct 2023 13:25:39 +0100 Subject: [PATCH 4/4] bump patch --- plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index b169462f..ab979af8 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.4.28 +# version: 2.4.29 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech