1
0
Fork 0

Commits vergleichen

..

4 Commits

Autor SHA1 Nachricht Datum
Angus McLeod
4ee071f890 Update plugin.rb 2023-03-15 14:15:00 +01:00
Angus McLeod
ca68eceb0f Merge branch 'main' into failing_backend 2023-03-15 14:14:09 +01:00
Angus McLeod
543f18584f Update plugin.rb 2023-03-15 14:05:47 +01:00
Angus McLeod
28baf0b574 Update mapper.rb 2023-03-15 14:05:29 +01:00
158 geänderte Dateien mit 1951 neuen und 7217 gelöschten Zeilen

Datei anzeigen

@ -1,3 +1,2 @@
3.1.999: 1f35b80f85e5fd1efb7f4851f0845700432febdc
2.7.99: e07a57e398b6b1676ab42a7e34467556fca5416b
2.5.1: bb85b3a0d2c0ab6b59bcb405731c39089ec6731c

Datei anzeigen

@ -5,8 +5,6 @@ on:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
ci:

Datei anzeigen

@ -4,24 +4,22 @@ The Custom Wizard Plugin lets you make forms for your Discourse forum. Better us
<img src="https://camo.githubusercontent.com/593432f1fc9658ffca104065668cc88fa21dffcd3002cb78ffd50c71f33a2523/68747470733a2f2f706176696c696f6e2d6173736574732e6e7963332e63646e2e6469676974616c6f6365616e7370616365732e636f6d2f706c7567696e732f77697a6172642d7265706f7369746f72792d62616e6e65722e706e67" alt="" data-canonical-src="https://pavilion-assets.nyc3.cdn.digitaloceanspaces.com/plugins/wizard-repository-banner.png" style="max-width: 100%;" width="400">
👋 Looking to report an issue? We're managing issues for this plugin using our [bug report wizard](https://coop.pavilion.tech/w/bug-report).
## Install
If you're not sure how to install a plugin in Discourse, please follow the [plugin installation guide](https://meta.discourse.org/t/install-a-plugin/19157) or contact your Discourse hosting provider.
## Documentation
[Read the full documentation here](https://coop.pavilion.tech/c/82), or go directly to the relevant section
[Read the full documentation here](https://discourse.pluginmanager.org/c/discourse-custom-wizard/documentation), or go directly to the relevant section
- [Wizard Administration](https://coop.pavilion.tech/t/1602)
- [Wizard Settings](https://coop.pavilion.tech/t/1614)
- [Step Settings](https://coop.pavilion.tech/t/1735)
- [Field Settings](https://coop.pavilion.tech/t/1580)
- [Conditional Settings](https://coop.pavilion.tech/t/1673)
- [Field Interpolation](https://coop.pavilion.tech/t/1557)
- [Handling Dates and Times](https://coop.pavilion.tech/t/1708)
- [Wizard Administration](https://discourse.pluginmanager.org/t/wizard-administration)
- [Wizard Settings](https://discourse.pluginmanager.org/t/wizard-settings)
- [Step Settings](https://discourse.pluginmanager.org/t/step-settings)
- [Field Settings](https://discourse.pluginmanager.org/t/field-settings)
- [Conditional Settings](https://discourse.pluginmanager.org/t/conditional-settings)
- [Field Interpolation](https://discourse.pluginmanager.org/t/field-interpolation)
- [Wizard Examples and Templates](https://discourse.pluginmanager.org/t/wizard-examples-and-templates)
## Support
- [Report an issue](https://coop.pavilion.tech/w/bug-report)
- [Report a bug](https://discourse.pluginmanager.org/w/bug-report)

Datei anzeigen

@ -8,7 +8,7 @@ class CustomWizard::AdminController < ::Admin::AdminController
subscribed: subcription.subscribed?,
subscription_type: subcription.type,
subscription_attributes: CustomWizard::Subscription.attributes,
subscription_client_installed: CustomWizard::Subscription.client_installed?
subscription_client_installed: subcription.client_installed?
)
end

Datei anzeigen

@ -22,12 +22,7 @@ class CustomWizard::AdminSubmissionsController < CustomWizard::AdminController
end
def download
content = ActiveModel::ArraySerializer.new(
CustomWizard::Submission.list(@wizard).submissions,
each_serializer: CustomWizard::SubmissionSerializer
)
send_data content.to_json,
send_data submission_list.submissions.to_json,
filename: "#{Discourse.current_hostname}-wizard-submissions-#{@wizard.name}.json",
content_type: "application/json",
disposition: "attachment"

Datei anzeigen

@ -10,7 +10,7 @@ class CustomWizard::SubmissionSerializer < ApplicationSerializer
end
def user
::BasicUserSerializer.new(object.wizard.user, root: false).as_json
::BasicUserSerializer.new(object.wizard.user).as_json
end
def fields

Datei anzeigen

@ -7,7 +7,7 @@ import userSearch from "discourse/lib/user-search";
import I18n from "I18n";
import Handlebars from "handlebars";
import { isEmpty } from "@ember/utils";
import TextField from "discourse/components/text-field";
import TextField from "@ember/component/text-field";
const template = function (params) {
const options = params.options;

Datei anzeigen

@ -12,15 +12,11 @@ import { alias } from "@ember/object/computed";
import Site from "discourse/models/site";
import { uploadIcon } from "discourse/lib/uploads";
import { dasherize } from "@ember/string";
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
import { inject as service } from "@ember/service";
import showModal from "discourse/lib/show-modal";
const IMAGE_MARKDOWN_REGEX =
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
const IMAGE_MARKDOWN_REGEX = /!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
export default ComposerEditor.extend({
modal: service(),
classNameBindings: ["fieldClass"],
allowUpload: true,
showLink: false,
@ -120,8 +116,9 @@ export default ComposerEditor.extend({
event.target.closest(".button-wrapper").dataset.imageIndex,
10
);
const matchingPlaceholder =
this.get("composer.reply").match(IMAGE_MARKDOWN_REGEX);
const matchingPlaceholder = this.get("composer.reply").match(
IMAGE_MARKDOWN_REGEX
);
this.session.set("wizardEventFieldId", this.field.id);
this.appEvents.trigger(
@ -200,8 +197,10 @@ export default ComposerEditor.extend({
if (this._lastSel) {
linkText = this._lastSel.value;
}
this.modal.show(InsertHyperlink, {
model: { linkText, toolbarEvent },
showModal("insert-hyperlink").setProperties({
linkText,
toolbarEvent,
});
},

Datei anzeigen

@ -3,7 +3,6 @@ import discourseComputed from "discourse-common/utils/decorators";
export default DateInput.extend({
useNativePicker: false,
classNameBindings: ["fieldClass"],
@discourseComputed()
placeholder() {

Datei anzeigen

@ -2,8 +2,6 @@ import DateTimeInput from "discourse/components/date-time-input";
import discourseComputed from "discourse-common/utils/decorators";
export default DateTimeInput.extend({
classNameBindings: ["fieldClass"],
@discourseComputed("timeFirst", "tabindex")
timeTabindex(timeFirst, tabindex) {
return timeFirst ? tabindex : tabindex + 1;

Datei anzeigen

@ -2,8 +2,6 @@ import Component from "@ember/component";
import { observes } from "discourse-common/utils/decorators";
export default Component.extend({
classNameBindings: ["fieldClass"],
@observes("time")
setValue() {
this.set("field.value", this.time.format(this.field.format));

Datei anzeigen

@ -4,7 +4,7 @@ import { computed } from "@ember/object";
export default Component.extend(UppyUploadMixin, {
classNames: ["wizard-field-upload"],
classNameBindings: ["isImage", "fieldClass"],
classNameBindings: ["isImage"],
uploading: false,
type: computed(function () {
return `wizard_${this.field.id}`;

Datei anzeigen

@ -1,5 +1,3 @@
import Component from "@ember/component";
export default Component.extend({
classNameBindings: ["fieldClass"],
});
export default Component.extend({});

Datei anzeigen

@ -9,7 +9,6 @@ import CustomWizard, {
updateCachedWizard,
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
import { alias, not } from "@ember/object/computed";
import discourseLater from "discourse-common/lib/later";
const alreadyWarned = {};
@ -111,22 +110,29 @@ export default Component.extend({
},
autoFocus() {
discourseLater(() => {
schedule("afterRender", () => {
if ($(".invalid .wizard-focusable").length) {
this.animateInvalidFields();
const $invalid = $(
".wizard-field.invalid:nth-of-type(1) .wizard-focusable"
);
if ($invalid.length) {
return $invalid.focus();
}
});
$(".wizard-focusable:first").focus();
});
},
animateInvalidFields() {
schedule("afterRender", () => {
let $invalid = $(".invalid .wizard-focusable");
if ($invalid.length) {
let $element = $(
".invalid input[type=text],.invalid textarea,.invalid input[type=checkbox],.invalid .select-kit"
);
if ($element.length) {
$([document.documentElement, document.body]).animate(
{
scrollTop: $invalid.offset().top - 200,
scrollTop: $element.offset().top - 200,
},
400
);

Datei anzeigen

@ -1,7 +1,7 @@
import computed from "discourse-common/utils/decorators";
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
import I18n from "I18n";
import TextField from "discourse/components/text-field";
import TextField from "@ember/component/text-field";
export default TextField.extend({
attributeBindings: [

Datei anzeigen

@ -1,34 +0,0 @@
<DModal @closeModal={{@closeModal}} @title={{this.title}}>
{{#if loading}}
<LoadingSpinner size="large" />
{{else}}
<div class="edit-directory-columns-container">
{{#each @model.columns as |column|}}
<div class="edit-directory-column">
<div class="left-content">
<label class="column-name">
<Input @type="checkbox" @checked={{column.enabled}} />
{{directory-table-header-title
field=column.label
translated=true
}}
</label>
</div>
</div>
{{/each}}
</div>
{{/if}}
<div class="modal-footer">
<DButton
class="btn-primary"
@label="directory.edit_columns.save"
@action={{action "save"}}
/>
<DButton
class="btn-secondary reset-to-default"
@label="directory.edit_columns.reset_to_default"
@action={{action "resetToDefault"}}
/>
</div>
</DModal>

Datei anzeigen

@ -1,15 +0,0 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
import I18n from "I18n";
export default class AdminWizardsColumnComponent extends Component {
title = I18n.t("admin.wizard.edit_columns");
@action save() {
this.args.closeModal();
}
@action resetToDefault() {
this.args.model.reset();
}
}

Datei anzeigen

@ -1,20 +0,0 @@
<DModal
@closeModal={{@closeModal}}
class="next-session-time-modal"
@title={{this.title}}
>
<DateTimeInput
@date={{this.bufferedDateTime}}
@onChange={{action "dateTimeChanged"}}
@showTime="true"
@clearable="true"
/>
<div class="modal-footer">
<DButton
@action={{action "submit"}}
class="btn-primary"
@label="admin.wizard.after_time_modal.done"
@disabled={{this.submitDisabled}}
/>
</div>
</DModal>

Datei anzeigen

@ -1,30 +0,0 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import I18n from "I18n";
export default class NextSessionScheduledComponent extends Component {
@tracked bufferedDateTime;
title = I18n.t("admin.wizard.after_time_modal.title");
constructor() {
super(...arguments);
this.bufferedDateTime = this.args.model.dateTime
? moment(this.args.model.dateTime)
: moment(Date.now());
}
get submitDisabled() {
return moment().isAfter(this.bufferedDateTime);
}
@action submit() {
const dateTime = this.bufferedDateTime;
this.args.model.update(moment(dateTime).utc().toISOString());
this.args.closeModal();
}
@action dateTimeChanged(dateTime) {
this.bufferedDateTime = dateTime;
}
}

Datei anzeigen

@ -7,7 +7,7 @@ export default Component.extend(Subscription, {
@discourseComputed("subscribed")
subscribedIcon(subscribed) {
return subscribed ? "check" : "times";
return subscribed ? "check" : "dash";
},
@discourseComputed("subscribed")

Datei anzeigen

@ -9,7 +9,8 @@
value=wizardListVal
content=wizardList
onChange=(action "changeWizard")
options=(hash none="admin.wizard.select")
}}
options=(hash
none="admin.wizard.select"
)}}
</div>
</section>

Datei anzeigen

@ -1,10 +1,7 @@
{{#each site.complete_custom_wizard as |wizard|}}
<div class="row">
<div class="alert alert-info alert-wizard">
<a href={{wizard.url}}>{{i18n
"wizard.complete_custom"
name=wizard.name
}}</a>
<a href={{wizard.url}}>{{i18n "wizard.complete_custom" name=wizard.name}}</a>
</div>
</div>
{{/each}}

Datei anzeigen

@ -4,14 +4,10 @@ import CustomWizardApi from "../models/custom-wizard-api";
import { default as discourseComputed } from "discourse-common/utils/decorators";
import { and, equal, not } from "@ember/object/computed";
import { selectKitContent } from "../lib/wizard";
import { underscore } from "@ember/string";
import Controller from "@ember/controller";
import I18n from "I18n";
import { inject as service } from "@ember/service";
export default Controller.extend({
router: service(),
queryParams: ["refresh_list"],
loadingSubscriptions: false,
notAuthorized: not("api.authorized"),
@ -24,8 +20,29 @@ export default Controller.extend({
"application/x-www-form-urlencoded",
]),
successCodes: selectKitContent([
100, 101, 102, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301,
302, 303, 303, 304, 305, 306, 307, 308,
100,
101,
102,
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
303,
304,
305,
306,
307,
308,
]),
@discourseComputed(
@ -101,7 +118,7 @@ export default Controller.extend({
if (authType === "oauth_2") {
this.set("authorizing", true);
ajax(`/admin/wizards/apis/${underscore(name)}/authorize`)
ajax(`/admin/wizards/apis/${name.underscore()}/authorize`)
.catch(popupAjaxError)
.then((result) => {
if (result.success) {
@ -170,11 +187,11 @@ export default Controller.extend({
if (!api[rp]) {
let key = rp.replace("auth", "");
error = `${I18n.t(
`admin.wizard.api.auth.${underscore(key)}`
`admin.wizard.api.auth.${key.underscore()}`
)} is required for ${authType}`;
break;
}
data[underscore(rp)] = api[rp];
data[rp.underscore()] = api[rp];
}
}
@ -204,7 +221,7 @@ export default Controller.extend({
this.set("updating", true);
ajax(`/admin/wizards/api/${underscore(name)}`, {
ajax(`/admin/wizards/api/${name.underscore()}`, {
type: "PUT",
data,
})
@ -227,7 +244,7 @@ export default Controller.extend({
this.set("updating", true);
ajax(`/admin/wizards/api/${underscore(name)}`, {
ajax(`/admin/wizards/api/${name.underscore()}`, {
type: "DELETE",
})
.catch(popupAjaxError)
@ -245,13 +262,13 @@ export default Controller.extend({
return;
}
ajax(`/admin/wizards/api/${underscore(name)}/logs`, {
ajax(`/admin/wizards/api/${name.underscore()}/logs`, {
type: "DELETE",
})
.catch(popupAjaxError)
.then((result) => {
if (result.success) {
this.router.transitionTo("adminWizardsApis").then(() => {
this.transitionToRoute("adminWizardsApis").then(() => {
this.send("refreshModel");
});
}

Datei anzeigen

@ -0,0 +1,14 @@
import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality";
export default Controller.extend(ModalFunctionality, {
actions: {
save() {
this.send("closeModal");
},
resetToDefault() {
this.get("model.reset")();
},
},
});

Datei anzeigen

@ -2,13 +2,11 @@ import Controller from "@ember/controller";
import { empty } from "@ember/object/computed";
import discourseComputed from "discourse-common/utils/decorators";
import { fmt } from "discourse/lib/computed";
import { inject as service } from "@ember/service";
import AdminWizardsColumnsModal from "../components/modal/admin-wizards-columns";
import showModal from "discourse/lib/show-modal";
import CustomWizardAdmin from "../models/custom-wizard-admin";
import { formatModel } from "../lib/wizard-submission";
export default Controller.extend({
modal: service(),
downloadUrl: fmt("wizard.id", "/admin/wizards/submissions/%@/download"),
noResults: empty("submissions"),
page: 0,
@ -59,7 +57,7 @@ export default Controller.extend({
},
showEditColumnsModal() {
return this.modal.show(AdminWizardsColumnsModal, {
return showModal("admin-wizards-columns", {
model: {
columns: this.get("fields"),
reset: () => {

Datei anzeigen

@ -3,8 +3,7 @@ import {
observes,
} from "discourse-common/utils/decorators";
import { notEmpty } from "@ember/object/computed";
import { inject as service } from "@ember/service";
import NextSessionScheduledModal from "../components/modal/next-session-scheduled";
import showModal from "discourse/lib/show-modal";
import { generateId, wizardFieldList } from "../lib/wizard";
import { dasherize } from "@ember/string";
import { later, scheduleOnce } from "@ember/runloop";
@ -14,7 +13,6 @@ import I18n from "I18n";
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
export default Controller.extend({
modal: service(),
hasName: notEmpty("wizard.name"),
@observes("currentStep")
@ -128,13 +126,15 @@ export default Controller.extend({
},
setNextSessionScheduled() {
this.modal.show(NextSessionScheduledModal, {
let controller = showModal("next-session-scheduled", {
model: {
dateTime: this.wizard.after_time_scheduled,
update: (dateTime) =>
this.set("wizard.after_time_scheduled", dateTime),
},
});
controller.setup();
},
copyUrl() {

Datei anzeigen

@ -1,9 +1,7 @@
import Controller from "@ember/controller";
import getUrl from "discourse-common/lib/get-url";
import { inject as service } from "@ember/service";
export default Controller.extend({
router: service(),
wizard: null,
step: null,
@ -17,12 +15,12 @@ export default Controller.extend({
const wizardId = this.get("wizard.id");
window.location.href = getUrl(`/w/${wizardId}/steps/${nextStepId}`);
} else {
this.router.transitionTo("customWizardStep", nextStepId);
this.transitionToRoute("customWizardStep", nextStepId);
}
},
goBack() {
this.router.transitionTo("customWizardStep", this.get("step.previous"));
this.transitionToRoute("customWizardStep", this.get("step.previous"));
},
showMessage(message) {

Datei anzeigen

@ -0,0 +1,27 @@
import { default as discourseComputed } from "discourse-common/utils/decorators";
import Controller from "@ember/controller";
export default Controller.extend({
title: "admin.wizard.after_time_modal.title",
setup() {
this.set("bufferedDateTime", moment(this.model.dateTime));
},
@discourseComputed("bufferedDateTime")
submitDisabled(dateTime) {
return moment().isAfter(dateTime);
},
actions: {
submit() {
const dateTime = this.get("bufferedDateTime");
this.get("model.update")(moment(dateTime).utc().toISOString());
this.send("closeModal");
},
dateTimeChanged(dateTime) {
this.set("bufferedDateTime", dateTime);
},
},
});

Datei anzeigen

@ -0,0 +1,22 @@
import { registerUnbound } from "discourse-common/lib/helpers";
import I18n from "I18n";
import Handlebars from "handlebars";
export default registerUnbound("char-counter", function (body, maxLength) {
let bodyLength = body ? body.length : 0;
let finalString;
if (maxLength) {
let isOverMax = bodyLength > maxLength ? "true" : "false";
finalString = `<div class="body-length" data-length=${bodyLength} data-over-max=${isOverMax}>${bodyLength} / ${I18n.t(
"wizard.x_characters",
{ count: parseInt(maxLength, 10) }
)}</div>`;
} else {
finalString = `<div class="body-length">${I18n.t("wizard.x_characters", {
count: parseInt(bodyLength, 10),
})}</div>`;
}
return new Handlebars.SafeString(finalString);
});

Datei anzeigen

@ -1,25 +0,0 @@
import { registerUnbound } from "discourse-common/lib/helpers";
import I18n from "I18n";
import Handlebars from "handlebars";
export default registerUnbound(
"wizard-char-counter",
function (body, maxLength) {
let bodyLength = body ? body.length : 0;
let finalString;
if (maxLength) {
let isOverMax = bodyLength > maxLength ? "true" : "false";
finalString = `<div class="body-length" data-length=${bodyLength} data-over-max=${isOverMax}>${bodyLength} / ${I18n.t(
"wizard.x_characters",
{ count: parseInt(maxLength, 10) }
)}</div>`;
} else {
finalString = `<div class="body-length">${I18n.t("wizard.x_characters", {
count: parseInt(bodyLength, 10),
})}</div>`;
}
return new Handlebars.SafeString(finalString);
}
);

Datei anzeigen

@ -69,10 +69,7 @@ export default {
},
_wizardInsertText(text, options) {
if (
this.session.wizardEventFieldId === this.fieldId &&
this.element
) {
if (this.session.wizardEventFieldId === this.fieldId) {
this.insertText(text, options);
}
},
@ -83,16 +80,6 @@ export default {
}
},
});
api.modifyClass("component:category-chooser", {
categoriesByScope(options = {}) {
let categories = this._super(options);
return categories.filter((category) => {
return !category.custom_fields?.create_topic_wizard;
});
},
});
});
},
};

Datei anzeigen

@ -1,16 +1,14 @@
import DiscourseURL from "discourse/lib/url";
import { withPluginApi } from "discourse/lib/plugin-api";
import { dasherize } from "@ember/string";
import ApplicationRoute from "discourse/routes/application";
export default {
name: "custom-wizard-redirect",
after: "message-bus",
initialize(container) {
initialize: function (container) {
const messageBus = container.lookup("service:message-bus");
const siteSettings = container.lookup("service:site-settings");
if (!siteSettings.custom_wizard_enabled) {
if (!siteSettings.custom_wizard_enabled || !messageBus) {
return;
}
@ -19,27 +17,28 @@ export default {
window.location.href = wizardUrl;
});
withPluginApi("0.8.36", (api) => {
api.onAppEvent("page:changed", (data) => {
const currentUser = api.getCurrentUser();
if (currentUser) {
const redirectToWizard = currentUser.redirect_to_wizard;
const excludedPaths = siteSettings.wizard_redirect_exclude_paths
ApplicationRoute.reopen({
actions: {
willTransition(transition) {
const redirectToWizard = this.get("currentUser.redirect_to_wizard");
const excludedPaths = this.siteSettings.wizard_redirect_exclude_paths
.split("|")
.concat(["loading"]);
if (
redirectToWizard &&
!data.url.includes("ignore_redirect") &&
data.currentRouteName !== "customWizardStep" &&
(!transition.intent.name ||
!excludedPaths.find((p) => {
return data.currentRouteName.indexOf(p) > -1;
})
return transition.intent.name.indexOf(p) > -1;
}))
) {
DiscourseURL.routeTo(`/w/${dasherize(redirectToWizard)}`);
transition.abort();
window.location = "/w/" + redirectToWizard.dasherize();
}
}
});
return this._super(transition);
},
},
});
},
};

Datei anzeigen

@ -35,7 +35,6 @@ function inputTypesContent(options = {}) {
const connectors = {
pair: [
"equal",
"not_equal",
"greater",
"less",
"greater_or_equal",

Datei anzeigen

@ -244,7 +244,6 @@ const custom_field = {
export function buildFieldTypes(types) {
wizardSchema.field.types = types;
wizardSchema.field.type = Object.keys(types);
}
field.type = Object.keys(field.types);

Datei anzeigen

@ -72,7 +72,7 @@ export default EmberObject.extend(ValidState, {
valid = true;
}
this.setValid(Boolean(valid));
this.setValid(valid);
return valid;
},

Datei anzeigen

@ -1,10 +1,7 @@
import CustomWizardApi from "../models/custom-wizard-api";
import DiscourseRoute from "discourse/routes/discourse";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model(params) {
if (params.name === "create") {
return CustomWizardApi.create({ isNew: true });
@ -13,12 +10,6 @@ export default DiscourseRoute.extend({
}
},
afterModel(model) {
if (model === null) {
return this.router.transitionTo("adminWizardsApi");
}
},
setupController(controller, model) {
controller.set("api", model);
},

Datei anzeigen

@ -1,10 +1,7 @@
import DiscourseRoute from "discourse/routes/discourse";
import CustomWizardApi from "../models/custom-wizard-api";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model() {
return CustomWizardApi.list();
},
@ -28,11 +25,11 @@ export default DiscourseRoute.extend({
actions: {
changeApi(apiName) {
this.controllerFor("adminWizardsApi").set("apiName", apiName);
this.router.transitionTo("adminWizardsApiShow", apiName);
this.transitionTo("adminWizardsApiShow", apiName);
},
afterDestroy() {
this.router.transitionTo("adminWizardsApi").then(() => this.refresh());
this.transitionTo("adminWizardsApi").then(() => this.refresh());
},
afterSave(apiName) {
@ -41,7 +38,7 @@ export default DiscourseRoute.extend({
createApi() {
this.controllerFor("adminWizardsApi").set("apiName", "create");
this.router.transitionTo("adminWizardsApiShow", "create");
this.transitionTo("adminWizardsApiShow", "create");
},
},
});

Datei anzeigen

@ -1,21 +1,12 @@
import CustomWizardLogs from "../models/custom-wizard-logs";
import DiscourseRoute from "discourse/routes/discourse";
import { A } from "@ember/array";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model(params) {
return CustomWizardLogs.list(params.wizardId);
},
afterModel(model) {
if (model === null) {
return this.router.transitionTo("adminWizardsLogs");
}
},
setupController(controller, model) {
controller.setProperties({
wizard: model.wizard,

Datei anzeigen

@ -1,10 +1,7 @@
import DiscourseRoute from "discourse/routes/discourse";
import { ajax } from "discourse/lib/ajax";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model() {
return ajax(`/admin/wizards/wizard`);
},
@ -21,7 +18,7 @@ export default DiscourseRoute.extend({
actions: {
changeWizard(wizardId) {
this.controllerFor("adminWizardsLogs").set("wizardId", wizardId);
this.router.transitionTo("adminWizardsLogsShow", wizardId);
this.transitionTo("adminWizardsLogsShow", wizardId);
},
},
});

Datei anzeigen

@ -2,21 +2,12 @@ import { A } from "@ember/array";
import CustomWizardAdmin from "../models/custom-wizard-admin";
import DiscourseRoute from "discourse/routes/discourse";
import { formatModel } from "../lib/wizard-submission";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model(params) {
return CustomWizardAdmin.submissions(params.wizardId);
},
afterModel(model) {
if (model === null) {
return this.router.transitionTo("adminWizardsSubmissions");
}
},
setupController(controller, model) {
const { fields, submissions } = formatModel(model);

Datei anzeigen

@ -1,10 +1,7 @@
import DiscourseRoute from "discourse/routes/discourse";
import { ajax } from "discourse/lib/ajax";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model() {
return ajax(`/admin/wizards/wizard`);
},
@ -21,7 +18,7 @@ export default DiscourseRoute.extend({
actions: {
changeWizard(wizardId) {
this.controllerFor("adminWizardsSubmissions").set("wizardId", wizardId);
this.router.transitionTo("adminWizardsSubmissionsShow", wizardId);
this.transitionTo("adminWizardsSubmissionsShow", wizardId);
},
},
});

Datei anzeigen

@ -2,11 +2,8 @@ import CustomWizardAdmin from "../models/custom-wizard-admin";
import { ajax } from "discourse/lib/ajax";
import DiscourseRoute from "discourse/routes/discourse";
import I18n from "I18n";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model(params) {
if (params.wizardId === "create") {
return { create: true };
@ -17,7 +14,7 @@ export default DiscourseRoute.extend({
afterModel(model) {
if (model.none) {
return this.router.transitionTo("adminWizardsWizard");
return this.transitionTo("adminWizardsWizard");
}
},

Datei anzeigen

@ -4,11 +4,8 @@ import EmberObject, { set } from "@ember/object";
import { A } from "@ember/array";
import { all } from "rsvp";
import { ajax } from "discourse/lib/ajax";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model() {
return ajax("/admin/wizards/wizard");
},
@ -83,14 +80,14 @@ export default DiscourseRoute.extend({
this.controllerFor("adminWizardsWizard").set("wizardId", wizardId);
if (wizardId) {
this.router.transitionTo("adminWizardsWizardShow", wizardId);
this.transitionTo("adminWizardsWizardShow", wizardId);
} else {
this.router.transitionTo("adminWizardsWizard");
this.transitionTo("adminWizardsWizard");
}
},
afterDestroy() {
this.router.transitionTo("adminWizardsWizard").then(() => this.refresh());
this.transitionTo("adminWizardsWizard").then(() => this.refresh());
},
afterSave(wizardId) {
@ -99,7 +96,7 @@ export default DiscourseRoute.extend({
createWizard() {
this.controllerFor("adminWizardsWizard").set("wizardId", "create");
this.router.transitionTo("adminWizardsWizardShow", "create");
this.transitionTo("adminWizardsWizardShow", "create");
},
},
});

Datei anzeigen

@ -1,10 +1,7 @@
import DiscourseRoute from "discourse/routes/discourse";
import { ajax } from "discourse/lib/ajax";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({
router: service(),
model() {
return ajax("/admin/wizards");
},
@ -20,7 +17,7 @@ export default DiscourseRoute.extend({
afterModel(model, transition) {
if (transition.targetName === "adminWizards.index") {
this.router.transitionTo("adminWizardsWizard");
this.transitionTo("adminWizardsWizard");
}
},
});

Datei anzeigen

@ -1,14 +1,11 @@
import { getCachedWizard } from "../models/custom-wizard";
import Route from "@ember/routing/route";
import { inject as service } from "@ember/service";
export default Route.extend({
router: service(),
beforeModel() {
const wizard = getCachedWizard();
if (wizard && wizard.permitted && !wizard.completed && wizard.start) {
this.router.replaceWith("customWizardStep", wizard.start);
this.replaceWith("customWizardStep", wizard.start);
}
},

Datei anzeigen

@ -1,19 +1,14 @@
import I18n from "I18n";
import { getCachedWizard } from "../models/custom-wizard";
import Route from "@ember/routing/route";
import { scrollTop } from "discourse/mixins/scroll-top";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
export default Route.extend({
router: service(),
beforeModel() {
const wizard = getCachedWizard();
this.set("wizard", wizard);
if (!wizard || !wizard.permitted || wizard.completed) {
this.router.replaceWith("customWizard");
this.replaceWith("customWizard");
}
},
@ -30,7 +25,7 @@ export default Route.extend({
afterModel(model) {
if (model.completed) {
return this.router.transitionTo("wizard.index");
return this.transitionTo("wizard.index");
}
return model.set("wizardId", this.wizard.id);
},
@ -53,10 +48,4 @@ export default Route.extend({
controller.setProperties(props);
},
@action
didTransition() {
scrollTop();
return true;
},
});

Datei anzeigen

@ -1,7 +1,6 @@
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
import I18n from "I18n";
import DiscourseRoute from "discourse/routes/discourse";
import bootbox from "bootbox";
export default DiscourseRoute.extend({
titleToken() {

Datei anzeigen

@ -8,12 +8,7 @@
{{/if}}
{{/if}}
{{d-button
label="admin.wizard.api.save"
action=(action "save")
class="btn-primary"
disabled=saveDisabled
}}
{{d-button label="admin.wizard.api.save" action=(action "save") class="btn-primary" disabled=saveDisabled}}
{{#if showRemove}}
{{d-button action=(action "remove") label="admin.wizard.api.remove"}}
@ -37,19 +32,13 @@
<div class="metadata">
<div class="title">
<label>{{i18n "admin.wizard.api.title"}}</label>
<Input
@value={{this.api.title}}
placeholder={{i18n "admin.wizard.api.title_placeholder"}}
/>
{{input value=api.title placeholder=(i18n "admin.wizard.api.title_placeholder")}}
</div>
<div class="name {{nameClass}}">
<label>{{i18n "admin.wizard.api.name"}}</label>
{{#if api.isNew}}
<Input
@value={{this.api.name}}
placeholder={{i18n "admin.wizard.api.name_placeholder"}}
/>
{{input value=api.name placeholder=(i18n "admin.wizard.api.name_placeholder")}}
{{else}}
<span>{{api.name}}</span>
{{/if}}
@ -67,12 +56,10 @@
<span>{{authErrorMessage}}</span>
{{/if}}
{{/if}}
{{d-button
label="admin.wizard.api.auth.btn"
{{d-button label="admin.wizard.api.auth.btn"
action=(action "authorize")
disabled=authDisabled
class="btn-primary"
}}
class="btn-primary"}}
{{/if}}
</div>
@ -106,8 +93,9 @@
value=api.authType
content=authorizationTypes
onChange=(action (mut api.authType))
options=(hash none="admin.wizard.api.auth.type_none")
}}
options=(hash
none="admin.wizard.api.auth.type_none"
)}}
</div>
</div>
@ -116,7 +104,7 @@
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.url"}}</label>
<div class="controls">
<Input @value={{this.api.authUrl}} />
{{input value=api.authUrl}}
</div>
</div>
{{/if}}
@ -124,21 +112,21 @@
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.token_url"}}</label>
<div class="controls">
<Input @value={{this.api.tokenUrl}} />
{{input value=api.tokenUrl}}
</div>
</div>
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.client_id"}}</label>
<div class="controls">
<Input @value={{this.api.clientId}} />
{{input value=api.clientId}}
</div>
</div>
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.client_secret"}}</label>
<div class="controls">
<Input @value={{this.api.clientSecret}} />
{{input value=api.clientSecret}}
</div>
</div>
@ -147,26 +135,12 @@
<div class="controls">
{{#each api.authParams as |param|}}
<div class="param">
<Input
@value={{this.param.key}}
placeholder={{i18n "admin.wizard.key"}}
/>
<Input
@value={{this.param.value}}
placeholder={{i18n "admin.wizard.value"}}
/>
{{d-button
action=(action "removeParam")
actionParam=param
icon="times"
}}
{{input value=param.key placeholder=(i18n "admin.wizard.key")}}
{{input value=param.value placeholder=(i18n "admin.wizard.value")}}
{{d-button action=(action "removeParam") actionParam=param icon="times"}}
</div>
{{/each}}
{{d-button
label="admin.wizard.api.auth.params.new"
icon="plus"
action=(action "addParam")
}}
{{d-button label="admin.wizard.api.auth.params.new" icon="plus" action=(action "addParam")}}
</div>
</div>
{{/if}}
@ -175,14 +149,14 @@
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.username"}}</label>
<div class="controls">
<Input @value={{this.api.username}} />
{{input value=api.username}}
</div>
</div>
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.password"}}</label>
<div class="controls">
<Input @value={{this.api.password}} />
{{input value=api.password}}
</div>
</div>
{{/if}}
@ -251,11 +225,7 @@
</div>
<div class="wizard-api-endpoints">
{{d-button
action=(action "addEndpoint")
label="admin.wizard.api.endpoint.add"
icon="plus"
}}
{{d-button action=(action "addEndpoint") label="admin.wizard.api.endpoint.add" icon="plus"}}
{{#if api.endpoints}}
<div class="endpoint-list">
@ -265,43 +235,38 @@
<div class="endpoint">
<div class="endpoint-">
<div class="top">
<Input
@value={{endpoint.name}}
placeholder={{i18n "admin.wizard.api.endpoint.name"}}
/>
<Input
@value={{endpoint.url}}
placeholder={{i18n "admin.wizard.api.endpoint.url"}}
class="endpoint-url"
/>
{{d-button
action=(action "removeEndpoint")
{{input value=endpoint.name
placeholder=(i18n "admin.wizard.api.endpoint.name")}}
{{input value=endpoint.url
placeholder=(i18n "admin.wizard.api.endpoint.url")
class="endpoint-url"}}
{{d-button action=(action "removeEndpoint")
actionParam=endpoint
icon="times"
class="remove-endpoint"
}}
class="remove-endpoint"}}
</div>
<div class="bottom">
{{combo-box
content=endpointMethods
value=endpoint.method
onChange=(action (mut endpoint.method))
options=(hash none="admin.wizard.api.endpoint.method")
}}
options=(hash
none="admin.wizard.api.endpoint.method"
)}}
{{combo-box
content=contentTypes
value=endpoint.content_type
onChange=(action (mut endpoint.content_type))
options=(hash none="admin.wizard.api.endpoint.content_type")
}}
options=(hash
none="admin.wizard.api.endpoint.content_type"
)}}
{{multi-select
value=endpoint.success_codes
content=successCodes
onChange=(action (mut endpoint.success_codes))
options=(hash
none="admin.wizard.api.endpoint.success_codes"
)
}}
)}}
</div>
</div>
</div>
@ -319,8 +284,7 @@
{{d-button
action=(action "clearLogs")
class="clear-logs"
label="admin.wizard.api.log.clear"
}}
label="admin.wizard.api.log.clear"}}
</div>
</div>
@ -340,10 +304,7 @@
<td>{{logentry.time}}</td>
<td class="user-image">
<div class="user-image-inner">
<a
href={{logentry.userpath}}
data-user-card={{logentry.username}}
>{{avatar logentry imageSize="medium"}}</a>
<a href={{logentry.userpath}} data-user-card={{logentry.username}}>{{avatar logentry imageSize="medium"}}</a>
</div>
</td>
<td>{{logentry.status}}</td>

Datei anzeigen

@ -3,14 +3,14 @@
value=apiName
content=apiList
onChange=(route-action "changeApi")
options=(hash none="admin.wizard.api.select")
}}
options=(hash
none="admin.wizard.api.select"
)}}
{{d-button
action=(route-action "createApi")
label="admin.wizard.api.create"
icon="plus"
}}
icon="plus"}}
</div>
<div class="admin-wizard-container">

Datei anzeigen

@ -5,8 +5,7 @@
{{d-button
label="admin.wizard.custom_field.add"
icon="plus"
action=(action "addField")
}}
action=(action "addField")}}
</div>
</div>
@ -15,8 +14,7 @@
opts=messageOpts
type=messageType
url=documentationUrl
component="custom_fields"
}}
component="custom_fields"}}
<div class="admin-wizard-container">
{{#if customFields}}
@ -34,8 +32,7 @@
{{custom-field-input
field=field
removeField=(action "removeField")
saveField=(action "saveField")
}}
saveField=(action "saveField")}}
{{/each}}
</tbody>
</table>

Datei anzeigen

@ -9,8 +9,7 @@
label="refresh"
icon="sync"
action=(action "refresh")
class="refresh"
}}
class="refresh"}}
</div>
</div>
@ -32,10 +31,7 @@
{{#each logs as |log|}}
<tr>
{{#each-in log as |field value|}}
<td class="small">{{wizard-table-field
field=field
value=value
}}</td>
<td class="small">{{wizard-table-field field=field value=value}}</td>
{{/each-in}}
</tr>
{{/each}}

Datei anzeigen

@ -3,16 +3,16 @@
value=wizardId
content=wizardList
onChange=(route-action "changeWizard")
options=(hash none="admin.wizard.select")
}}
options=(hash
none="admin.wizard.select"
)}}
</div>
{{wizard-message
key=messageKey
opts=messageOpts
url=documentationUrl
component="logs"
}}
component="logs"}}
<div class="admin-wizard-container">
{{outlet}}

Datei anzeigen

@ -11,35 +11,30 @@
</div>
{{/if}}
<Input
{{input
id="custom-wizard-file-upload"
@type="file"
type="file"
accept="application/json"
{{on "input" (action "setFile")}}
/>
input=(action "setFile")}}
{{d-button
id="upload-button"
label="admin.wizard.manager.upload"
action=(action "upload")
}}
action=(action "upload")}}
{{d-button
id="import-button"
label="admin.wizard.manager.import"
action=(action "import")
disabled=importDisabled
}}
disabled=importDisabled}}
{{d-button
id="export-button"
label="admin.wizard.manager.export"
action=(action "export")
disabled=exportDisabled
}}
disabled=exportDisabled}}
{{d-button
id="destroy-button"
label="admin.wizard.manager.destroy"
action=(action "destroy")
disabled=destoryDisabled
}}
disabled=destoryDisabled}}
</div>
</div>
@ -50,8 +45,7 @@
opts=messageOpts
items=messageItems
loading=loading
component="manager"
}}
component="manager"}}
<div class="admin-wizard-container">
<table class="table grid">
@ -71,18 +65,16 @@
{{/link-to}}
</td>
<td class="control-column">
<Input
@type="checkbox"
{{input
type="checkbox"
class="export"
{{on "change" (action "selectWizard")}}
/>
change=(action "selectWizard")}}
</td>
<td class="control-column">
<Input
@type="checkbox"
{{input
type="checkbox"
class="destroy"
{{on "change" (action "selectWizard")}}
/>
change=(action "selectWizard")}}
</td>
</tr>
{{/each}}

Datei anzeigen

@ -3,16 +3,16 @@
value=wizardId
content=wizardList
onChange=(route-action "changeWizard")
options=(hash none="admin.wizard.select")
}}
options=(hash
none="admin.wizard.select"
)}}
</div>
{{wizard-message
key=messageKey
opts=messageOpts
url=documentationUrl
component="submissions"
}}
component="submissions"}}
<div class="admin-wizard-container">
{{outlet}}

Datei anzeigen

@ -1,31 +1,18 @@
{{#if wizard}}
<div class="wizard-header large">
<Input
@value={{this.wizard.name}}
{{input
name="name"
placeholder={{i18n "admin.wizard.name_placeholder"}}
/>
value=wizard.name
placeholderKey="admin.wizard.name_placeholder"}}
<div class="wizard-url">
{{#if wizard.name}}
{{#if copiedUrl}}
{{d-button
class="btn-hover pull-right"
icon="copy"
label="ip_lookup.copied"
}}
{{d-button class="btn-hover pull-right" icon="copy" label="ip_lookup.copied"}}
{{else}}
{{d-button
action=(action "copyUrl")
class="pull-right no-text"
icon="copy"
}}
{{d-button action=(action "copyUrl") class="pull-right no-text" icon="copy"}}
{{/if}}
<a
href={{wizardUrl}}
target="_blank"
rel="noopener noreferrer"
>{{wizardUrl}}</a>
<a href={{wizardUrl}} target="_blank" rel="noopener noreferrer">{{wizardUrl}}</a>
{{/if}}
</div>
</div>
@ -36,12 +23,11 @@
<label>{{i18n "admin.wizard.background"}}</label>
</div>
<div class="setting-value">
<Input
@value={{this.wizard.background}}
{{input
name="background"
placeholder={{i18n "admin.wizard.background_placeholder"}}
class="small"
/>
value=wizard.background
placeholderKey="admin.wizard.background_placeholder"
class="small"}}
</div>
</div>
@ -55,8 +41,9 @@
valueProperty="id"
value=wizard.theme_id
onChange=(action (mut wizard.theme_id))
options=(hash none="admin.wizard.no_theme")
}}
options=(hash
none="admin.wizard.no_theme"
)}}
</div>
</div>
</div>
@ -71,7 +58,7 @@
<label>{{i18n "admin.wizard.save_submissions"}}</label>
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.wizard.save_submissions}} />
{{input type="checkbox" checked=wizard.save_submissions}}
<span>{{i18n "admin.wizard.save_submissions_label"}}</span>
</div>
</div>
@ -81,7 +68,7 @@
<label>{{i18n "admin.wizard.multiple_submissions"}}</label>
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.wizard.multiple_submissions}} />
{{input type="checkbox" checked=wizard.multiple_submissions}}
<span>{{i18n "admin.wizard.multiple_submissions_label"}}</span>
</div>
</div>
@ -91,7 +78,7 @@
<label>{{i18n "admin.wizard.after_signup"}}</label>
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.wizard.after_signup}} />
{{input type="checkbox" checked=wizard.after_signup}}
<span>{{i18n "admin.wizard.after_signup_label"}}</span>
</div>
</div>
@ -101,7 +88,7 @@
<label>{{i18n "admin.wizard.prompt_completion"}}</label>
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.wizard.prompt_completion}} />
{{input type="checkbox" checked=wizard.prompt_completion}}
<span>{{i18n "admin.wizard.prompt_completion_label"}}</span>
</div>
</div>
@ -111,14 +98,13 @@
<label>{{i18n "admin.wizard.after_time"}}</label>
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.wizard.after_time}} />
{{input type="checkbox" checked=wizard.after_time}}
<span>{{i18n "admin.wizard.after_time_label"}}</span>
{{d-button
action=(action "setNextSessionScheduled")
translatedLabel=nextSessionScheduledLabel
class="btn-after-time"
icon="far-calendar"
}}
icon="far-calendar"}}
</div>
</div>
@ -128,7 +114,7 @@
<label>{{i18n "admin.wizard.required"}}</label>
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.wizard.required}} />
{{input type="checkbox" checked=wizard.required}}
<span>{{i18n "admin.wizard.required_label"}}</span>
</div>
</div>
@ -138,7 +124,7 @@
<label>{{i18n "admin.wizard.restart_on_revisit"}}</label>
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.wizard.restart_on_revisit}} />
{{input type="checkbox" checked=wizard.restart_on_revisit}}
<span>{{i18n "admin.wizard.restart_on_revisit_label"}}</span>
</div>
</div>
@ -158,14 +144,16 @@
userFieldSelection="key"
textSelection="value"
inputConnector="and"
)
}}
)}}
</div>
</div>
{{/wizard-subscription-container}}
</div>
{{wizard-links itemType="step" current=currentStep items=wizard.steps}}
{{wizard-links
itemType="step"
current=currentStep
items=wizard.steps}}
{{#if currentStep}}
{{wizard-custom-step
@ -174,16 +162,14 @@
currentField=currentField
wizardFields=wizardFields
fieldTypes=filteredFieldTypes
subscribed=subscribed
}}
subscribed=subscribed}}
{{/if}}
{{wizard-links
itemType="action"
current=currentAction
items=wizard.actions
generateLabels=true
}}
generateLabels=true}}
{{#each wizard.actions as |wizardAction|}}
{{wizard-custom-action
@ -193,17 +179,11 @@
apis=apis
removeAction="removeAction"
wizardFields=wizardFields
fieldTypes=filteredFieldTypes
}}
fieldTypes=filteredFieldTypes}}
{{/each}}
<div class="admin-wizard-buttons">
<button
{{action "save"}}
disabled={{disableSave}}
class="btn btn-primary"
type="button"
>
<button {{action "save"}} disabled={{disableSave}} class="btn btn-primary" type="button">
{{i18n "admin.wizard.save"}}
</button>

Datei anzeigen

@ -3,17 +3,20 @@
value=wizardListVal
content=wizardList
onChange=(route-action "changeWizard")
options=(hash none="admin.wizard.select")
}}
options=(hash
none="admin.wizard.select"
)}}
{{d-button
action=(route-action "createWizard")
label="admin.wizard.create"
icon="plus"
}}
icon="plus"}}
</div>
{{wizard-message key=messageKey url=messageUrl component="wizard"}}
{{wizard-message
key=messageKey
url=messageUrl
component="wizard"}}
<div class="admin-wizard-container settings">
{{outlet}}

Datei anzeigen

@ -1,21 +1,12 @@
{{#admin-nav}}
{{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}}
{{nav-item
route="adminWizardsCustomFields"
label="admin.wizard.custom_field.nav_label"
}}
{{nav-item
route="adminWizardsSubmissions"
label="admin.wizard.submissions.nav_label"
}}
{{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}}
{{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}}
{{#if showApi}}
{{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}}
{{/if}}
{{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}}
{{nav-item
route="adminWizardsManager"
label="admin.wizard.manager.nav_label"
}}
{{nav-item route="adminWizardsManager" label="admin.wizard.manager.nav_label"}}
<div class="admin-actions">
{{wizard-subscription-badge}}

Datei anzeigen

@ -5,8 +5,9 @@
feature="custom_field"
attribute="klass"
onChange=(action (mut field.klass))
options=(hash none="admin.wizard.custom_field.klass.select")
}}
options=(hash
none="admin.wizard.custom_field.klass.select"
)}}
</td>
<td>
{{wizard-subscription-selector
@ -14,22 +15,23 @@
feature="custom_field"
attribute="type"
onChange=(action (mut field.type))
options=(hash none="admin.wizard.custom_field.type.select")
}}
options=(hash
none="admin.wizard.custom_field.type.select"
)}}
</td>
<td class="input">
<Input
@value={{this.field.name}}
placeholder={{i18n "admin.wizard.custom_field.name.select"}}
/>
{{input
value=field.name
placeholder=(i18n "admin.wizard.custom_field.name.select")}}
</td>
<td class="multi-select">
{{multi-select
value=field.serializers
content=serializerContent
onChange=(action (mut field.serializers))
options=(hash none="admin.wizard.custom_field.serializers.select")
}}
options=(hash
none="admin.wizard.custom_field.serializers.select"
)}}
</td>
<td class="actions">
{{#if loading}}
@ -43,15 +45,16 @@
action=(action "destroy")
icon="trash-alt"
class="destroy"
disabled=destroyDisabled
}}
disabled=destroyDisabled}}
{{d-button
icon="save"
action=(action "save")
disabled=saveDisabled
class="save"
}}
{{d-button action=(action "close") icon="times" disabled=closeDisabled}}
class="save"}}
{{d-button
action=(action "close")
icon="times"
disabled=closeDisabled}}
</td>
{{else}}
<td><label>{{field.klass}}</label></td>

Datei anzeigen

@ -14,8 +14,7 @@
wizardComposer=true
fieldId=field.id
disabled=disableTextarea
outletArgs=(hash composer=composer editorType="composer")
}}
outletArgs=(hash composer=composer editorType="composer")}}
<input
type="file"
@ -23,4 +22,4 @@
class="wizard-composer-upload"
accept={{allowedFileTypes}}
multiple
/>
>

Datei anzeigen

@ -1,11 +1,11 @@
<Input
@type={{this.inputType}}
@value={{readonly this.value}}
{{input
type=inputType
class="date-picker"
placeholder={{this.placeholder}}
tabindex={{this.tabindex}}
{{on "input" (action "onChangeDate")}}
placeholder=placeholder
value=(readonly value)
input=(action "onChangeDate")
tabindex=tabindex
autocomplete="off"
/>
}}
<div class="picker-container"></div>

Datei anzeigen

@ -26,5 +26,9 @@
{{/if}}
{{#if clearable}}
{{d-button class="clear-date-time" icon="times" action=(action "onClear")}}
{{d-button
class="clear-date-time"
icon="times"
action=(action "onClear")
}}
{{/if}}

Datei anzeigen

@ -2,7 +2,7 @@
<div class="d-editor-container">
{{#if showPreview}}
<div class="d-editor-preview-wrapper {{if forcePreview 'force-preview'}}">
<div class="d-editor-preview-wrapper {{if forcePreview "force-preview"}}">
<div class="d-editor-preview">
{{html-safe preview}}
</div>
@ -18,16 +18,13 @@
onExpand=(action b.action b)
class=b.className
content=popupMenuOptions
options=(hash popupTitle=b.title icon=b.icon)
}}
options=(hash
popupTitle=b.title
icon=b.icon
)}}
{{else}}
<div>{{d.icon}}</div>
<button
class="wizard-btn {{b.className}}"
{{action b.action b}}
title={{b.title}}
type="button"
>
<button class="wizard-btn {{b.className}}" {{action b.action b}} title={{b.title}} type="button">
{{d-icon b.icon}}
{{#if b.label}}
<span class="d-button-label">{{i18n b.label}}</span>
@ -43,12 +40,7 @@
</div>
{{conditional-loading-spinner condition=loading}}
<Textarea
tabindex={{this.tabindex}}
@value={{this.value}}
class="d-editor-input"
placeholder={{this.placeholder}}
/>
{{textarea tabindex=tabindex value=value class="d-editor-input" placeholder=placeholder}}
</div>
{{/if}}
</div>

Datei anzeigen

@ -1,8 +1,8 @@
{{custom-wizard-category-selector
categories=categories
class=fieldClass
whitelist=field.content
onChange=(action (mut categories))
tabindex=field.tabindex
options=(hash maximum=field.limit)
}}
options=(hash
maximum=field.limit
)}}

Datei anzeigen

@ -1,7 +1 @@
<Input
id={{this.field.id}}
@type="checkbox"
@checked={{this.field.value}}
tabindex={{this.field.tabindex}}
class={{this.fieldClass}}
/>
{{input type="checkbox" id=field.id checked=field.value tabindex=field.tabindex}}

Datei anzeigen

@ -2,24 +2,18 @@
field=field
composer=composer
wizard=wizard
fieldClass=fieldClass
groupsMentioned=(action "groupsMentioned")
cannotSeeMention=(action "cannotSeeMention")
importQuote=(action "importQuote")
togglePreview=(action "togglePreview")
afterRefresh=(action "afterRefresh")
}}
afterRefresh=(action "afterRefresh")}}
<div class="bottom-bar">
<button
class="wizard-btn toggle-preview"
{{action "togglePreview"}}
type="button"
>
<button class="wizard-btn toggle-preview" {{action "togglePreview"}} type="button">
<span class="d-button-label">{{i18n togglePreviewLabel}}</span>
</button>
{{#if field.char_counter}}
{{wizard-char-counter field.value field.max_length}}
{{char-counter field.value field.max_length}}
{{/if}}
</div>

Datei anzeigen

@ -4,5 +4,6 @@
content=field.content
tabindex=field.tabindex
onChange=(action "onChangeValue")
options=(hash none="select_kit.default_header_text")
}}
options=(hash
none="select_kit.default_header_text"
)}}

Datei anzeigen

@ -1,10 +1,10 @@
{{custom-wizard-group-selector
groups=site.groups
class=fieldClass
field=field
whitelist=field.content
value=field.value
tabindex=field.tabindex
onChange=(action (mut field.value))
options=(hash none="select_kit.default_header_text")
}}
options=(hash
none="select_kit.default_header_text"
)}}

Datei anzeigen

@ -1,8 +1 @@
<Input
id={{this.field.id}}
step="0.01"
@type="number"
@value={{this.field.value}}
tabindex={{this.field.tabindex}}
class={{this.fieldClass}}
/>
{{input type="number" step="0.01" id=field.id value=field.value tabindex=field.tabindex}}

Datei anzeigen

@ -1,8 +1,9 @@
{{custom-wizard-tag-chooser
tags=field.value
class=fieldClass
tabindex=field.tabindex
tagGroups=field.tag_groups
everyTag=true
options=(hash maximum=field.limit allowAny=field.can_create_tag)
}}
options=(hash
maximum=field.limit
allowAny=field.can_create_tag
)}}

Datei anzeigen

@ -1,8 +1 @@
<Input
id={{this.field.id}}
@value={{this.field.value}}
tabindex={{this.field.tabindex}}
class={{this.fieldClass}}
placeholder={{this.field.translatedPlaceholder}}
autocomplete={{this.autocomplete}}
/>
{{input id=field.id value=field.value class=fieldClass placeholder=field.translatedPlaceholder tabindex=field.tabindex autocomplete=autocomplete}}

Datei anzeigen

@ -1,7 +1 @@
<Textarea
id={{this.field.id}}
@value={{this.field.value}}
tabindex={{this.field.tabindex}}
class={{this.fieldClass}}
placeholder={{this.field.translatedPlaceholder}}
/>
{{textarea id=field.id value=field.value class=fieldClass placeholder=field.translatedPlaceholder tabindex=field.tabindex}}

Datei anzeigen

@ -1,7 +1,4 @@
<label
class="wizard-btn wizard-btn-upload-file {{if uploading 'disabled'}}"
tabindex={{field.tabindex}}
>
<label class="wizard-btn wizard-btn-upload-file {{if uploading "disabled"}}" tabindex={{field.tabindex}}>
{{#if uploading}}
{{i18n "wizard.uploading"}}
{{else}}
@ -9,18 +6,12 @@
{{d-icon "upload"}}
{{/if}}
<input
disabled={{uploading}}
class="hidden-upload-field"
type="file"
accept={{field.file_types}}
style="visibility: hidden; position: absolute;"
/>
<input disabled={{uploading}} class="hidden-upload-field" type="file" accept={{field.file_types}} style="visibility: hidden; position: absolute;" >
</label>
{{#if field.value}}
{{#if isImage}}
<img src={{field.value.url}} class="wizard-image-preview" />
<img src={{field.value.url}} class="wizard-image-preview">
{{else}}
{{field.value.original_filename}}
{{/if}}

Datei anzeigen

@ -1,6 +1 @@
<Input
id={{this.field.id}}
@value={{this.field.value}}
tabindex={{this.field.tabindex}}
class={{this.fieldClass}}
/>
{{input type="text" id=field.id value=field.value tabindex=field.tabindex}}

Datei anzeigen

@ -1,5 +1,4 @@
{{custom-user-selector
usernames=field.value
placeholderKey=field.placeholder
tabindex=field.tabindex
}}
tabindex=field.tabindex}}

Datei anzeigen

@ -3,7 +3,7 @@
</label>
{{#if field.image}}
<div class="field-image"><img src={{field.image}} /></div>
<div class="field-image"><img src={{field.image}}></div>
{{/if}}
{{#if field.description}}
@ -13,26 +13,17 @@
{{#field-validators field=field as |validators|}}
{{#if inputComponentName}}
<div class="input-area">
{{component
inputComponentName
field=field
step=step
fieldClass=fieldClass
wizard=wizard
autocomplete=validators.autocomplete
}}
{{component inputComponentName field=field step=step fieldClass=fieldClass wizard=wizard autocomplete=validators.autocomplete}}
</div>
{{/if}}
{{/field-validators}}
{{#if field.char_counter}}
{{#if textType}}
{{wizard-char-counter field.value field.max_length}}
{{char-counter field.value field.max_length}}
{{/if}}
{{/if}}
{{#if field.errorDescription}}
<div class="field-error-description">{{html-safe
field.errorDescription
}}</div>
<div class="field-error-description">{{html-safe field.errorDescription}}</div>
{{/if}}

Datei anzeigen

@ -1,10 +1,6 @@
<div>{{text}}</div>
<div class="no-access-gutter">
<button
class="wizard-btn primary return-to-site"
{{action "skip"}}
type="button"
>
<button class="wizard-btn primary return-to-site" {{action "skip"}} type="button">
{{i18n "wizard.return_to_site" siteName=siteName}}
{{d-icon "sign-out-alt"}}
</button>

Datei anzeigen

@ -1,6 +1,4 @@
<a href={{topic.url}} target="_blank" rel="noopener noreferrer">
<span class="title">{{html-safe topic.fancy_title}}</span>
<div class="blurb">{{date-node topic.created_at}}
-
{{html-safe topic.blurb}}</div>
<div class="blurb">{{date-node topic.created_at}} - {{html-safe topic.blurb}}</div>
</a>

Datei anzeigen

@ -5,7 +5,7 @@
{{#if bannerImage}}
<div class="wizard-step-banner">
<img src={{bannerImage}} />
<img src={{bannerImage}}>
</div>
{{/if}}
@ -26,11 +26,7 @@
<div class="white"></div>
<div class="black" style={{barStyle}}></div>
<div class="screen"></div>
<span>{{i18n
"wizard.step"
current=step.displayIndex
total=wizard.totalSteps
}}</span>
<span>{{i18n "wizard.step" current=step.displayIndex total=wizard.totalSteps}}</span>
</div>
<div class="wizard-buttons">
@ -38,44 +34,22 @@
{{loading-spinner size="small"}}
{{else}}
{{#if showQuitButton}}
<a
href
{{action "quit"}}
class="action-link quit"
tabindex={{secondaryButtonIndex}}
>{{i18n "wizard.quit"}}</a>
<a href {{action "quit"}} class="action-link quit" tabindex={{secondaryButtonIndex}}>{{i18n "wizard.quit"}}</a>
{{/if}}
{{#if showBackButton}}
<a
href
{{action "backStep"}}
class="action-link back"
tabindex={{secondaryButtonIndex}}
>{{i18n "wizard.back"}}</a>
<a href {{action "backStep"}} class="action-link back" tabindex={{secondaryButtonIndex}}>{{i18n "wizard.back"}}</a>
{{/if}}
{{/if}}
{{#if showNextButton}}
<button
type="button"
class="wizard-btn next primary"
{{action "nextStep"}}
disabled={{saving}}
tabindex={{primaryButtonIndex}}
>
<button type="button" class="wizard-btn next primary" {{action "nextStep"}} disabled={{saving}} tabindex={{primaryButtonIndex}}>
{{i18n "wizard.next"}}
{{d-icon "chevron-right"}}
</button>
{{/if}}
{{#if showDoneButton}}
<button
type="button"
class="wizard-btn done"
{{action "done"}}
disabled={{saving}}
tabindex={{primaryButtonIndex}}
>
<button type="button" class="wizard-btn done" {{action "done"}} disabled={{saving}} tabindex={{primaryButtonIndex}}>
{{i18n "wizard.done_custom"}}
</button>
{{/if}}

Datei anzeigen

@ -1,22 +1,12 @@
{{#if field.validations}}
{{#each-in field.validations.above as |type validation|}}
{{component
validation.component
field=field
type=type
validation=validation
}}
{{component validation.component field=field type=type validation=validation}}
{{/each-in}}
{{yield (hash perform=(action "perform") autocomplete="off")}}
{{#each-in field.validations.below as |type validation|}}
{{component
validation.component
field=field
type=type
validation=validation
}}
{{component validation.component field=field type=type validation=validation}}
{{/each-in}}
{{else}}
{{yield}}

Datei anzeigen

@ -3,8 +3,7 @@
action=(action "undoChanges")
icon=undoIcon
label=undoKey
class="undo-changes"
}}
class="undo-changes"}}
{{/if}}
<div class="setting">
@ -14,12 +13,14 @@
<div class="setting-value">
{{wizard-subscription-selector
value=this.action.type
value=action.type
feature="action"
attribute="type"
onChange=(action "changeType")
wizard=wizard
options=(hash none="admin.wizard.select_type")
options=(hash
none="admin.wizard.select_type"
)
}}
</div>
</div>
@ -31,14 +32,16 @@
<div class="setting-value">
{{combo-box
value=this.action.run_after
value=action.run_after
content=runAfterContent
onChange=(action (mut this.action.run_after))
}}
onChange=(action (mut action.run_after))}}
</div>
</div>
{{wizard-message key=messageKey url=messageUrl component="action"}}
{{wizard-message
key=messageKey
url=messageUrl
component="action"}}
{{#if basicTopicFields}}
<div class="setting full field-mapper-setting">
@ -48,15 +51,14 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.title
inputs=action.title
property="title"
onUpdate=(action "mappedFieldUpdated")
options=(hash
wizardFieldSelection=true
userFieldSelection="key,value"
context="action"
)
}}
)}}
</div>
</div>
@ -67,24 +69,23 @@
<div class="setting-value">
{{combo-box
value=this.action.post
value=action.post
content=wizardFields
nameProperty="label"
onChange=(action (mut this.action.post))
onChange=(action (mut action.post))
options=(hash
none="admin.wizard.selector.placeholder.wizard_field"
isDisabled=showPostBuilder
)
}}
)}}
<div class="setting-gutter">
<Input @type="checkbox" @checked={{this.action.post_builder}} />
{{input type="checkbox" checked=action.post_builder}}
<span>{{i18n "admin.wizard.action.post_builder.checkbox"}}</span>
</div>
</div>
</div>
{{#if this.action.post_builder}}
{{#if action.post_builder}}
<div class="setting full">
<div class="setting-label">
<label>{{i18n "admin.wizard.action.post_builder.label"}}</label>
@ -92,9 +93,8 @@
<div class="setting-value editor">
{{wizard-text-editor
value=this.action.post_template
wizardFields=wizardFields
}}
value=action.post_template
wizardFields=wizardFields}}
</div>
</div>
{{/if}}
@ -108,7 +108,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.category
inputs=action.category
property="category"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -119,8 +119,7 @@
wizardActionSelection="output"
outputDefaultSelection="category"
context="action"
)
}}
)}}
</div>
</div>
@ -131,7 +130,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.tags
inputs=action.tags
property="tags"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -141,8 +140,7 @@
wizardFieldSelection=true
userFieldSelection="key,value"
context="action"
)
}}
)}}
</div>
</div>
@ -153,13 +151,14 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.visible
inputs=action.visible
property="visible"
onUpdate=(action "mappedFieldUpdated")
options=(hash
wizardFieldSelection=true userFieldSelection=true context="action"
)
}}
wizardFieldSelection=true
userFieldSelection=true
context="action"
)}}
</div>
</div>
@ -171,11 +170,13 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.add_event
inputs=action.add_event
property="add_event"
onUpdate=(action "mappedFieldUpdated")
options=(hash wizardFieldSelection=true context="action")
}}
options=(hash
wizardFieldSelection=true
context="action"
)}}
</div>
</div>
{{/if}}
@ -188,11 +189,13 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.add_location
inputs=action.add_location
property="add_location"
onUpdate=(action "mappedFieldUpdated")
options=(hash wizardFieldSelection=true context="action")
}}
options=(hash
wizardFieldSelection=true
context="action"
)}}
</div>
</div>
{{/if}}
@ -206,7 +209,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.recipient
inputs=action.recipient
property="recipient"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -217,8 +220,7 @@
userSelection="output"
outputDefaultSelection="user"
context="action"
)
}}
)}}
</div>
</div>
{{/if}}
@ -230,7 +232,7 @@
</div>
{{wizard-mapper
inputs=this.action.profile_updates
inputs=action.profile_updates
property="profile_updates"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -241,8 +243,7 @@
wizardActionSelection="value"
keyDefaultSelection="userField"
context="action"
)
}}
)}}
</div>
{{/if}}
@ -254,14 +255,13 @@
<div class="setting-value">
{{combo-box
value=this.action.api
value=action.api
content=availableApis
onChange=(action (mut this.action.api))
onChange=(action (mut action.api))
options=(hash
isDisabled=this.action.custom_title_enabled
isDisabled=action.custom_title_enabled
none="admin.wizard.action.send_to_api.select_an_api"
)
}}
)}}
</div>
</div>
@ -272,14 +272,13 @@
<div class="setting-value">
{{combo-box
value=this.action.api_endpoint
value=action.api_endpoint
content=availableEndpoints
onChange=(action (mut this.action.api_endpoint))
onChange=(action (mut action.api_endpoint))
options=(hash
isDisabled=apiEmpty
none="admin.wizard.action.send_to_api.select_an_endpoint"
)
}}
)}}
</div>
</div>
@ -290,12 +289,11 @@
<div class="setting-value">
{{wizard-text-editor
value=this.action.api_body
value=action.api_body
previewEnabled=false
barEnabled=false
wizardFields=wizardFields
placeholder="admin.wizard.action.send_to_api.body_placeholder"
}}
placeholder="admin.wizard.action.send_to_api.body_placeholder"}}
</div>
</div>
{{/if}}
@ -308,7 +306,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.group
inputs=action.group
property="group"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -319,8 +317,7 @@
groupSelection="value,output"
outputDefaultSelection="group"
context="action"
)
}}
)}}
</div>
</div>
{{/if}}
@ -333,7 +330,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.url
inputs=action.url
property="url"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -343,8 +340,7 @@
groupSelection="key,value"
categorySelection="key,value"
userSelection="key,value"
)
}}
)}}
</div>
</div>
{{/if}}
@ -357,7 +353,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.categories
inputs=action.categories
property="categories"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -367,49 +363,42 @@
userFieldSelection="key,value"
categorySelection="output"
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.watch_categories.mute_remainder"
}}</label>
<label>{{i18n "admin.wizard.action.watch_categories.mute_remainder"}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=this.action.mute_remainder
inputs=action.mute_remainder
property="mute_remainder"
onUpdate=(action "mappedFieldUpdated")
options=(hash
context="action"
wizardFieldSelection=true
userFieldSelection="key,value"
)
}}
)}}
</div>
</div>
<div class="setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.watch_x.notification_level.label"
}}</label>
<label>{{i18n "admin.wizard.action.watch_x.notification_level.label"}}</label>
</div>
<div class="setting-value">
{{combo-box
value=this.action.notification_level
value=action.notification_level
content=availableNotificationLevels
onChange=(action (mut this.action.notification_level))
onChange=(action (mut action.notification_level))
options=(hash
isDisabled=this.action.custom_title_enabled
isDisabled=action.custom_title_enabled
none="admin.wizard.action.watch_x.select_a_notification_level"
)
}}
)}}
</div>
</div>
@ -419,7 +408,7 @@
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.action.wizard_user}} />
{{input type="checkbox" checked=action.wizard_user}}
</div>
</div>
@ -430,7 +419,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.usernames
inputs=action.usernames
property="usernames"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -438,8 +427,7 @@
wizardFieldSelection=true
userFieldSelection="key,value"
userSelection="output"
)
}}
)}}
</div>
</div>
{{/if}}
@ -452,7 +440,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.tags
inputs=action.tags
property="tags"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -462,28 +450,24 @@
wizardActionSelection=true
userFieldSelection="key,value"
context="action"
)
}}
)}}
</div>
</div>
<div class="setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.watch_x.notification_level.label"
}}</label>
<label>{{i18n "admin.wizard.action.watch_x.notification_level.label"}}</label>
</div>
<div class="setting-value">
{{combo-box
value=this.action.notification_level
value=action.notification_level
content=availableNotificationLevels
onChange=(action (mut this.action.notification_level))
onChange=(action (mut action.notification_level))
options=(hash
isDisabled=this.action.custom_title_enabled
isDisabled=action.custom_title_enabled
none="admin.wizard.action.watch_x.select_a_notification_level"
)
}}
)}}
</div>
</div>
@ -493,7 +477,7 @@
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.action.wizard_user}} />
{{input type="checkbox" checked=action.wizard_user}}
</div>
</div>
@ -504,7 +488,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.usernames
inputs=action.usernames
property="usernames"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -512,8 +496,7 @@
wizardFieldSelection=true
userFieldSelection="key,value"
userSelection="output"
)
}}
)}}
</div>
</div>
{{/if}}
@ -526,7 +509,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.name
inputs=action.name
property="name"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -534,8 +517,7 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
@ -545,7 +527,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.full_name
inputs=action.full_name
property="full_name"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -553,8 +535,7 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
@ -564,7 +545,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.title
inputs=action.title
property="title"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -572,8 +553,7 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
@ -583,7 +563,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.bio_raw
inputs=action.bio_raw
property="bio_raw"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -591,8 +571,7 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
@ -602,7 +581,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.owner_usernames
inputs=action.owner_usernames
property="owner_usernames"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -611,8 +590,7 @@
userFieldSelection=true
userSelection="output"
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
@ -622,7 +600,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.usernames
inputs=action.usernames
property="usernames"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -631,20 +609,17 @@
userFieldSelection=true
userSelection="output"
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.create_group.grant_trust_level"
}}</label>
<label>{{i18n "admin.wizard.action.create_group.grant_trust_level"}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=this.action.grant_trust_level
inputs=action.grant_trust_level
property="grant_trust_level"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -652,20 +627,17 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.create_group.mentionable_level"
}}</label>
<label>{{i18n "admin.wizard.action.create_group.mentionable_level"}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=this.action.mentionable_level
inputs=action.mentionable_level
property="mentionable_level"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -673,20 +645,17 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.create_group.messageable_level"
}}</label>
<label>{{i18n "admin.wizard.action.create_group.messageable_level"}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=this.action.messageable_level
inputs=action.messageable_level
property="messageable_level"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -694,20 +663,17 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.create_group.visibility_level"
}}</label>
<label>{{i18n "admin.wizard.action.create_group.visibility_level"}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=this.action.visibility_level
inputs=action.visibility_level
property="visibility_level"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -715,20 +681,17 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.create_group.members_visibility_level"
}}</label>
<label>{{i18n "admin.wizard.action.create_group.members_visibility_level"}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=this.action.members_visibility_level
inputs=action.members_visibility_level
property="members_visibility_level"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -736,8 +699,7 @@
wizardFieldSelection=true
userFieldSelection=true
context="action"
)
}}
)}}
</div>
</div>
{{/if}}
@ -750,16 +712,15 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.name
inputs=action.name
property="name"
onUpdate=(action "mappedFieldUpdated")
options=(hash
textSelection="key,value,output"
textSelection="key,value"
wizardFieldSelection=true
userFieldSelection="key,value"
context="action"
)
}}
)}}
</div>
</div>
@ -770,7 +731,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.slug
inputs=action.slug
property="slug"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -778,8 +739,7 @@
wizardFieldSelection=true
userFieldSelection="key,value"
context="action"
)
}}
)}}
</div>
</div>
@ -790,7 +750,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.color
inputs=action.color
property="color"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -798,8 +758,7 @@
wizardFieldSelection=true
userFieldSelection="key,value"
context="action"
)
}}
)}}
</div>
</div>
@ -810,7 +769,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.text_color
inputs=action.text_color
property="text_color"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -818,21 +777,18 @@
wizardFieldSelection=true
userFieldSelection="key,value"
context="action"
)
}}
)}}
</div>
</div>
<div class="setting full field-mapper-setting">
<div class="setting-label">
<label>{{i18n
"admin.wizard.action.create_category.parent_category"
}}</label>
<label>{{i18n "admin.wizard.action.create_category.parent_category"}}</label>
</div>
<div class="setting-value">
{{wizard-mapper
inputs=this.action.parent_category_id
inputs=action.parent_category_id
property="parent_category_id"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -841,8 +797,7 @@
userFieldSelection="key,value"
categorySelection="output"
context="action"
)
}}
)}}
</div>
</div>
@ -853,7 +808,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.permissions
inputs=action.permissions
property="permissions"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -864,8 +819,7 @@
userFieldSelection=true
groupSelection="key"
context="action"
)
}}
)}}
</div>
</div>
{{/if}}
@ -878,7 +832,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.custom_fields
inputs=action.custom_fields
property="custom_fields"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -889,8 +843,7 @@
userFieldSelection="value"
keyPlaceholder="admin.wizard.action.custom_fields.key"
context=customFieldsContext
)
}}
)}}
</div>
</div>
{{/if}}
@ -903,7 +856,7 @@
<div class="setting-value">
{{wizard-mapper
inputs=this.action.required
inputs=action.required
property="required"
onUpdate=(action "mappedFieldUpdated")
options=(hash
@ -912,8 +865,7 @@
userFieldSelection=true
groupSelection=true
context="action"
)
}}
)}}
</div>
</div>
{{/if}}
@ -925,7 +877,7 @@
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.action.skip_redirect}} />
{{input type="checkbox" checked=action.skip_redirect}}
<span>
{{i18n "admin.wizard.action.skip_redirect.description" type="topic"}}
@ -939,13 +891,10 @@
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.action.suppress_notifications}} />
{{input type="checkbox" checked=action.suppress_notifications}}
<span>
{{i18n
"admin.wizard.action.suppress_notifications.description"
type="topic"
}}
{{i18n "admin.wizard.action.suppress_notifications.description" type="topic"}}
</span>
</div>
</div>
@ -958,7 +907,7 @@
</div>
<div class="setting-value">
<Input @value={{this.action.code}} />
{{input value=action.code}}
</div>
</div>
{{/if}}

