0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-24 10:20:28 +01:00
Dieser Commit ist enthalten in:
Angus McLeod 2024-07-09 11:26:34 +02:00
Ursprung 54a9e9470e
Commit 7bb26d0d5c
8 geänderte Dateien mit 21 neuen und 18 gelöschten Zeilen

Datei anzeigen

@ -36,6 +36,6 @@ export default Component.extend({
showLogin() {
cookie("destination_url", getURL(`/w/${this.get("wizardId")}`));
getOwner(this).lookup("route:application").send("showLogin");
}
},
},
});

Datei anzeigen

@ -5,7 +5,6 @@ import { computed } from "@ember/object";
import UndoChanges from "../mixins/undo-changes";
import Component from "@ember/component";
import I18n from "I18n";
import { WIZARD_USER } from "./wizard-user-chooser";
export default Component.extend(UndoChanges, {
componentType: "action",

Datei anzeigen

@ -121,9 +121,13 @@ export default Component.extend({
guestGroup: computed("options.guestGroup", "inputType", function () {
return this.optionEnabled("guestGroup");
}),
includeMessageableGroups: computed("options.includeMessageableGroups", "inputType", function () {
return this.optionEnabled("includeMessageableGroups");
}),
includeMessageableGroups: computed(
"options.includeMessageableGroups",
"inputType",
function () {
return this.optionEnabled("includeMessageableGroups");
}
),
userEnabled: computed("options.userSelection", "inputType", function () {
return this.optionEnabled("userSelection");
}),
@ -358,10 +362,10 @@ export default Component.extend({
@discourseComputed("includeMessageableGroups", "options.userLimit")
userOptions(includeMessageableGroups, userLimit) {
const opts = {
includeMessageableGroups
}
includeMessageableGroups,
};
if (userLimit) {
opts.maximum = userLimit
opts.maximum = userLimit;
}
return opts;
},

Datei anzeigen

@ -34,7 +34,7 @@ export default Component.extend({
context: options.context || null,
guestGroup: options.guestGroup || false,
includeMessageableGroups: options.includeMessageableGroups || false,
userLimit: options.userLimit || null
userLimit: options.userLimit || null,
};
let inputTypes = ["key", "value", "output"];

Datei anzeigen

@ -1,4 +1,5 @@
import UserChooserComponent from "select-kit/components/user-chooser";
import I18n from "I18n";
export const WIZARD_USER = "wizard-user";
@ -14,7 +15,10 @@ export default UserChooserComponent.extend({
},
modifyNoSelection() {
return this.defaultItem(WIZARD_USER, I18n.t("admin.wizard.action.poster.wizard_user"));
return this.defaultItem(
WIZARD_USER,
I18n.t("admin.wizard.action.poster.wizard_user")
);
},
selectKitOptions: {
@ -28,7 +32,6 @@ export default UserChooserComponent.extend({
return;
}
return superPromise.then((results) => {
console.log(results)
if (!results || results.length === 0) {
return;
}

Datei anzeigen

@ -100,7 +100,7 @@ const action = {
custom_fields: null,
skip_redirect: null,
suppress_notifications: null,
poster: 'wizard-user',
poster: "wizard-user",
guest_email: null,
add_event: null,
add_location: null,
@ -113,7 +113,7 @@ const action = {
skip_redirect: null,
custom_fields: null,
required: null,
poster: 'wizard-user',
poster: "wizard-user",
guest_email: null,
recipient: null,
suppress_notifications: null,

Datei anzeigen

@ -1,9 +1,6 @@
<div>{{text}}</div>
<div class="no-access-gutter">
<a
class="return-to-site"
{{action "skip"}}
>
<a class="return-to-site" {{action "skip"}}>
{{i18n "wizard.return_to_site" siteName=siteName}}
</a>
{{#if showLoginButton}}

Datei anzeigen

@ -110,7 +110,7 @@
property="poster"
onUpdate=(action "mappedFieldUpdated")
options=(hash
textSelection='key,value'
textSelection="key,value"
wizardFieldSelection=true
userSelection="output"
outputDefaultSelection="user"