0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 15:21:11 +02:00

Merge pull request #279 from paviliondev/fix_validations_form

Dieser Commit ist enthalten in:
Angus McLeod 2023-10-19 07:01:54 +08:00 committet von GitHub
Commit 9ab77c4b1f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
6 geänderte Dateien mit 9 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -4,7 +4,7 @@ import {
default as discourseComputed, default as discourseComputed,
observes, observes,
} from "discourse-common/utils/decorators"; } 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 { defaultSelectionType, selectionTypes } from "../lib/wizard-mapper";
import { import {
generateName, generateName,

Datei anzeigen

@ -85,6 +85,8 @@ export default {
}); });
api.modifyClass("component:category-chooser", { api.modifyClass("component:category-chooser", {
pluginId: "custom-wizard",
categoriesByScope(options = {}) { categoriesByScope(options = {}) {
let categories = this._super(options); let categories = this._super(options);
const currentUser = this.currentUser; const currentUser = this.currentUser;

Datei anzeigen

@ -1,5 +1,5 @@
import { get, set } from "@ember/object"; import { get, set } from "@ember/object";
import { getOwner } from "discourse-common/lib/get-owner"; import { getOwnerWithFallback } from "discourse-common/lib/get-owner";
const wizard = { const wizard = {
basic: { basic: {
@ -279,7 +279,7 @@ export function filterValues(currentWizard, feature, attribute, values = null) {
return values; return values;
} }
const siteSettings = getOwner(this).lookup("service:site-settings"); const siteSettings = getOwnerWithFallback(this).lookup("service:site-settings");
if (siteSettings.wizard_apis_enabled) { if (siteSettings.wizard_apis_enabled) {
wizardSchema.action.types.send_to_api = { wizardSchema.action.types.send_to_api = {
api: null, api: null,

Datei anzeigen

@ -1,5 +1,5 @@
import Mixin from "@ember/object/mixin"; 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 { readOnly } from "@ember/object/computed";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";

Datei anzeigen

@ -7,7 +7,7 @@
<li> <li>
<span class="setting-title"> <span class="setting-title">
<h4>{{i18n (concat "admin.wizard.field.validations." type)}}</h4> <h4>{{i18n (concat "admin.wizard.field.validations." type)}}</h4>
<Input @type="checkbox" @checked={{this.props.status}} /> <Input @type="checkbox" @checked={{props.status}} />
{{i18n "admin.wizard.field.validations.enabled"}} {{i18n "admin.wizard.field.validations.enabled"}}
</span> </span>
<div class="validation-container"> <div class="validation-container">
@ -36,7 +36,7 @@
<div class="setting-value"> <div class="setting-value">
<Input <Input
@type="number" @type="number"
@value={{this.props.time_n_value}} @value={{props.time_n_value}}
class="time-n-value" class="time-n-value"
/> />
{{combo-box {{combo-box

Datei anzeigen

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
# name: discourse-custom-wizard # name: discourse-custom-wizard
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. # 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 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
# url: https://github.com/paviliondev/discourse-custom-wizard # url: https://github.com/paviliondev/discourse-custom-wizard
# contact_emails: development@pavilion.tech # contact_emails: development@pavilion.tech