Datei anzeigen

@ -3,8 +3,7 @@
action=(action "undoChanges")
icon=undoIcon
label=undoKey
class="undo-changes"
}}
class="undo-changes"}}
{{/if}}
<div class="setting">
@ -12,7 +11,7 @@
<label>{{i18n "admin.wizard.field.label"}}</label>
</div>
<div class="setting-value">
<Input name="label" @value={{this.field.label}} />
{{input name="label" value=field.label}}
</div>
</div>
@ -23,7 +22,7 @@
<div class="setting-value">
<span>{{i18n "admin.wizard.field.required_label"}}</span>
<Input @type="checkbox" @checked={{this.field.required}} />
{{input type="checkbox" checked=field.required}}
</div>
</div>
@ -32,7 +31,7 @@
<label>{{i18n "admin.wizard.field.description"}}</label>
</div>
<div class="setting-value">
<Textarea name="description" @value={{this.field.description}} />
{{textarea name="description" value=field.description}}
</div>
</div>
@ -47,8 +46,7 @@
onUploadDeleted=(action "imageUploadDeleted")
type="wizard-field-image"
class="no-repeat contain-image"
id=(concat "wizard-field-" field.id "-image-upload")
}}
id=(concat "wizard-field-" field.id "-image-upload")}}
</div>
</div>
@ -58,18 +56,20 @@
</div>
<div class="setting-value">
{{wizard-subscription-selector
{{combo-box
value=field.type
feature="field"
attribute="type"
content=fieldTypes
onChange=(action "changeType")
wizard=wizard
options=(hash none="admin.wizard.select_type")
}}
options=(hash
none="admin.wizard.select_type"
)}}
</div>
</div>
{{wizard-message key=messageKey url=messageUrl component="field"}}
{{wizard-message
key=messageKey
url=messageUrl
component="field"}}
{{#if isTextType}}
<div class="setting">
@ -78,12 +78,11 @@
</div>
<div class="setting-value">
<Input
@type="number"
{{input
type="number"
name="min_length"
@value={{this.field.min_length}}
class="small"
/>
value=field.min_length
class="small"}}
</div>
</div>
@ -93,12 +92,11 @@
</div>
<div class="setting-value">
<Input
@type="number"
{{input
type="number"
name="max_length"
@value={{this.field.max_length}}
class="small"
/>
value=field.max_length
class="small"}}
</div>
</div>
@ -109,7 +107,9 @@
<div class="setting-value">
<span>{{i18n "admin.wizard.field.char_counter_placeholder"}}</span>
<Input @type="checkbox" @checked={{this.field.char_counter}} />
{{input
type="checkbox"
checked=field.char_counter}}
</div>
</div>
@ -119,11 +119,10 @@
</div>
<div class="setting-value">
<Textarea
{{textarea
name="field_placeholder"
class="medium"
@value={{this.field.placeholder}}
/>
value=field.placeholder}}
</div>
</div>
{{/if}}
@ -135,11 +134,7 @@
</div>
<div class="setting-value">
<Textarea
name="preview-template"
class="preview-template"
@value={{this.field.preview_template}}
/>
{{textarea name="preview-template" value=field.preview_template class="preview-template"}}
</div>
</div>
{{/if}}
@ -151,7 +146,7 @@
</div>
<div class="setting-value">
<Input @value={{this.field.file_types}} class="medium" />
{{input value=field.file_types class="medium"}}
</div>
</div>
{{/if}}
@ -163,7 +158,7 @@
</div>
<div class="setting-value">
<Input @type="number" @value={{this.field.limit}} class="small" />
{{input type="number" value=field.limit class="small"}}
</div>
</div>
{{/if}}
@ -171,16 +166,12 @@
{{#if isDateTime}}
<div class="setting">
<div class="setting-label">
<label>{{html-safe
(i18n "admin.wizard.field.date_time_format.label")
}}</label>
<label>{{html-safe (i18n "admin.wizard.field.date_time_format.label")}}</label>
</div>
<div class="setting-value">
<Input @value={{this.field.format}} class="medium" />
<label>{{html-safe
(i18n "admin.wizard.field.date_time_format.instructions")
}}</label>
{{input value=field.format class="medium"}}
<label>{{html-safe (i18n "admin.wizard.field.date_time_format.instructions")}}</label>
</div>
</div>
{{/if}}
@ -196,8 +187,7 @@
inputs=field.prefill
property="prefill"
onUpdate=(action "mappedFieldUpdated")
options=prefillOptions
}}
options=prefillOptions}}
</div>
</div>
{{/if}}
@ -213,8 +203,7 @@
inputs=field.content
property="content"
onUpdate=(action "mappedFieldUpdated")
options=contentOptions
}}
options=contentOptions}}
</div>
</div>
{{/if}}
@ -240,7 +229,9 @@
</div>
<div class="setting-value">
<Input @type="checkbox" @checked={{this.field.can_create_tag}} />
{{input
type="checkbox"
checked=field.can_create_tag}}
</div>
</div>
{{/if}}
@ -252,7 +243,9 @@
</div>
<div class="setting-value">
{{wizard-mapper inputs=field.condition options=fieldConditionOptions}}
{{wizard-mapper
inputs=field.condition
options=fieldConditionOptions}}
</div>
</div>
@ -262,7 +255,9 @@
</div>
<div class="setting-value">
{{wizard-mapper inputs=field.index options=fieldIndexOptions}}
{{wizard-mapper
inputs=field.index
options=fieldIndexOptions}}
</div>
</div>
@ -277,8 +272,9 @@
value=field.property
content=categoryPropertyTypes
onChange=(action (mut field.property))
options=(hash none="admin.wizard.selector.placeholder.property")
}}
options=(hash
none="admin.wizard.selector.placeholder.property"
)}}
</div>
</div>
{{/if}}

