0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-25 10:40:28 +01:00

FIX: breakage due to core changes (#107)

Dieser Commit ist enthalten in:
Faizaan Gagan 2021-05-05 11:35:53 +05:30 committet von GitHub
Ursprung aca0fab74e
Commit 743af8edc5
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -21,7 +21,7 @@ export default {
actions: { actions: {
willTransition(transition) { willTransition(transition) {
const redirectToWizard = this.get("currentUser.redirect_to_wizard"); const redirectToWizard = this.get("currentUser.redirect_to_wizard");
const excludedPaths = Discourse.SiteSettings.wizard_redirect_exclude_paths const excludedPaths = this.siteSettings.wizard_redirect_exclude_paths
.split("|") .split("|")
.concat(["loading"]); .concat(["loading"]);

Datei anzeigen

@ -1,4 +1,5 @@
import { get, set } from "@ember/object"; import { get, set } from "@ember/object";
import { getOwner } from "discourse-common/lib/get-owner";
const wizard = { const wizard = {
basic: { basic: {
@ -222,7 +223,8 @@ export function buildFieldValidations(validations) {
wizardSchema.field.validations = validations; wizardSchema.field.validations = validations;
} }
if (Discourse.SiteSettings.wizard_apis_enabled) { const siteSettings = getOwner(this).lookup("site-settings:main");
if (siteSettings.wizard_apis_enabled) {
wizardSchema.action.types.send_to_api = { wizardSchema.action.types.send_to_api = {
api: null, api: null,
api_endpoint: null, api_endpoint: null,