Datei anzeigen

@ -3,7 +3,9 @@
<label>{{i18n "admin.wizard.step.title"}}</label>
</div>
<div class="setting-value">
<Input name="title" @value={{this.step.title}} />
{{input
name="title"
value=step.title}}
</div>
</div>
@ -18,8 +20,7 @@
onUploadDeleted=(action "bannerUploadDeleted")
type="wizard-step-banner"
class="no-repeat contain-image"
id=(concat "wizard-step-" step.id "-banner-upload")
}}
id=(concat "wizard-step-" step.id "-banner-upload")}}
</div>
</div>
@ -28,7 +29,8 @@
<label>{{i18n "admin.wizard.step.description"}}</label>
</div>
<div class="setting-value">
{{wizard-text-editor value=step.raw_description}}
{{wizard-text-editor
value=step.raw_description}}
</div>
</div>
@ -39,7 +41,9 @@
</div>
<div class="setting-value">
{{wizard-mapper inputs=step.condition options=stepConditionOptions}}
{{wizard-mapper
inputs=step.condition
options=stepConditionOptions}}
</div>
</div>
@ -47,7 +51,7 @@
<div class="setting-label"></div>
<div class="setting-value force-final">
<h4>{{i18n "admin.wizard.step.force_final.label"}}</h4>
<Input @type="checkbox" @checked={{this.step.force_final}} />
{{input type="checkbox" checked=step.force_final}}
<span>{{i18n "admin.wizard.step.force_final.description"}}</span>
</div>
</div>
@ -67,14 +71,13 @@
userFieldSelection="value"
keyPlaceholder="admin.wizard.submission_key"
context="step"
)
}}
)}}
{{#if step.required_data}}
<div class="required-data-message">
<div class="label">
{{i18n "admin.wizard.step.required_data.not_permitted_message"}}
</div>
<Input @value={{this.step.required_data_message}} />
{{input value=step.required_data_message}}
</div>
{{/if}}
</div>
@ -93,8 +96,7 @@
keyPlaceholder="admin.wizard.param_key"
valuePlaceholder="admin.wizard.submission_key"
context="step"
)
}}
)}}
</div>
</div>
{{/wizard-subscription-container}}
@ -103,18 +105,15 @@
itemType="field"
current=currentField
items=step.fields
parentId=step.id
}}
parentId=step.id}}
{{#each step.fields as |field|}}
{{wizard-custom-field
field=field
step=step
wizard=wizard
currentFieldId=currentField.id
fieldTypes=fieldTypes
removeField="removeField"
wizardFields=wizardFields
subscribed=subscribed
}}
subscribed=subscribed}}
{{/each}}

Datei anzeigen

@ -4,34 +4,14 @@
{{#if anyLinks}}
{{#each links as |link|}}
<div data-id={{link.id}}>
{{d-button
action=(action "change")
actionParam=link.id
translatedLabel=link.label
class=link.classes
}}
{{d-button action=(action "change") actionParam=link.id translatedLabel=link.label class=link.classes}}
{{#unless link.first}}
{{d-button
action=(action "back")
actionParam=link
icon="arrow-left"
class="back"
}}
{{d-button action=(action "back") actionParam=link icon="arrow-left" class="back"}}
{{/unless}}
{{#unless link.last}}
{{d-button
action=(action "forward")
actionParam=link
icon="arrow-right"
class="forward"
}}
{{d-button action=(action "forward") actionParam=link icon="arrow-right" class="forward"}}
{{/unless}}
{{d-button
action=(action "remove")
actionParam=link.id
icon="times"
class="remove"
}}
{{d-button action=(action "remove") actionParam=link.id icon="times" class="remove"}}
</div>
{{/each}}
{{/if}}

Datei anzeigen

@ -2,8 +2,7 @@
{{combo-box
value=connector
content=connectors
onChange=(action "changeConnector")
}}
onChange=(action "changeConnector")}}
{{else}}
{{#if connector}}
<span class="connector-single">

Datei anzeigen

@ -1,24 +1,22 @@
{{wizard-mapper-connector
connector=this.input.type
connectors=this.inputTypes
connector=input.type
connectors=inputTypes
inputTypes=true
inputType=this.inputType
inputType=inputType
connectorType="type"
options=this.options
onUpdate=this.onUpdate
}}
options=options
onUpdate=onUpdate}}
{{#if hasPairs}}
<div class="mapper-pairs mapper-block">
{{#each this.input.pairs as |pair|}}
{{#each input.pairs as |pair|}}
{{wizard-mapper-pair
pair=pair
last=pair.last
inputType=this.inputType
options=this.options
inputType=inputType
options=options
removePair=(action "removePair")
onUpdate=this.onUpdate
}}
onUpdate=onUpdate}}
{{/each}}
{{#if canAddPair}}
@ -32,27 +30,25 @@
{{#if hasOutput}}
{{#if hasPairs}}
{{wizard-mapper-connector
connector=this.input.output_connector
connectors=this.connectors
connector=input.output_connector
connectors=connectors
connectorType="output"
inputType=this.inputType
options=this.options
onUpdate=this.onUpdate
}}
inputType=inputType
options=options
onUpdate=onUpdate}}
{{/if}}
<div class="output mapper-block">
{{wizard-mapper-selector
selectorType="output"
inputType=this.input.type
value=this.input.output
activeType=this.input.output_type
options=this.options
onUpdate=this.onUpdate
}}
inputType=input.type
value=input.output
activeType=input.output_type
options=options
onUpdate=onUpdate}}
</div>
{{/if}}
<a role="button" class="remove-input" {{action remove this.input}}>
<a role="button" class="remove-input" {{action remove input}}>
{{d-icon "times"}}
</a>

Datei anzeigen

@ -5,8 +5,7 @@
value=pair.key
activeType=pair.key_type
options=options
onUpdate=onUpdate
}}
onUpdate=onUpdate}}
</div>
{{wizard-mapper-connector
@ -15,8 +14,7 @@
connectorType="pair"
inputType=inputType
options=options
onUpdate=onUpdate
}}
onUpdate=onUpdate}}
<div class="value mapper-block">
{{wizard-mapper-selector
@ -26,8 +24,7 @@
activeType=pair.value_type
options=options
onUpdate=onUpdate
connector=pair.connector
}}
connector=pair.connector}}
</div>
{{#if showJoin}}
@ -35,7 +32,5 @@
{{/if}}
{{#if showRemove}}
<a role="button" {{action removePair pair}} class="remove-pair">{{d-icon
"times"
}}</a>
<a role="button" {{action removePair pair}} class="remove-pair">{{d-icon "times"}}</a>
{{/if}}

Datei anzeigen

@ -10,8 +10,7 @@
{{wizard-mapper-selector-type
activeType=activeType
item=item
toggle=(action "toggleType")
}}
toggle=(action "toggleType")}}
{{/each}}
</div>
{{/if}}
@ -22,12 +21,11 @@
<div class="input">
{{#if showText}}
<Input
@type="text"
@value={{this.value}}
placeholder={{i18n placeholderKey}}
{{on "change" (action "changeInputValue")}}
/>
{{input
type="text"
value=value
placeholder=(i18n placeholderKey)
change=(action "changeInputValue")}}
{{/if}}
{{#if showComboBox}}
@ -35,8 +33,10 @@
value=value
content=comboBoxContent
onChange=(action "changeValue")
options=(hash none=placeholderKey allowAny=comboBoxAllowAny)
}}
options=(hash
none=placeholderKey
allowAny=comboBoxAllowAny
)}}
{{/if}}
{{#if showMultiSelect}}
@ -44,16 +44,14 @@
content=multiSelectContent
value=value
onChange=(action "changeValue")
options=multiSelectOptions
}}
options=multiSelectOptions}}
{{/if}}
{{#if showList}}
{{wizard-value-list
values=value
addKey=placeholderKey
onChange=(action "changeValue")
}}
onChange=(action "changeValue")}}
{{/if}}
{{#if showTag}}
@ -61,8 +59,10 @@
tags=value
onChange=(action "changeValue")
everyTag=true
options=(hash none=placeholderKey filterable=true)
}}
options=(hash
none=placeholderKey
filterable=true
)}}
{{/if}}
{{#if showUser}}
@ -71,7 +71,8 @@
value=value
autocomplete="discourse"
onChange=(action "changeUserValue")
options=(hash includeMessageableGroups="true")
}}
options=(hash
includeMessageableGroups="true"
)}}
{{/if}}
</div>

Datei anzeigen

@ -3,16 +3,14 @@
{{wizard-mapper-connector
connector=input.connector
connectorType="input"
onUpdate=(action "inputUpdated")
}}
onUpdate=(action "inputUpdated")}}
{{/if}}
{{wizard-mapper-input
input=input
options=inputOptions
remove=(action "remove")
onUpdate=(action "inputUpdated")
}}
onUpdate=(action "inputUpdated")}}
{{/each}}
{{#if canAdd}}

Datei anzeigen

@ -7,44 +7,32 @@
<li>
<span class="setting-title">
<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"}}
</span>
<div class="validation-container">
<div class="validation-section">
<div class="setting-label">
<label>{{i18n
"admin.wizard.field.validations.categories"
}}</label>
<label>{{i18n "admin.wizard.field.validations.categories"}}</label>
</div>
<div class="setting-value">
{{category-selector
categories=(get
this (concat "validationBuffer." type ".categories")
)
categories=(get this (concat "validationBuffer." type ".categories"))
onChange=(action "updateValidationCategories" type props)
class="wizard"
}}
class="wizard"}}
</div>
</div>
<div class="validation-section">
<div class="setting-label">
<label>{{i18n
"admin.wizard.field.validations.max_topic_age"
}}</label>
<label>{{i18n "admin.wizard.field.validations.max_topic_age"}}</label>
</div>
<div class="setting-value">
<Input
@type="number"
@value={{this.props.time_n_value}}
class="time-n-value"
/>
{{input type="number" class="time-n-value" value=props.time_n_value}}
{{combo-box
value=(readonly props.time_unit)
content=timeUnits
class="time-unit-selector"
onChange=(action (mut props.time_unit))
}}
onChange=(action (mut props.time_unit))}}
</div>
</div>
<div class="validation-section">
@ -52,17 +40,9 @@
<label>{{i18n "admin.wizard.field.validations.position"}}</label>
</div>
<div class="setting-value">
{{radio-button
name=(concat type field.id)
value="above"
selection=props.position
}}
{{radio-button name=(concat type field.id) value="above" selection=props.position}}
<span>{{i18n "admin.wizard.field.validations.above"}}</span>
{{radio-button
name=(concat type field.id)
value="below"
selection=props.position
}}
{{radio-button name=(concat type field.id) value="below" selection=props.position}}
<span>{{i18n "admin.wizard.field.validations.below"}}</span>
</div>
</div>

Datei anzeigen

@ -1,24 +1,6 @@
<svg
width="300px"
height="300px"
viewBox="0 0 300 300"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<g
id="pavilion-logo"
stroke="none"
stroke-width="1"
fill="none"
fill-rule="evenodd"
>
<path
id="Combined-Shape"
stroke="currentColor"
stroke-width="35"
d="M41.1381822,291.00006 L40.5778853,130.009744 M258.850727,291.638415 L259.290397,130.37133 M36.0002279,140.721678 L139.995368,36.2122772 M263.350577,141.009083 L138.927245,16.2478517"
></path>
<svg width="300px" height="300px" viewBox="0 0 300 300" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="pavilion-logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path id="Combined-Shape" stroke="currentColor" stroke-width="35" d="M41.1381822,291.00006 L40.5778853,130.009744 M258.850727,291.638415 L259.290397,130.37133 M36.0002279,140.721678 L139.995368,36.2122772 M263.350577,141.009083 L138.927245,16.2478517"></path>
</g>
</svg>
<span>{{label}}</span>

Vorher

Breite:  |  Höhe:  |  Größe: 602 B

Nachher

Breite:  |  Höhe:  |  Größe: 538 B

Datei anzeigen

@ -1,7 +1,6 @@
<div class="select-kit-header-wrapper">
{{component
selectKit.options.selectedNameComponent
{{component selectKit.options.selectedNameComponent
tabindex=tabindex
item=selectedContent
selectKit=selectKit

Datei anzeigen

@ -16,10 +16,7 @@
{{#if isComposer}}
<div class="wizard-table-long-text">
<p
class="wizard-table-composer-text wizard-table-long-text-content
{{textState}}"
>
<p class="wizard-table-composer-text wizard-table-long-text-content {{textState}}">
{{value.value}}
</p>
<a href {{action "expandText"}}>
@ -31,8 +28,7 @@
{{#if isComposerPreview}}
{{d-icon "comment-alt"}}
<span class="wizard-table-composer-text">
{{i18n "admin.wizard.submissions.composer_preview"}}:
{{value.value}}
{{i18n "admin.wizard.submissions.composer_preview"}}: {{value.value}}
</span>
{{/if}}
@ -150,12 +146,7 @@
{{/if}}
{{#if showUsername}}
<a
target="_blank"
rel="noopener noreferrer"
href={{userProfileUrl}}
title={{username}}
>
<a target="_blank" rel="noopener noreferrer" href={{userProfileUrl}} title={{username}}>
{{username}}
</a>
{{/if}}

Datei anzeigen

@ -1,12 +1,19 @@
{{d-editor value=value forcePreview=forcePreview placeholder=placeholder}}
{{d-editor
value=value
forcePreview=forcePreview
placeholder=placeholder}}
<div class="wizard-editor-gutter">
{{#if previewEnabled}}
{{d-button action=(action "togglePreview") translatedLabel=previewLabel}}
{{d-button
action=(action "togglePreview")
translatedLabel=previewLabel}}
{{/if}}
{{#if fieldsEnabled}}
{{d-button action=(action "togglePopover") translatedLabel=popoverLabel}}
{{d-button
action=(action "togglePopover")
translatedLabel=popoverLabel}}
{{#if showPopover}}
<div class="wizard-editor-gutter-popover">

Datei anzeigen

@ -1,7 +1,3 @@
{{#if noAccess}}
{{custom-wizard-no-access
text=(i18n noAccessI18nKey)
wizardId=wizardId
reason=noAccessReason
}}
{{custom-wizard-no-access text=(i18n noAccessI18nKey) wizardId=wizardId reason=noAccessReason}}
{{/if}}

Datei anzeigen

@ -16,6 +16,5 @@
wizard=wizard
goNext=(action "goNext")
goBack=(action "goBack")
showMessage=(action "showMessage")
}}
showMessage=(action "showMessage")}}
{{/if}}

Datei anzeigen

@ -4,10 +4,7 @@
</div>
<div class="wizard-footer">
{{#if customWizard}}
<img
src={{logoUrl}}
style="background-image: initial; width: 33px; height: 33px;"
/>
<img src={{logoUrl}} style="background-image: initial; width: 33px; height: 33px;" >
{{else}}
<div class="discourse-logo"></div>
{{/if}}

Datei anzeigen

@ -0,0 +1,32 @@
{{#d-modal-body title="admin.wizard.edit_columns"}}
{{#if loading}}
{{loading-spinner size="large"}}
{{else}}
<div class="edit-directory-columns-container">
{{#each model.columns as |column|}}
<div class="edit-directory-column">
<div class="left-content">
<label class="column-name">
{{input type="checkbox" checked=column.enabled}}
{{directory-table-header-title field=column.label translated=true}}
</label>
</div>
</div>
{{/each}}
</div>
{{/if}}
{{/d-modal-body}}
<div class="modal-footer">
{{d-button
class="btn-primary"
label="directory.edit_columns.save"
action=(action "save")
}}
{{d-button
class="btn-secondary reset-to-default"
label="directory.edit_columns.reset_to_default"
action=(action "resetToDefault")
}}
</div>

Datei anzeigen

@ -0,0 +1,16 @@
{{#d-modal-body class="next-session-time-modal" title=title}}
{{date-time-input
date=bufferedDateTime
onChange=(action "dateTimeChanged")
showTime=true
clearable=true
}}
{{/d-modal-body}}
<div class="modal-footer">
{{d-button
action=(action "submit")
class="btn-primary"
label="admin.wizard.after_time_modal.done"
disabled=submitDisabled}}
</div>

Datei anzeigen

@ -32,10 +32,15 @@ body.custom-wizard {
}
}
&.invalid .wizard-focusable {
&.invalid {
textarea,
input[type="text"],
input[type="checkbox"],
.select-kit {
outline: 4px solid var(--danger);
}
}
}
.checkbox-field {
display: flex;

Datei anzeigen

@ -324,7 +324,6 @@ en:
then: "then"
set: "set"
equal: '='
not_equal: '!='
greater: '>'
less: '<'
greater_or_equal: '>='

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen