Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-23 01:40:29 +01:00
Merge branch 'stable' of github.com:paviliondev/discourse-custom-wizard into stable
Dieser Commit ist enthalten in:
Commit
48d651c89a
180 geänderte Dateien mit 7927 neuen und 2481 gelöschten Zeilen
|
@ -1,2 +1,3 @@
|
||||||
|
3.1.999: 1f35b80f85e5fd1efb7f4851f0845700432febdc
|
||||||
2.7.99: e07a57e398b6b1676ab42a7e34467556fca5416b
|
2.7.99: e07a57e398b6b1676ab42a7e34467556fca5416b
|
||||||
2.5.1: bb85b3a0d2c0ab6b59bcb405731c39089ec6731c
|
2.5.1: bb85b3a0d2c0ab6b59bcb405731c39089ec6731c
|
||||||
|
|
13
.github/workflows/discourse-plugin.yml
gevendort
Normale Datei
13
.github/workflows/discourse-plugin.yml
gevendort
Normale Datei
|
@ -0,0 +1,13 @@
|
||||||
|
name: Discourse Plugin
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
uses: discourse/.github/.github/workflows/discourse-plugin.yml@v1
|
54
.github/workflows/plugin-linting.yml
gevendort
54
.github/workflows/plugin-linting.yml
gevendort
|
@ -1,54 +0,0 @@
|
||||||
name: Linting
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- stable
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: plugin-linting-${{ format('{0}-{1}', github.head_ref || github.run_number, github.job) }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
cache: yarn
|
|
||||||
|
|
||||||
- name: Yarn install
|
|
||||||
run: yarn install
|
|
||||||
|
|
||||||
- name: Set up ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: 2.7
|
|
||||||
bundler-cache: true
|
|
||||||
|
|
||||||
- name: ESLint
|
|
||||||
if: ${{ always() }}
|
|
||||||
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts
|
|
||||||
|
|
||||||
- name: Prettier
|
|
||||||
if: ${{ always() }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
yarn prettier -v
|
|
||||||
if [ 0 -lt $(find assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
|
||||||
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
|
|
||||||
fi
|
|
||||||
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
|
||||||
yarn prettier --list-different "test/**/*.{js,es6}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Rubocop
|
|
||||||
if: ${{ always() }}
|
|
||||||
run: bundle exec rubocop .
|
|
136
.github/workflows/plugin-tests.yml
gevendort
136
.github/workflows/plugin-tests.yml
gevendort
|
@ -1,136 +0,0 @@
|
||||||
name: Plugin Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- stable
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: tests-${{ format('{0}-{1}', github.head_ref || github.run_number, github.job) }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: ${{ matrix.build_type }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: discourse/discourse_test:slim${{ startsWith(matrix.build_type, 'frontend') && '-browsers' || '' }}
|
|
||||||
timeout-minutes: 30
|
|
||||||
|
|
||||||
env:
|
|
||||||
DISCOURSE_HOSTNAME: www.example.com
|
|
||||||
RUBY_GLOBAL_METHOD_CACHE_SIZE: 131072
|
|
||||||
RAILS_ENV: test
|
|
||||||
PGUSER: discourse
|
|
||||||
PGPASSWORD: discourse
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
build_type: ["backend", "frontend"]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
repository: discourse/discourse
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Install plugin
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: plugins/${{ github.event.repository.name }}
|
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Setup Git
|
|
||||||
run: |
|
|
||||||
git config --global user.email "ci@ci.invalid"
|
|
||||||
git config --global user.name "Discourse CI"
|
|
||||||
|
|
||||||
- name: Start redis
|
|
||||||
run: |
|
|
||||||
redis-server /etc/redis/redis.conf &
|
|
||||||
|
|
||||||
- name: Start Postgres
|
|
||||||
run: |
|
|
||||||
chown -R postgres /var/run/postgresql
|
|
||||||
sudo -E -u postgres script/start_test_db.rb
|
|
||||||
sudo -u postgres psql -c "CREATE ROLE $PGUSER LOGIN SUPERUSER PASSWORD '$PGPASSWORD';"
|
|
||||||
|
|
||||||
- name: Bundler cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: vendor/bundle
|
|
||||||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gem-
|
|
||||||
|
|
||||||
- name: Setup gems
|
|
||||||
run: |
|
|
||||||
gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
|
|
||||||
bundle config --local path vendor/bundle
|
|
||||||
bundle config --local deployment true
|
|
||||||
bundle config --local without development
|
|
||||||
bundle install --jobs 4
|
|
||||||
bundle clean
|
|
||||||
|
|
||||||
- name: Lint English locale
|
|
||||||
if: matrix.build_type == 'backend'
|
|
||||||
run: bundle exec ruby script/i18n_lint.rb "plugins/${{ github.event.repository.name }}/locales/{client,server}.en.yml"
|
|
||||||
|
|
||||||
- name: Get yarn cache directory
|
|
||||||
id: yarn-cache-dir
|
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
||||||
|
|
||||||
- name: Yarn cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: yarn-cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
|
|
||||||
- name: Yarn install
|
|
||||||
run: yarn install
|
|
||||||
|
|
||||||
- name: Fetch app state cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: app-cache
|
|
||||||
with:
|
|
||||||
path: tmp/app-cache
|
|
||||||
key: >-
|
|
||||||
${{ hashFiles('.github/workflows/tests.yml') }}-
|
|
||||||
${{ hashFiles('db/**/*', 'plugins/**/db/**/*') }}-
|
|
||||||
|
|
||||||
- name: Restore database from cache
|
|
||||||
if: steps.app-cache.outputs.cache-hit == 'true'
|
|
||||||
run: psql -f tmp/app-cache/cache.sql postgres
|
|
||||||
|
|
||||||
- name: Restore uploads from cache
|
|
||||||
if: steps.app-cache.outputs.cache-hit == 'true'
|
|
||||||
run: rm -rf public/uploads && cp -r tmp/app-cache/uploads public/uploads
|
|
||||||
|
|
||||||
- name: Create and migrate database
|
|
||||||
if: steps.app-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
bin/rake db:create
|
|
||||||
bin/rake db:migrate
|
|
||||||
|
|
||||||
- name: Dump database for cache
|
|
||||||
if: steps.app-cache.outputs.cache-hit != 'true'
|
|
||||||
run: mkdir -p tmp/app-cache && pg_dumpall > tmp/app-cache/cache.sql
|
|
||||||
|
|
||||||
- name: Dump uploads for cache
|
|
||||||
if: steps.app-cache.outputs.cache-hit != 'true'
|
|
||||||
run: rm -rf tmp/app-cache/uploads && cp -r public/uploads tmp/app-cache/uploads
|
|
||||||
|
|
||||||
- name: Plugin RSpec
|
|
||||||
if: matrix.build_type == 'backend'
|
|
||||||
run: bin/rake plugin:spec[${{ github.event.repository.name }}]
|
|
||||||
|
|
||||||
- name: Plugin QUnit
|
|
||||||
if: matrix.build_type == 'frontend'
|
|
||||||
run: QUNIT_EMBER_CLI=1 bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000']
|
|
||||||
timeout-minutes: 10
|
|
|
@ -1,4 +1,4 @@
|
||||||
All code in this repository is Copyright 2018 by Angus McLeod.
|
All code in this repository is Copyright 2023 by Angus McLeod.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
20
README.md
20
README.md
|
@ -4,22 +4,24 @@ 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">
|
<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
|
## 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.
|
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
|
## Documentation
|
||||||
|
|
||||||
[Read the full documentation here](https://discourse.pluginmanager.org/c/discourse-custom-wizard/documentation), or go directly to the relevant section
|
[Read the full documentation here](https://coop.pavilion.tech/c/82), or go directly to the relevant section
|
||||||
|
|
||||||
- [Wizard Administration](https://discourse.pluginmanager.org/t/wizard-administration)
|
- [Wizard Administration](https://coop.pavilion.tech/t/1602)
|
||||||
- [Wizard Settings](https://discourse.pluginmanager.org/t/wizard-settings)
|
- [Wizard Settings](https://coop.pavilion.tech/t/1614)
|
||||||
- [Step Settings](https://discourse.pluginmanager.org/t/step-settings)
|
- [Step Settings](https://coop.pavilion.tech/t/1735)
|
||||||
- [Field Settings](https://discourse.pluginmanager.org/t/field-settings)
|
- [Field Settings](https://coop.pavilion.tech/t/1580)
|
||||||
- [Conditional Settings](https://discourse.pluginmanager.org/t/conditional-settings)
|
- [Conditional Settings](https://coop.pavilion.tech/t/1673)
|
||||||
- [Field Interpolation](https://discourse.pluginmanager.org/t/field-interpolation)
|
- [Field Interpolation](https://coop.pavilion.tech/t/1557)
|
||||||
- [Wizard Examples and Templates](https://discourse.pluginmanager.org/t/wizard-examples-and-templates)
|
- [Handling Dates and Times](https://coop.pavilion.tech/t/1708)
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
- [Report a bug](https://discourse.pluginmanager.org/w/bug-report)
|
- [Report an issue](https://coop.pavilion.tech/w/bug-report)
|
||||||
|
|
|
@ -8,7 +8,7 @@ class CustomWizard::AdminController < ::Admin::AdminController
|
||||||
subscribed: subcription.subscribed?,
|
subscribed: subcription.subscribed?,
|
||||||
subscription_type: subcription.type,
|
subscription_type: subcription.type,
|
||||||
subscription_attributes: CustomWizard::Subscription.attributes,
|
subscription_attributes: CustomWizard::Subscription.attributes,
|
||||||
subscription_client_installed: subcription.client_installed?
|
subscription_client_installed: CustomWizard::Subscription.client_installed?
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
class CustomWizard::StepsController < ::ApplicationController
|
class CustomWizard::StepsController < ::CustomWizard::WizardClientController
|
||||||
before_action :ensure_logged_in
|
|
||||||
before_action :ensure_can_update
|
before_action :ensure_can_update
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
@ -22,7 +21,7 @@ class CustomWizard::StepsController < ::ApplicationController
|
||||||
|
|
||||||
if updater.success?
|
if updater.success?
|
||||||
wizard_id = update_params[:wizard_id]
|
wizard_id = update_params[:wizard_id]
|
||||||
builder = CustomWizard::Builder.new(wizard_id, current_user)
|
builder = CustomWizard::Builder.new(wizard_id, current_user, guest_id)
|
||||||
@wizard = builder.build(force: true)
|
@wizard = builder.build(force: true)
|
||||||
|
|
||||||
current_step = @wizard.find_step(update[:step_id])
|
current_step = @wizard.find_step(update[:step_id])
|
||||||
|
@ -85,7 +84,6 @@ class CustomWizard::StepsController < ::ApplicationController
|
||||||
private
|
private
|
||||||
|
|
||||||
def ensure_can_update
|
def ensure_can_update
|
||||||
@builder = CustomWizard::Builder.new(update_params[:wizard_id], current_user)
|
|
||||||
raise Discourse::InvalidParameters.new(:wizard_id) if @builder.template.nil?
|
raise Discourse::InvalidParameters.new(:wizard_id) if @builder.template.nil?
|
||||||
raise Discourse::InvalidAccess.new if !@builder.wizard || !@builder.wizard.can_access?
|
raise Discourse::InvalidAccess.new if !@builder.wizard || !@builder.wizard.can_access?
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
class CustomWizard::WizardController < ::ApplicationController
|
class CustomWizard::WizardController < ::CustomWizard::WizardClientController
|
||||||
before_action :ensure_plugin_enabled
|
|
||||||
before_action :ensure_logged_in, only: [:skip]
|
|
||||||
|
|
||||||
def show
|
def show
|
||||||
if wizard.present?
|
if wizard.present?
|
||||||
render json: CustomWizard::WizardSerializer.new(wizard, scope: guardian, root: false).as_json, status: 200
|
render json: CustomWizard::WizardSerializer.new(wizard, scope: guardian, root: false).as_json, status: 200
|
||||||
|
@ -35,19 +32,8 @@ class CustomWizard::WizardController < ::ApplicationController
|
||||||
|
|
||||||
def wizard
|
def wizard
|
||||||
@wizard ||= begin
|
@wizard ||= begin
|
||||||
builder = CustomWizard::Builder.new(params[:wizard_id].underscore, current_user)
|
return nil unless @builder.present?
|
||||||
return nil unless builder.present?
|
@builder.build({ reset: params[:reset] }, params)
|
||||||
opts = {}
|
|
||||||
opts[:reset] = params[:reset]
|
|
||||||
builder.build(opts, params)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def ensure_plugin_enabled
|
|
||||||
unless SiteSetting.custom_wizard_enabled
|
|
||||||
redirect_to path("/")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
23
app/controllers/custom_wizard/wizard_client.rb
Normale Datei
23
app/controllers/custom_wizard/wizard_client.rb
Normale Datei
|
@ -0,0 +1,23 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
class CustomWizard::WizardClientController < ::ApplicationController
|
||||||
|
before_action :ensure_plugin_enabled
|
||||||
|
before_action :set_builder
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def ensure_plugin_enabled
|
||||||
|
unless SiteSetting.custom_wizard_enabled
|
||||||
|
redirect_to path("/")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def guest_id
|
||||||
|
return nil if current_user.present?
|
||||||
|
cookies[:custom_wizard_guest_id] ||= CustomWizard::Wizard.generate_guest_id
|
||||||
|
cookies[:custom_wizard_guest_id]
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_builder
|
||||||
|
@builder = CustomWizard::Builder.new(params[:wizard_id].underscore, current_user, guest_id)
|
||||||
|
end
|
||||||
|
end
|
|
@ -2,12 +2,15 @@
|
||||||
class CustomWizard::SubmissionSerializer < ApplicationSerializer
|
class CustomWizard::SubmissionSerializer < ApplicationSerializer
|
||||||
attributes :id,
|
attributes :id,
|
||||||
:fields,
|
:fields,
|
||||||
:submitted_at
|
:submitted_at,
|
||||||
|
:user
|
||||||
has_one :user, serializer: ::BasicUserSerializer, embed: :objects
|
|
||||||
|
|
||||||
def include_user?
|
def include_user?
|
||||||
object.user.present?
|
object.wizard.user.present?
|
||||||
|
end
|
||||||
|
|
||||||
|
def user
|
||||||
|
::BasicUserSerializer.new(object.wizard.user, root: false).as_json
|
||||||
end
|
end
|
||||||
|
|
||||||
def fields
|
def fields
|
||||||
|
|
|
@ -7,7 +7,7 @@ import userSearch from "discourse/lib/user-search";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import Handlebars from "handlebars";
|
import Handlebars from "handlebars";
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
import TextField from "@ember/component/text-field";
|
import TextField from "discourse/components/text-field";
|
||||||
|
|
||||||
const template = function (params) {
|
const template = function (params) {
|
||||||
const options = params.options;
|
const options = params.options;
|
||||||
|
|
|
@ -12,14 +12,16 @@ import { alias } from "@ember/object/computed";
|
||||||
import Site from "discourse/models/site";
|
import Site from "discourse/models/site";
|
||||||
import { uploadIcon } from "discourse/lib/uploads";
|
import { uploadIcon } from "discourse/lib/uploads";
|
||||||
import { dasherize } from "@ember/string";
|
import { dasherize } from "@ember/string";
|
||||||
|
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({
|
export default ComposerEditor.extend({
|
||||||
|
|
||||||
classNameBindings: ["fieldClass"],
|
classNameBindings: ["fieldClass"],
|
||||||
allowUpload: true,
|
allowUpload: true,
|
||||||
showLink: false,
|
showLink: false,
|
||||||
showHyperlinkBox: false,
|
|
||||||
topic: null,
|
topic: null,
|
||||||
showToolbar: true,
|
showToolbar: true,
|
||||||
focusTarget: "reply",
|
focusTarget: "reply",
|
||||||
|
@ -29,6 +31,7 @@ export default ComposerEditor.extend({
|
||||||
draftStatus: "null",
|
draftStatus: "null",
|
||||||
replyPlaceholder: alias("field.translatedPlaceholder"),
|
replyPlaceholder: alias("field.translatedPlaceholder"),
|
||||||
wizardEventFieldId: null,
|
wizardEventFieldId: null,
|
||||||
|
composerEventPrefix: "wizard-editor",
|
||||||
|
|
||||||
@on("didInsertElement")
|
@on("didInsertElement")
|
||||||
_composerEditorInit() {
|
_composerEditorInit() {
|
||||||
|
@ -77,24 +80,13 @@ export default ComposerEditor.extend({
|
||||||
$input.on("scroll", this._throttledSyncEditorAndPreviewScroll);
|
$input.on("scroll", this._throttledSyncEditorAndPreviewScroll);
|
||||||
this._bindUploadTarget();
|
this._bindUploadTarget();
|
||||||
|
|
||||||
const wizardEventNames = ["insert-text", "replace-text"];
|
const field = this.field;
|
||||||
const eventPrefix = this.eventPrefix;
|
this.editorInputClass = `.${dasherize(field.type)}-${dasherize(
|
||||||
this.appEvents.reopen({
|
field.id
|
||||||
trigger(name, ...args) {
|
)} .d-editor-input`;
|
||||||
let eventParts = name.split(":");
|
|
||||||
let currentEventPrefix = eventParts[0];
|
|
||||||
let currentEventName = eventParts[1];
|
|
||||||
|
|
||||||
if (
|
this._uppyInstance.on("file-added", () => {
|
||||||
currentEventPrefix !== "wizard-editor" &&
|
this.session.set("wizardEventFieldId", field.id);
|
||||||
wizardEventNames.some((wen) => wen === currentEventName)
|
|
||||||
) {
|
|
||||||
let wizardEventName = name.replace(eventPrefix, "wizard-editor");
|
|
||||||
return this._super(wizardEventName, ...args);
|
|
||||||
} else {
|
|
||||||
return this._super(name, ...args);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -116,12 +108,6 @@ export default ComposerEditor.extend({
|
||||||
return uploadIcon(false, this.siteSettings);
|
return uploadIcon(false, this.siteSettings);
|
||||||
},
|
},
|
||||||
|
|
||||||
click(e) {
|
|
||||||
if ($(e.target).hasClass("wizard-composer-hyperlink")) {
|
|
||||||
this.set("showHyperlinkBox", false);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
@bind
|
@bind
|
||||||
_handleImageDeleteButtonClick(event) {
|
_handleImageDeleteButtonClick(event) {
|
||||||
if (!event.target.classList.contains("delete-image-button")) {
|
if (!event.target.classList.contains("delete-image-button")) {
|
||||||
|
@ -132,9 +118,8 @@ export default ComposerEditor.extend({
|
||||||
event.target.closest(".button-wrapper").dataset.imageIndex,
|
event.target.closest(".button-wrapper").dataset.imageIndex,
|
||||||
10
|
10
|
||||||
);
|
);
|
||||||
const matchingPlaceholder = this.get("composer.reply").match(
|
const matchingPlaceholder =
|
||||||
IMAGE_MARKDOWN_REGEX
|
this.get("composer.reply").match(IMAGE_MARKDOWN_REGEX);
|
||||||
);
|
|
||||||
|
|
||||||
this.session.set("wizardEventFieldId", this.field.id);
|
this.session.set("wizardEventFieldId", this.field.id);
|
||||||
this.appEvents.trigger(
|
this.appEvents.trigger(
|
||||||
|
@ -165,7 +150,7 @@ export default ComposerEditor.extend({
|
||||||
shortcut: "K",
|
shortcut: "K",
|
||||||
trimLeading: true,
|
trimLeading: true,
|
||||||
unshift: true,
|
unshift: true,
|
||||||
sendAction: () => component.set("showHyperlinkBox", true),
|
sendAction: (event) => component.send("showLinkModal", event),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.siteSettings.mentionables_enabled) {
|
if (this.siteSettings.mentionables_enabled) {
|
||||||
|
@ -206,17 +191,17 @@ export default ComposerEditor.extend({
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
addLink(linkName, linkUrl) {
|
showLinkModal(toolbarEvent) {
|
||||||
let link = `[${linkName}](${linkUrl})`;
|
let linkText = "";
|
||||||
this.appEvents.trigger("wizard-editor:insert-text", {
|
this._lastSel = toolbarEvent.selected;
|
||||||
fieldId: this.field.id,
|
|
||||||
text: link,
|
|
||||||
});
|
|
||||||
this.set("showHyperlinkBox", false);
|
|
||||||
},
|
|
||||||
|
|
||||||
hideBox() {
|
if (this._lastSel) {
|
||||||
this.set("showHyperlinkBox", false);
|
linkText = this._lastSel.value;
|
||||||
|
}
|
||||||
|
showModal("insert-hyperlink").setProperties({
|
||||||
|
linkText,
|
||||||
|
toolbarEvent,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
showUploadModal() {
|
showUploadModal() {
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
import Component from "@ember/component";
|
|
||||||
|
|
||||||
export default Component.extend({
|
|
||||||
classNames: ["wizard-composer-hyperlink"],
|
|
||||||
|
|
||||||
actions: {
|
|
||||||
addLink() {
|
|
||||||
this.addLink(this.linkName, this.linkUrl);
|
|
||||||
},
|
|
||||||
|
|
||||||
hideBox() {
|
|
||||||
this.hideBox();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -3,6 +3,7 @@ import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default DateInput.extend({
|
export default DateInput.extend({
|
||||||
useNativePicker: false,
|
useNativePicker: false,
|
||||||
|
classNameBindings: ["fieldClass"],
|
||||||
|
|
||||||
@discourseComputed()
|
@discourseComputed()
|
||||||
placeholder() {
|
placeholder() {
|
||||||
|
|
|
@ -2,6 +2,8 @@ import DateTimeInput from "discourse/components/date-time-input";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default DateTimeInput.extend({
|
export default DateTimeInput.extend({
|
||||||
|
classNameBindings: ["fieldClass"],
|
||||||
|
|
||||||
@discourseComputed("timeFirst", "tabindex")
|
@discourseComputed("timeFirst", "tabindex")
|
||||||
timeTabindex(timeFirst, tabindex) {
|
timeTabindex(timeFirst, tabindex) {
|
||||||
return timeFirst ? tabindex : tabindex + 1;
|
return timeFirst ? tabindex : tabindex + 1;
|
||||||
|
|
|
@ -2,6 +2,8 @@ import Component from "@ember/component";
|
||||||
import { observes } from "discourse-common/utils/decorators";
|
import { observes } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
|
classNameBindings: ["fieldClass"],
|
||||||
|
|
||||||
@observes("time")
|
@observes("time")
|
||||||
setValue() {
|
setValue() {
|
||||||
this.set("field.value", this.time.format(this.field.format));
|
this.set("field.value", this.time.format(this.field.format));
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { computed } from "@ember/object";
|
||||||
|
|
||||||
export default Component.extend(UppyUploadMixin, {
|
export default Component.extend(UppyUploadMixin, {
|
||||||
classNames: ["wizard-field-upload"],
|
classNames: ["wizard-field-upload"],
|
||||||
classNameBindings: ["isImage"],
|
classNameBindings: ["isImage", "fieldClass"],
|
||||||
uploading: false,
|
uploading: false,
|
||||||
type: computed(function () {
|
type: computed(function () {
|
||||||
return `wizard_${this.field.id}`;
|
return `wizard_${this.field.id}`;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
|
||||||
export default Component.extend({});
|
export default Component.extend({
|
||||||
|
classNameBindings: ["fieldClass"],
|
||||||
|
});
|
||||||
|
|
|
@ -9,6 +9,7 @@ import CustomWizard, {
|
||||||
updateCachedWizard,
|
updateCachedWizard,
|
||||||
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
|
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
|
||||||
import { alias, not } from "@ember/object/computed";
|
import { alias, not } from "@ember/object/computed";
|
||||||
|
import discourseLater from "discourse-common/lib/later";
|
||||||
|
|
||||||
const alreadyWarned = {};
|
const alreadyWarned = {};
|
||||||
|
|
||||||
|
@ -110,29 +111,22 @@ export default Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
autoFocus() {
|
autoFocus() {
|
||||||
|
discourseLater(() => {
|
||||||
schedule("afterRender", () => {
|
schedule("afterRender", () => {
|
||||||
const $invalid = $(
|
if ($(".invalid .wizard-focusable").length) {
|
||||||
".wizard-field.invalid:nth-of-type(1) .wizard-focusable"
|
this.animateInvalidFields();
|
||||||
);
|
|
||||||
|
|
||||||
if ($invalid.length) {
|
|
||||||
return $invalid.focus();
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
$(".wizard-focusable:first").focus();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
animateInvalidFields() {
|
animateInvalidFields() {
|
||||||
schedule("afterRender", () => {
|
schedule("afterRender", () => {
|
||||||
let $element = $(
|
let $invalid = $(".invalid .wizard-focusable");
|
||||||
".invalid input[type=text],.invalid textarea,.invalid input[type=checkbox],.invalid .select-kit"
|
if ($invalid.length) {
|
||||||
);
|
|
||||||
|
|
||||||
if ($element.length) {
|
|
||||||
$([document.documentElement, document.body]).animate(
|
$([document.documentElement, document.body]).animate(
|
||||||
{
|
{
|
||||||
scrollTop: $element.offset().top - 200,
|
scrollTop: $invalid.offset().top - 200,
|
||||||
},
|
},
|
||||||
400
|
400
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,7 +4,10 @@ export default TagChooser.extend({
|
||||||
searchTags(url, data, callback) {
|
searchTags(url, data, callback) {
|
||||||
if (this.tagGroups) {
|
if (this.tagGroups) {
|
||||||
let tagGroupsString = this.tagGroups.join(",");
|
let tagGroupsString = this.tagGroups.join(",");
|
||||||
data.tag_groups = tagGroupsString;
|
data.filterForInput = {
|
||||||
|
name: "custom-wizard-tag-chooser",
|
||||||
|
groups: tagGroupsString,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._super(url, data, callback);
|
return this._super(url, data, callback);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import computed from "discourse-common/utils/decorators";
|
import computed from "discourse-common/utils/decorators";
|
||||||
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
|
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import TextField from "@ember/component/text-field";
|
import TextField from "discourse/components/text-field";
|
||||||
|
|
||||||
export default TextField.extend({
|
export default TextField.extend({
|
||||||
attributeBindings: [
|
attributeBindings: [
|
||||||
|
|
|
@ -15,6 +15,7 @@ import {
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { bind, later } from "@ember/runloop";
|
import { bind, later } from "@ember/runloop";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
import Subscription from "../mixins/subscription";
|
||||||
|
|
||||||
const customFieldActionMap = {
|
const customFieldActionMap = {
|
||||||
topic: ["create_topic", "send_message"],
|
topic: ["create_topic", "send_message"],
|
||||||
|
@ -26,7 +27,7 @@ const customFieldActionMap = {
|
||||||
|
|
||||||
const values = ["present", "true", "false"];
|
const values = ["present", "true", "false"];
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend(Subscription, {
|
||||||
classNameBindings: [":mapper-selector", "activeType"],
|
classNameBindings: [":mapper-selector", "activeType"],
|
||||||
|
|
||||||
showText: computed("activeType", function () {
|
showText: computed("activeType", function () {
|
||||||
|
@ -116,6 +117,9 @@ export default Component.extend({
|
||||||
groupEnabled: computed("options.groupSelection", "inputType", function () {
|
groupEnabled: computed("options.groupSelection", "inputType", function () {
|
||||||
return this.optionEnabled("groupSelection");
|
return this.optionEnabled("groupSelection");
|
||||||
}),
|
}),
|
||||||
|
guestGroup: computed("options.guestGroup", "inputType", function () {
|
||||||
|
return this.optionEnabled("guestGroup");
|
||||||
|
}),
|
||||||
userEnabled: computed("options.userSelection", "inputType", function () {
|
userEnabled: computed("options.userSelection", "inputType", function () {
|
||||||
return this.optionEnabled("userSelection");
|
return this.optionEnabled("userSelection");
|
||||||
}),
|
}),
|
||||||
|
@ -126,7 +130,29 @@ export default Component.extend({
|
||||||
return this.connector === "is";
|
return this.connector === "is";
|
||||||
}),
|
}),
|
||||||
|
|
||||||
groups: alias("site.groups"),
|
@discourseComputed("site.groups", "guestGroup", "subscriptionType")
|
||||||
|
groups(groups, guestGroup, subscriptionType) {
|
||||||
|
let result = groups;
|
||||||
|
if (!guestGroup) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (["standard", "business"].includes(subscriptionType)) {
|
||||||
|
let guestIndex;
|
||||||
|
result.forEach((r, index) => {
|
||||||
|
if (r.id === 0) {
|
||||||
|
r.name = I18n.t("admin.wizard.selector.label.users");
|
||||||
|
guestIndex = index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
result.splice(guestIndex, 0, {
|
||||||
|
id: -1,
|
||||||
|
name: I18n.t("admin.wizard.selector.label.guests"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
categories: alias("site.categories"),
|
categories: alias("site.categories"),
|
||||||
showComboBox: or(
|
showComboBox: or(
|
||||||
"showWizardField",
|
"showWizardField",
|
||||||
|
|
|
@ -32,6 +32,7 @@ export default Component.extend({
|
||||||
pairConnector: options.pairConnector || null,
|
pairConnector: options.pairConnector || null,
|
||||||
outputConnector: options.outputConnector || null,
|
outputConnector: options.outputConnector || null,
|
||||||
context: options.context || null,
|
context: options.context || null,
|
||||||
|
guestGroup: options.guestGroup || false,
|
||||||
};
|
};
|
||||||
|
|
||||||
let inputTypes = ["key", "value", "output"];
|
let inputTypes = ["key", "value", "output"];
|
||||||
|
|
|
@ -7,7 +7,7 @@ export default Component.extend(Subscription, {
|
||||||
|
|
||||||
@discourseComputed("subscribed")
|
@discourseComputed("subscribed")
|
||||||
subscribedIcon(subscribed) {
|
subscribedIcon(subscribed) {
|
||||||
return subscribed ? "check" : "dash";
|
return subscribed ? "check" : "times";
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("subscribed")
|
@discourseComputed("subscribed")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import SingleSelectComponent from "select-kit/components/single-select";
|
import SingleSelectComponent from "select-kit/components/single-select";
|
||||||
import Subscription from "../mixins/subscription";
|
import Subscription from "../mixins/subscription";
|
||||||
import wizardSchema from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ export default SingleSelectComponent.extend(Subscription, {
|
||||||
return allowedTypes;
|
return allowedTypes;
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("feature", "attribute")
|
@discourseComputed("feature", "attribute", "wizard.allowGuests")
|
||||||
content(feature, attribute) {
|
content(feature, attribute) {
|
||||||
return wizardSchema[feature][attribute]
|
return filterValues(this.wizard, feature, attribute)
|
||||||
.map((value) => {
|
.map((value) => {
|
||||||
let allowedSubscriptionTypes = this.allowedSubscriptionTypes(
|
let allowedSubscriptionTypes = this.allowedSubscriptionTypes(
|
||||||
feature,
|
feature,
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
value=wizardListVal
|
value=wizardListVal
|
||||||
content=wizardList
|
content=wizardList
|
||||||
onChange=(action "changeWizard")
|
onChange=(action "changeWizard")
|
||||||
options=(hash
|
options=(hash none="admin.wizard.select")
|
||||||
none="admin.wizard.select"
|
}}
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
|
@ -1,7 +1,10 @@
|
||||||
{{#each site.complete_custom_wizard as |wizard|}}
|
{{#each site.complete_custom_wizard as |wizard|}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="alert alert-info alert-wizard">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
|
@ -4,6 +4,7 @@ import CustomWizardApi from "../models/custom-wizard-api";
|
||||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||||
import { and, equal, not } from "@ember/object/computed";
|
import { and, equal, not } from "@ember/object/computed";
|
||||||
import { selectKitContent } from "../lib/wizard";
|
import { selectKitContent } from "../lib/wizard";
|
||||||
|
import { underscore } from "@ember/string";
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
|
@ -20,29 +21,8 @@ export default Controller.extend({
|
||||||
"application/x-www-form-urlencoded",
|
"application/x-www-form-urlencoded",
|
||||||
]),
|
]),
|
||||||
successCodes: selectKitContent([
|
successCodes: selectKitContent([
|
||||||
100,
|
100, 101, 102, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301,
|
||||||
101,
|
302, 303, 303, 304, 305, 306, 307, 308,
|
||||||
102,
|
|
||||||
200,
|
|
||||||
201,
|
|
||||||
202,
|
|
||||||
203,
|
|
||||||
204,
|
|
||||||
205,
|
|
||||||
206,
|
|
||||||
207,
|
|
||||||
208,
|
|
||||||
226,
|
|
||||||
300,
|
|
||||||
301,
|
|
||||||
302,
|
|
||||||
303,
|
|
||||||
303,
|
|
||||||
304,
|
|
||||||
305,
|
|
||||||
306,
|
|
||||||
307,
|
|
||||||
308,
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
@discourseComputed(
|
@discourseComputed(
|
||||||
|
@ -118,7 +98,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
if (authType === "oauth_2") {
|
if (authType === "oauth_2") {
|
||||||
this.set("authorizing", true);
|
this.set("authorizing", true);
|
||||||
ajax(`/admin/wizards/apis/${name.underscore()}/authorize`)
|
ajax(`/admin/wizards/apis/${underscore(name)}/authorize`)
|
||||||
.catch(popupAjaxError)
|
.catch(popupAjaxError)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
@ -187,11 +167,11 @@ export default Controller.extend({
|
||||||
if (!api[rp]) {
|
if (!api[rp]) {
|
||||||
let key = rp.replace("auth", "");
|
let key = rp.replace("auth", "");
|
||||||
error = `${I18n.t(
|
error = `${I18n.t(
|
||||||
`admin.wizard.api.auth.${key.underscore()}`
|
`admin.wizard.api.auth.${underscore(key)}`
|
||||||
)} is required for ${authType}`;
|
)} is required for ${authType}`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
data[rp.underscore()] = api[rp];
|
data[underscore(rp)] = api[rp];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +201,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
this.set("updating", true);
|
this.set("updating", true);
|
||||||
|
|
||||||
ajax(`/admin/wizards/api/${name.underscore()}`, {
|
ajax(`/admin/wizards/api/${underscore(name)}`, {
|
||||||
type: "PUT",
|
type: "PUT",
|
||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
|
@ -244,7 +224,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
this.set("updating", true);
|
this.set("updating", true);
|
||||||
|
|
||||||
ajax(`/admin/wizards/api/${name.underscore()}`, {
|
ajax(`/admin/wizards/api/${underscore(name)}`, {
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
})
|
})
|
||||||
.catch(popupAjaxError)
|
.catch(popupAjaxError)
|
||||||
|
@ -262,7 +242,7 @@ export default Controller.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ajax(`/admin/wizards/api/${name.underscore()}/logs`, {
|
ajax(`/admin/wizards/api/${underscore(name)}/logs`, {
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
})
|
})
|
||||||
.catch(popupAjaxError)
|
.catch(popupAjaxError)
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { later, scheduleOnce } from "@ember/runloop";
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
import copyText from "discourse/lib/copy-text";
|
import copyText from "discourse/lib/copy-text";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
hasName: notEmpty("wizard.name"),
|
hasName: notEmpty("wizard.name"),
|
||||||
|
@ -59,6 +60,19 @@ export default Controller.extend({
|
||||||
}
|
}
|
||||||
return wizardFieldList(steps);
|
return wizardFieldList(steps);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@discourseComputed("fieldTypes", "wizard.allowGuests")
|
||||||
|
filteredFieldTypes(fieldTypes) {
|
||||||
|
const fieldTypeIds = fieldTypes.map((f) => f.id);
|
||||||
|
const allowedTypeIds = filterValues(
|
||||||
|
this.wizard,
|
||||||
|
"field",
|
||||||
|
"type",
|
||||||
|
fieldTypeIds
|
||||||
|
);
|
||||||
|
return fieldTypes.filter((f) => allowedTypeIds.includes(f.id));
|
||||||
|
},
|
||||||
|
|
||||||
getErrorMessage(result) {
|
getErrorMessage(result) {
|
||||||
if (result.backend_validation_error) {
|
if (result.backend_validation_error) {
|
||||||
return result.backend_validation_error;
|
return result.backend_validation_error;
|
||||||
|
|
|
@ -5,7 +5,10 @@ export default Controller.extend({
|
||||||
title: "admin.wizard.after_time_modal.title",
|
title: "admin.wizard.after_time_modal.title",
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
this.set("bufferedDateTime", moment(this.model.dateTime));
|
this.set(
|
||||||
|
"bufferedDateTime",
|
||||||
|
this.model.dateTime ? moment(this.model.dateTime) : moment(Date.now())
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("bufferedDateTime")
|
@discourseComputed("bufferedDateTime")
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
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);
|
|
||||||
});
|
|
25
assets/javascripts/discourse/helpers/wizard-char-counter.js.es6
Normale Datei
25
assets/javascripts/discourse/helpers/wizard-char-counter.js.es6
Normale Datei
|
@ -0,0 +1,25 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
);
|
|
@ -69,7 +69,10 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
_wizardInsertText(text, options) {
|
_wizardInsertText(text, options) {
|
||||||
if (this.session.wizardEventFieldId === this.fieldId) {
|
if (
|
||||||
|
this.session.wizardEventFieldId === this.fieldId &&
|
||||||
|
this.element
|
||||||
|
) {
|
||||||
this.insertText(text, options);
|
this.insertText(text, options);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
import ApplicationRoute from "discourse/routes/application";
|
import DiscourseURL from "discourse/lib/url";
|
||||||
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
|
import { dasherize } from "@ember/string";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "custom-wizard-redirect",
|
name: "custom-wizard-redirect",
|
||||||
after: "message-bus",
|
after: "message-bus",
|
||||||
|
|
||||||
initialize: function (container) {
|
initialize(container) {
|
||||||
const messageBus = container.lookup("service:message-bus");
|
const messageBus = container.lookup("service:message-bus");
|
||||||
const siteSettings = container.lookup("service:site-settings");
|
const siteSettings = container.lookup("service:site-settings");
|
||||||
|
|
||||||
if (!siteSettings.custom_wizard_enabled || !messageBus) {
|
if (!siteSettings.custom_wizard_enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,28 +19,26 @@ export default {
|
||||||
window.location.href = wizardUrl;
|
window.location.href = wizardUrl;
|
||||||
});
|
});
|
||||||
|
|
||||||
ApplicationRoute.reopen({
|
withPluginApi("0.8.36", (api) => {
|
||||||
actions: {
|
api.onAppEvent("page:changed", (data) => {
|
||||||
willTransition(transition) {
|
const currentUser = api.getCurrentUser();
|
||||||
const redirectToWizard = this.get("currentUser.redirect_to_wizard");
|
|
||||||
const excludedPaths = this.siteSettings.wizard_redirect_exclude_paths
|
if (currentUser) {
|
||||||
|
const redirectToWizard = currentUser.redirect_to_wizard;
|
||||||
|
const excludedPaths = siteSettings.wizard_redirect_exclude_paths
|
||||||
.split("|")
|
.split("|")
|
||||||
.concat(["loading"]);
|
.concat(["loading"]);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
redirectToWizard &&
|
redirectToWizard &&
|
||||||
(!transition.intent.name ||
|
data.currentRouteName !== "customWizardStep" &&
|
||||||
!excludedPaths.find((p) => {
|
!excludedPaths.find((p) => {
|
||||||
return transition.intent.name.indexOf(p) > -1;
|
return data.currentRouteName.indexOf(p) > -1;
|
||||||
}))
|
})
|
||||||
) {
|
) {
|
||||||
transition.abort();
|
DiscourseURL.routeTo(`/w/${dasherize(redirectToWizard)}`);
|
||||||
window.location = "/w/" + redirectToWizard.dasherize();
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return this._super(transition);
|
});
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,6 +35,7 @@ function inputTypesContent(options = {}) {
|
||||||
const connectors = {
|
const connectors = {
|
||||||
pair: [
|
pair: [
|
||||||
"equal",
|
"equal",
|
||||||
|
"not_equal",
|
||||||
"greater",
|
"greater",
|
||||||
"less",
|
"less",
|
||||||
"greater_or_equal",
|
"greater_or_equal",
|
||||||
|
|
|
@ -72,6 +72,7 @@ const field = {
|
||||||
required: null,
|
required: null,
|
||||||
type: null,
|
type: null,
|
||||||
condition: null,
|
condition: null,
|
||||||
|
tag_groups: null,
|
||||||
},
|
},
|
||||||
types: {},
|
types: {},
|
||||||
mapped: ["prefill", "content", "condition", "index"],
|
mapped: ["prefill", "content", "condition", "index"],
|
||||||
|
@ -210,11 +211,42 @@ const action = {
|
||||||
objectArrays: {},
|
objectArrays: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const filters = {
|
||||||
|
allow_guests: {
|
||||||
|
field: {
|
||||||
|
type: [
|
||||||
|
"text",
|
||||||
|
"textarea",
|
||||||
|
"text_only",
|
||||||
|
"date",
|
||||||
|
"time",
|
||||||
|
"date_time",
|
||||||
|
"number",
|
||||||
|
"checkbox",
|
||||||
|
"url",
|
||||||
|
"dropdown",
|
||||||
|
"tag",
|
||||||
|
"category",
|
||||||
|
"group",
|
||||||
|
"user_selector",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
action: {
|
||||||
|
type: ["route_to", "send_message"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
const custom_field = {
|
const custom_field = {
|
||||||
klass: ["topic", "post", "group", "category"],
|
klass: ["topic", "post", "group", "category"],
|
||||||
type: ["string", "boolean", "integer", "json"],
|
type: ["string", "boolean", "integer", "json"],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export function buildFieldTypes(types) {
|
||||||
|
wizardSchema.field.types = types;
|
||||||
|
wizardSchema.field.type = Object.keys(types);
|
||||||
|
}
|
||||||
|
|
||||||
field.type = Object.keys(field.types);
|
field.type = Object.keys(field.types);
|
||||||
action.type = Object.keys(action.types);
|
action.type = Object.keys(action.types);
|
||||||
|
|
||||||
|
@ -224,16 +256,29 @@ const wizardSchema = {
|
||||||
field,
|
field,
|
||||||
custom_field,
|
custom_field,
|
||||||
action,
|
action,
|
||||||
|
filters,
|
||||||
};
|
};
|
||||||
|
|
||||||
export function buildFieldTypes(types) {
|
|
||||||
wizardSchema.field.types = types;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function buildFieldValidations(validations) {
|
export function buildFieldValidations(validations) {
|
||||||
wizardSchema.field.validations = validations;
|
wizardSchema.field.validations = validations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function filterValues(currentWizard, feature, attribute, values = null) {
|
||||||
|
values = values || wizardSchema[feature][attribute];
|
||||||
|
|
||||||
|
if (currentWizard && currentWizard.allowGuests) {
|
||||||
|
const filteredFeature = wizardSchema.filters.allow_guests[feature];
|
||||||
|
if (filteredFeature) {
|
||||||
|
const filtered = filteredFeature[attribute];
|
||||||
|
if (filtered) {
|
||||||
|
values = values.filter((v) => filtered.includes(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
const siteSettings = getOwner(this).lookup("service:site-settings");
|
const siteSettings = getOwner(this).lookup("service:site-settings");
|
||||||
if (siteSettings.wizard_apis_enabled) {
|
if (siteSettings.wizard_apis_enabled) {
|
||||||
wizardSchema.action.types.send_to_api = {
|
wizardSchema.action.types.send_to_api = {
|
||||||
|
|
|
@ -4,6 +4,8 @@ import { get, set } from "@ember/object";
|
||||||
import Mixin from "@ember/object/mixin";
|
import Mixin from "@ember/object/mixin";
|
||||||
import { deepEqual } from "discourse-common/lib/object";
|
import { deepEqual } from "discourse-common/lib/object";
|
||||||
|
|
||||||
|
const observedCache = [];
|
||||||
|
|
||||||
export default Mixin.create({
|
export default Mixin.create({
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
@ -32,7 +34,13 @@ export default Mixin.create({
|
||||||
};
|
};
|
||||||
|
|
||||||
listProperties(componentType, opts).forEach((property) => {
|
listProperties(componentType, opts).forEach((property) => {
|
||||||
|
if (observedCache.includes(property)) {
|
||||||
obj.removeObserver(property, this, this.toggleUndo);
|
obj.removeObserver(property, this, this.toggleUndo);
|
||||||
|
let index = observedCache.indexOf(property);
|
||||||
|
if (index !== -1) {
|
||||||
|
observedCache.splice(index, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -45,6 +53,9 @@ export default Mixin.create({
|
||||||
};
|
};
|
||||||
|
|
||||||
listProperties(componentType, opts).forEach((property) => {
|
listProperties(componentType, opts).forEach((property) => {
|
||||||
|
if (observedCache.indexOf(property) === -1) {
|
||||||
|
observedCache.push(property);
|
||||||
|
}
|
||||||
obj.addObserver(property, this, this.toggleUndo);
|
obj.addObserver(property, this, this.toggleUndo);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,8 +5,20 @@ import wizardSchema from "../lib/wizard-schema";
|
||||||
import { Promise } from "rsvp";
|
import { Promise } from "rsvp";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
|
const GUEST_GROUP_ID = -1;
|
||||||
|
|
||||||
const CustomWizardAdmin = EmberObject.extend({
|
const CustomWizardAdmin = EmberObject.extend({
|
||||||
|
@discourseComputed("permitted.@each.output")
|
||||||
|
allowGuests(permitted) {
|
||||||
|
return (
|
||||||
|
permitted &&
|
||||||
|
permitted.filter((p) => p.output && p.output.includes(GUEST_GROUP_ID))
|
||||||
|
.length
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
save(opts) {
|
save(opts) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let wizard = this.buildJson(this, "wizard");
|
let wizard = this.buildJson(this, "wizard");
|
||||||
|
|
|
@ -72,7 +72,7 @@ export default EmberObject.extend(ValidState, {
|
||||||
valid = true;
|
valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setValid(valid);
|
this.setValid(Boolean(valid));
|
||||||
|
|
||||||
return valid;
|
return valid;
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,6 +10,12 @@ export default DiscourseRoute.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
afterModel(model) {
|
||||||
|
if (model === null) {
|
||||||
|
return this.transitionTo("adminWizardsApi");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
setupController(controller, model) {
|
setupController(controller, model) {
|
||||||
controller.set("api", model);
|
controller.set("api", model);
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,6 +7,12 @@ export default DiscourseRoute.extend({
|
||||||
return CustomWizardLogs.list(params.wizardId);
|
return CustomWizardLogs.list(params.wizardId);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
afterModel(model) {
|
||||||
|
if (model === null) {
|
||||||
|
return this.transitionTo("adminWizardsLogs");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
setupController(controller, model) {
|
setupController(controller, model) {
|
||||||
controller.setProperties({
|
controller.setProperties({
|
||||||
wizard: model.wizard,
|
wizard: model.wizard,
|
||||||
|
|
|
@ -8,6 +8,12 @@ export default DiscourseRoute.extend({
|
||||||
return CustomWizardAdmin.submissions(params.wizardId);
|
return CustomWizardAdmin.submissions(params.wizardId);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
afterModel(model) {
|
||||||
|
if (model === null) {
|
||||||
|
return this.transitionTo("adminWizardsSubmissions");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
setupController(controller, model) {
|
setupController(controller, model) {
|
||||||
const { fields, submissions } = formatModel(model);
|
const { fields, submissions } = formatModel(model);
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,7 @@ import Route from "@ember/routing/route";
|
||||||
export default Route.extend({
|
export default Route.extend({
|
||||||
beforeModel() {
|
beforeModel() {
|
||||||
const wizard = getCachedWizard();
|
const wizard = getCachedWizard();
|
||||||
if (
|
if (wizard && wizard.permitted && !wizard.completed && wizard.start) {
|
||||||
wizard &&
|
|
||||||
wizard.user &&
|
|
||||||
wizard.permitted &&
|
|
||||||
!wizard.completed &&
|
|
||||||
wizard.start
|
|
||||||
) {
|
|
||||||
this.replaceWith("customWizardStep", wizard.start);
|
this.replaceWith("customWizardStep", wizard.start);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -26,7 +20,7 @@ export default Route.extend({
|
||||||
const wizardId = model.get("id");
|
const wizardId = model.get("id");
|
||||||
const user = model.get("user");
|
const user = model.get("user");
|
||||||
const name = model.get("name");
|
const name = model.get("name");
|
||||||
const requiresLogin = !user;
|
const requiresLogin = !user && !permitted;
|
||||||
const notPermitted = !permitted;
|
const notPermitted = !permitted;
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { getCachedWizard } from "../models/custom-wizard";
|
import { getCachedWizard } from "../models/custom-wizard";
|
||||||
import Route from "@ember/routing/route";
|
import Route from "@ember/routing/route";
|
||||||
|
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||||
|
import { action } from "@ember/object";
|
||||||
|
|
||||||
export default Route.extend({
|
export default Route.extend({
|
||||||
beforeModel() {
|
beforeModel() {
|
||||||
const wizard = getCachedWizard();
|
const wizard = getCachedWizard();
|
||||||
this.set("wizard", wizard);
|
this.set("wizard", wizard);
|
||||||
|
|
||||||
if (!wizard || !wizard.user || !wizard.permitted || wizard.completed) {
|
if (!wizard || !wizard.permitted || wizard.completed) {
|
||||||
this.replaceWith("customWizard");
|
this.replaceWith("customWizard");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -48,4 +50,10 @@ export default Route.extend({
|
||||||
|
|
||||||
controller.setProperties(props);
|
controller.setProperties(props);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@action
|
||||||
|
didTransition() {
|
||||||
|
scrollTop();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
|
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
import bootbox from "bootbox";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
titleToken() {
|
titleToken() {
|
||||||
|
|
|
@ -8,7 +8,12 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/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}}
|
{{#if showRemove}}
|
||||||
{{d-button action=(action "remove") label="admin.wizard.api.remove"}}
|
{{d-button action=(action "remove") label="admin.wizard.api.remove"}}
|
||||||
|
@ -32,13 +37,19 @@
|
||||||
<div class="metadata">
|
<div class="metadata">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<label>{{i18n "admin.wizard.api.title"}}</label>
|
<label>{{i18n "admin.wizard.api.title"}}</label>
|
||||||
{{input value=api.title placeholder=(i18n "admin.wizard.api.title_placeholder")}}
|
<Input
|
||||||
|
@value={{this.api.title}}
|
||||||
|
placeholder={{i18n "admin.wizard.api.title_placeholder"}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="name {{nameClass}}">
|
<div class="name {{nameClass}}">
|
||||||
<label>{{i18n "admin.wizard.api.name"}}</label>
|
<label>{{i18n "admin.wizard.api.name"}}</label>
|
||||||
{{#if api.isNew}}
|
{{#if api.isNew}}
|
||||||
{{input value=api.name placeholder=(i18n "admin.wizard.api.name_placeholder")}}
|
<Input
|
||||||
|
@value={{this.api.name}}
|
||||||
|
placeholder={{i18n "admin.wizard.api.name_placeholder"}}
|
||||||
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span>{{api.name}}</span>
|
<span>{{api.name}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -56,10 +67,12 @@
|
||||||
<span>{{authErrorMessage}}</span>
|
<span>{{authErrorMessage}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{d-button label="admin.wizard.api.auth.btn"
|
{{d-button
|
||||||
|
label="admin.wizard.api.auth.btn"
|
||||||
action=(action "authorize")
|
action=(action "authorize")
|
||||||
disabled=authDisabled
|
disabled=authDisabled
|
||||||
class="btn-primary"}}
|
class="btn-primary"
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -93,9 +106,8 @@
|
||||||
value=api.authType
|
value=api.authType
|
||||||
content=authorizationTypes
|
content=authorizationTypes
|
||||||
onChange=(action (mut api.authType))
|
onChange=(action (mut api.authType))
|
||||||
options=(hash
|
options=(hash none="admin.wizard.api.auth.type_none")
|
||||||
none="admin.wizard.api.auth.type_none"
|
}}
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -104,7 +116,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label>{{i18n "admin.wizard.api.auth.url"}}</label>
|
<label>{{i18n "admin.wizard.api.auth.url"}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{input value=api.authUrl}}
|
<Input @value={{this.api.authUrl}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -112,21 +124,21 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label>{{i18n "admin.wizard.api.auth.token_url"}}</label>
|
<label>{{i18n "admin.wizard.api.auth.token_url"}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{input value=api.tokenUrl}}
|
<Input @value={{this.api.tokenUrl}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label>{{i18n "admin.wizard.api.auth.client_id"}}</label>
|
<label>{{i18n "admin.wizard.api.auth.client_id"}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{input value=api.clientId}}
|
<Input @value={{this.api.clientId}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label>{{i18n "admin.wizard.api.auth.client_secret"}}</label>
|
<label>{{i18n "admin.wizard.api.auth.client_secret"}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{input value=api.clientSecret}}
|
<Input @value={{this.api.clientSecret}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -135,12 +147,26 @@
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{#each api.authParams as |param|}}
|
{{#each api.authParams as |param|}}
|
||||||
<div class="param">
|
<div class="param">
|
||||||
{{input value=param.key placeholder=(i18n "admin.wizard.key")}}
|
<Input
|
||||||
{{input value=param.value placeholder=(i18n "admin.wizard.value")}}
|
@value={{this.param.key}}
|
||||||
{{d-button action=(action "removeParam") actionParam=param icon="times"}}
|
placeholder={{i18n "admin.wizard.key"}}
|
||||||
|
/>
|
||||||
|
<Input
|
||||||
|
@value={{this.param.value}}
|
||||||
|
placeholder={{i18n "admin.wizard.value"}}
|
||||||
|
/>
|
||||||
|
{{d-button
|
||||||
|
action=(action "removeParam")
|
||||||
|
actionParam=param
|
||||||
|
icon="times"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/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>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -149,14 +175,14 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label>{{i18n "admin.wizard.api.auth.username"}}</label>
|
<label>{{i18n "admin.wizard.api.auth.username"}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{input value=api.username}}
|
<Input @value={{this.api.username}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label>{{i18n "admin.wizard.api.auth.password"}}</label>
|
<label>{{i18n "admin.wizard.api.auth.password"}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{input value=api.password}}
|
<Input @value={{this.api.password}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -225,7 +251,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wizard-api-endpoints">
|
<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}}
|
{{#if api.endpoints}}
|
||||||
<div class="endpoint-list">
|
<div class="endpoint-list">
|
||||||
|
@ -235,38 +265,43 @@
|
||||||
<div class="endpoint">
|
<div class="endpoint">
|
||||||
<div class="endpoint-">
|
<div class="endpoint-">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
{{input value=endpoint.name
|
<Input
|
||||||
placeholder=(i18n "admin.wizard.api.endpoint.name")}}
|
@value={{endpoint.name}}
|
||||||
{{input value=endpoint.url
|
placeholder={{i18n "admin.wizard.api.endpoint.name"}}
|
||||||
placeholder=(i18n "admin.wizard.api.endpoint.url")
|
/>
|
||||||
class="endpoint-url"}}
|
<Input
|
||||||
{{d-button action=(action "removeEndpoint")
|
@value={{endpoint.url}}
|
||||||
|
placeholder={{i18n "admin.wizard.api.endpoint.url"}}
|
||||||
|
class="endpoint-url"
|
||||||
|
/>
|
||||||
|
{{d-button
|
||||||
|
action=(action "removeEndpoint")
|
||||||
actionParam=endpoint
|
actionParam=endpoint
|
||||||
icon="times"
|
icon="times"
|
||||||
class="remove-endpoint"}}
|
class="remove-endpoint"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
{{combo-box
|
{{combo-box
|
||||||
content=endpointMethods
|
content=endpointMethods
|
||||||
value=endpoint.method
|
value=endpoint.method
|
||||||
onChange=(action (mut endpoint.method))
|
onChange=(action (mut endpoint.method))
|
||||||
options=(hash
|
options=(hash none="admin.wizard.api.endpoint.method")
|
||||||
none="admin.wizard.api.endpoint.method"
|
}}
|
||||||
)}}
|
|
||||||
{{combo-box
|
{{combo-box
|
||||||
content=contentTypes
|
content=contentTypes
|
||||||
value=endpoint.content_type
|
value=endpoint.content_type
|
||||||
onChange=(action (mut endpoint.content_type))
|
onChange=(action (mut endpoint.content_type))
|
||||||
options=(hash
|
options=(hash none="admin.wizard.api.endpoint.content_type")
|
||||||
none="admin.wizard.api.endpoint.content_type"
|
}}
|
||||||
)}}
|
|
||||||
{{multi-select
|
{{multi-select
|
||||||
value=endpoint.success_codes
|
value=endpoint.success_codes
|
||||||
content=successCodes
|
content=successCodes
|
||||||
onChange=(action (mut endpoint.success_codes))
|
onChange=(action (mut endpoint.success_codes))
|
||||||
options=(hash
|
options=(hash
|
||||||
none="admin.wizard.api.endpoint.success_codes"
|
none="admin.wizard.api.endpoint.success_codes"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -284,7 +319,8 @@
|
||||||
{{d-button
|
{{d-button
|
||||||
action=(action "clearLogs")
|
action=(action "clearLogs")
|
||||||
class="clear-logs"
|
class="clear-logs"
|
||||||
label="admin.wizard.api.log.clear"}}
|
label="admin.wizard.api.log.clear"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -304,7 +340,10 @@
|
||||||
<td>{{logentry.time}}</td>
|
<td>{{logentry.time}}</td>
|
||||||
<td class="user-image">
|
<td class="user-image">
|
||||||
<div class="user-image-inner">
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>{{logentry.status}}</td>
|
<td>{{logentry.status}}</td>
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
value=apiName
|
value=apiName
|
||||||
content=apiList
|
content=apiList
|
||||||
onChange=(route-action "changeApi")
|
onChange=(route-action "changeApi")
|
||||||
options=(hash
|
options=(hash none="admin.wizard.api.select")
|
||||||
none="admin.wizard.api.select"
|
}}
|
||||||
)}}
|
|
||||||
|
|
||||||
{{d-button
|
{{d-button
|
||||||
action=(route-action "createApi")
|
action=(route-action "createApi")
|
||||||
label="admin.wizard.api.create"
|
label="admin.wizard.api.create"
|
||||||
icon="plus"}}
|
icon="plus"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="admin-wizard-container">
|
<div class="admin-wizard-container">
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
{{d-button
|
{{d-button
|
||||||
label="admin.wizard.custom_field.add"
|
label="admin.wizard.custom_field.add"
|
||||||
icon="plus"
|
icon="plus"
|
||||||
action=(action "addField")}}
|
action=(action "addField")
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -14,7 +15,8 @@
|
||||||
opts=messageOpts
|
opts=messageOpts
|
||||||
type=messageType
|
type=messageType
|
||||||
url=documentationUrl
|
url=documentationUrl
|
||||||
component="custom_fields"}}
|
component="custom_fields"
|
||||||
|
}}
|
||||||
|
|
||||||
<div class="admin-wizard-container">
|
<div class="admin-wizard-container">
|
||||||
{{#if customFields}}
|
{{#if customFields}}
|
||||||
|
@ -32,7 +34,8 @@
|
||||||
{{custom-field-input
|
{{custom-field-input
|
||||||
field=field
|
field=field
|
||||||
removeField=(action "removeField")
|
removeField=(action "removeField")
|
||||||
saveField=(action "saveField")}}
|
saveField=(action "saveField")
|
||||||
|
}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
label="refresh"
|
label="refresh"
|
||||||
icon="sync"
|
icon="sync"
|
||||||
action=(action "refresh")
|
action=(action "refresh")
|
||||||
class="refresh"}}
|
class="refresh"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -31,7 +32,10 @@
|
||||||
{{#each logs as |log|}}
|
{{#each logs as |log|}}
|
||||||
<tr>
|
<tr>
|
||||||
{{#each-in log as |field value|}}
|
{{#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}}
|
{{/each-in}}
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
value=wizardId
|
value=wizardId
|
||||||
content=wizardList
|
content=wizardList
|
||||||
onChange=(route-action "changeWizard")
|
onChange=(route-action "changeWizard")
|
||||||
options=(hash
|
options=(hash none="admin.wizard.select")
|
||||||
none="admin.wizard.select"
|
}}
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{wizard-message
|
{{wizard-message
|
||||||
key=messageKey
|
key=messageKey
|
||||||
opts=messageOpts
|
opts=messageOpts
|
||||||
url=documentationUrl
|
url=documentationUrl
|
||||||
component="logs"}}
|
component="logs"
|
||||||
|
}}
|
||||||
|
|
||||||
<div class="admin-wizard-container">
|
<div class="admin-wizard-container">
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
|
|
|
@ -11,30 +11,35 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{input
|
<Input
|
||||||
id="custom-wizard-file-upload"
|
id="custom-wizard-file-upload"
|
||||||
type="file"
|
@type="file"
|
||||||
accept="application/json"
|
accept="application/json"
|
||||||
input=(action "setFile")}}
|
{{on "input" (action "setFile")}}
|
||||||
|
/>
|
||||||
{{d-button
|
{{d-button
|
||||||
id="upload-button"
|
id="upload-button"
|
||||||
label="admin.wizard.manager.upload"
|
label="admin.wizard.manager.upload"
|
||||||
action=(action "upload")}}
|
action=(action "upload")
|
||||||
|
}}
|
||||||
{{d-button
|
{{d-button
|
||||||
id="import-button"
|
id="import-button"
|
||||||
label="admin.wizard.manager.import"
|
label="admin.wizard.manager.import"
|
||||||
action=(action "import")
|
action=(action "import")
|
||||||
disabled=importDisabled}}
|
disabled=importDisabled
|
||||||
|
}}
|
||||||
{{d-button
|
{{d-button
|
||||||
id="export-button"
|
id="export-button"
|
||||||
label="admin.wizard.manager.export"
|
label="admin.wizard.manager.export"
|
||||||
action=(action "export")
|
action=(action "export")
|
||||||
disabled=exportDisabled}}
|
disabled=exportDisabled
|
||||||
|
}}
|
||||||
{{d-button
|
{{d-button
|
||||||
id="destroy-button"
|
id="destroy-button"
|
||||||
label="admin.wizard.manager.destroy"
|
label="admin.wizard.manager.destroy"
|
||||||
action=(action "destroy")
|
action=(action "destroy")
|
||||||
disabled=destoryDisabled}}
|
disabled=destoryDisabled
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -45,7 +50,8 @@
|
||||||
opts=messageOpts
|
opts=messageOpts
|
||||||
items=messageItems
|
items=messageItems
|
||||||
loading=loading
|
loading=loading
|
||||||
component="manager"}}
|
component="manager"
|
||||||
|
}}
|
||||||
|
|
||||||
<div class="admin-wizard-container">
|
<div class="admin-wizard-container">
|
||||||
<table class="table grid">
|
<table class="table grid">
|
||||||
|
@ -65,16 +71,18 @@
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
</td>
|
</td>
|
||||||
<td class="control-column">
|
<td class="control-column">
|
||||||
{{input
|
<Input
|
||||||
type="checkbox"
|
@type="checkbox"
|
||||||
class="export"
|
class="export"
|
||||||
change=(action "selectWizard")}}
|
{{on "change" (action "selectWizard")}}
|
||||||
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td class="control-column">
|
<td class="control-column">
|
||||||
{{input
|
<Input
|
||||||
type="checkbox"
|
@type="checkbox"
|
||||||
class="destroy"
|
class="destroy"
|
||||||
change=(action "selectWizard")}}
|
{{on "change" (action "selectWizard")}}
|
||||||
|
/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
value=wizardId
|
value=wizardId
|
||||||
content=wizardList
|
content=wizardList
|
||||||
onChange=(route-action "changeWizard")
|
onChange=(route-action "changeWizard")
|
||||||
options=(hash
|
options=(hash none="admin.wizard.select")
|
||||||
none="admin.wizard.select"
|
}}
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{wizard-message
|
{{wizard-message
|
||||||
key=messageKey
|
key=messageKey
|
||||||
opts=messageOpts
|
opts=messageOpts
|
||||||
url=documentationUrl
|
url=documentationUrl
|
||||||
component="submissions"}}
|
component="submissions"
|
||||||
|
}}
|
||||||
|
|
||||||
<div class="admin-wizard-container">
|
<div class="admin-wizard-container">
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
|
|
|
@ -1,18 +1,31 @@
|
||||||
{{#if wizard}}
|
{{#if wizard}}
|
||||||
<div class="wizard-header large">
|
<div class="wizard-header large">
|
||||||
{{input
|
<Input
|
||||||
|
@value={{this.wizard.name}}
|
||||||
name="name"
|
name="name"
|
||||||
value=wizard.name
|
placeholder={{i18n "admin.wizard.name_placeholder"}}
|
||||||
placeholderKey="admin.wizard.name_placeholder"}}
|
/>
|
||||||
|
|
||||||
<div class="wizard-url">
|
<div class="wizard-url">
|
||||||
{{#if wizard.name}}
|
{{#if wizard.name}}
|
||||||
{{#if copiedUrl}}
|
{{#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}}
|
{{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}}
|
{{/if}}
|
||||||
<a href={{wizardUrl}} target="_blank" rel="noopener noreferrer">{{wizardUrl}}</a>
|
<a
|
||||||
|
href={{wizardUrl}}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>{{wizardUrl}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,11 +36,12 @@
|
||||||
<label>{{i18n "admin.wizard.background"}}</label>
|
<label>{{i18n "admin.wizard.background"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input
|
<Input
|
||||||
|
@value={{this.wizard.background}}
|
||||||
name="background"
|
name="background"
|
||||||
value=wizard.background
|
placeholder={{i18n "admin.wizard.background_placeholder"}}
|
||||||
placeholderKey="admin.wizard.background_placeholder"
|
class="small"
|
||||||
class="small"}}
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -41,9 +55,8 @@
|
||||||
valueProperty="id"
|
valueProperty="id"
|
||||||
value=wizard.theme_id
|
value=wizard.theme_id
|
||||||
onChange=(action (mut wizard.theme_id))
|
onChange=(action (mut wizard.theme_id))
|
||||||
options=(hash
|
options=(hash none="admin.wizard.no_theme")
|
||||||
none="admin.wizard.no_theme"
|
}}
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,7 +71,7 @@
|
||||||
<label>{{i18n "admin.wizard.save_submissions"}}</label>
|
<label>{{i18n "admin.wizard.save_submissions"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=wizard.save_submissions}}
|
<Input @type="checkbox" @checked={{this.wizard.save_submissions}} />
|
||||||
<span>{{i18n "admin.wizard.save_submissions_label"}}</span>
|
<span>{{i18n "admin.wizard.save_submissions_label"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,7 +81,7 @@
|
||||||
<label>{{i18n "admin.wizard.multiple_submissions"}}</label>
|
<label>{{i18n "admin.wizard.multiple_submissions"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=wizard.multiple_submissions}}
|
<Input @type="checkbox" @checked={{this.wizard.multiple_submissions}} />
|
||||||
<span>{{i18n "admin.wizard.multiple_submissions_label"}}</span>
|
<span>{{i18n "admin.wizard.multiple_submissions_label"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,7 +91,7 @@
|
||||||
<label>{{i18n "admin.wizard.after_signup"}}</label>
|
<label>{{i18n "admin.wizard.after_signup"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=wizard.after_signup}}
|
<Input @type="checkbox" @checked={{this.wizard.after_signup}} />
|
||||||
<span>{{i18n "admin.wizard.after_signup_label"}}</span>
|
<span>{{i18n "admin.wizard.after_signup_label"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -88,7 +101,7 @@
|
||||||
<label>{{i18n "admin.wizard.prompt_completion"}}</label>
|
<label>{{i18n "admin.wizard.prompt_completion"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=wizard.prompt_completion}}
|
<Input @type="checkbox" @checked={{this.wizard.prompt_completion}} />
|
||||||
<span>{{i18n "admin.wizard.prompt_completion_label"}}</span>
|
<span>{{i18n "admin.wizard.prompt_completion_label"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -98,13 +111,14 @@
|
||||||
<label>{{i18n "admin.wizard.after_time"}}</label>
|
<label>{{i18n "admin.wizard.after_time"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=wizard.after_time}}
|
<Input @type="checkbox" @checked={{this.wizard.after_time}} />
|
||||||
<span>{{i18n "admin.wizard.after_time_label"}}</span>
|
<span>{{i18n "admin.wizard.after_time_label"}}</span>
|
||||||
{{d-button
|
{{d-button
|
||||||
action=(action "setNextSessionScheduled")
|
action=(action "setNextSessionScheduled")
|
||||||
translatedLabel=nextSessionScheduledLabel
|
translatedLabel=nextSessionScheduledLabel
|
||||||
class="btn-after-time"
|
class="btn-after-time"
|
||||||
icon="far-calendar"}}
|
icon="far-calendar"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -114,7 +128,7 @@
|
||||||
<label>{{i18n "admin.wizard.required"}}</label>
|
<label>{{i18n "admin.wizard.required"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=wizard.required}}
|
<Input @type="checkbox" @checked={{this.wizard.required}} />
|
||||||
<span>{{i18n "admin.wizard.required_label"}}</span>
|
<span>{{i18n "admin.wizard.required_label"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -124,7 +138,7 @@
|
||||||
<label>{{i18n "admin.wizard.restart_on_revisit"}}</label>
|
<label>{{i18n "admin.wizard.restart_on_revisit"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=wizard.restart_on_revisit}}
|
<Input @type="checkbox" @checked={{this.wizard.restart_on_revisit}} />
|
||||||
<span>{{i18n "admin.wizard.restart_on_revisit_label"}}</span>
|
<span>{{i18n "admin.wizard.restart_on_revisit_label"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -140,19 +154,18 @@
|
||||||
context="wizard"
|
context="wizard"
|
||||||
inputTypes="assignment,validation"
|
inputTypes="assignment,validation"
|
||||||
groupSelection="output"
|
groupSelection="output"
|
||||||
|
guestGroup=true
|
||||||
userFieldSelection="key"
|
userFieldSelection="key"
|
||||||
textSelection="value"
|
textSelection="value"
|
||||||
inputConnector="and"
|
inputConnector="and"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/wizard-subscription-container}}
|
{{/wizard-subscription-container}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{wizard-links
|
{{wizard-links itemType="step" current=currentStep items=wizard.steps}}
|
||||||
itemType="step"
|
|
||||||
current=currentStep
|
|
||||||
items=wizard.steps}}
|
|
||||||
|
|
||||||
{{#if currentStep}}
|
{{#if currentStep}}
|
||||||
{{wizard-custom-step
|
{{wizard-custom-step
|
||||||
|
@ -160,15 +173,17 @@
|
||||||
wizard=wizard
|
wizard=wizard
|
||||||
currentField=currentField
|
currentField=currentField
|
||||||
wizardFields=wizardFields
|
wizardFields=wizardFields
|
||||||
fieldTypes=fieldTypes
|
fieldTypes=filteredFieldTypes
|
||||||
subscribed=subscribed}}
|
subscribed=subscribed
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{wizard-links
|
{{wizard-links
|
||||||
itemType="action"
|
itemType="action"
|
||||||
current=currentAction
|
current=currentAction
|
||||||
items=wizard.actions
|
items=wizard.actions
|
||||||
generateLabels=true}}
|
generateLabels=true
|
||||||
|
}}
|
||||||
|
|
||||||
{{#each wizard.actions as |wizardAction|}}
|
{{#each wizard.actions as |wizardAction|}}
|
||||||
{{wizard-custom-action
|
{{wizard-custom-action
|
||||||
|
@ -178,11 +193,17 @@
|
||||||
apis=apis
|
apis=apis
|
||||||
removeAction="removeAction"
|
removeAction="removeAction"
|
||||||
wizardFields=wizardFields
|
wizardFields=wizardFields
|
||||||
fieldTypes=fieldTypes}}
|
fieldTypes=filteredFieldTypes
|
||||||
|
}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
<div class="admin-wizard-buttons">
|
<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"}}
|
{{i18n "admin.wizard.save"}}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -3,20 +3,17 @@
|
||||||
value=wizardListVal
|
value=wizardListVal
|
||||||
content=wizardList
|
content=wizardList
|
||||||
onChange=(route-action "changeWizard")
|
onChange=(route-action "changeWizard")
|
||||||
options=(hash
|
options=(hash none="admin.wizard.select")
|
||||||
none="admin.wizard.select"
|
}}
|
||||||
)}}
|
|
||||||
|
|
||||||
{{d-button
|
{{d-button
|
||||||
action=(route-action "createWizard")
|
action=(route-action "createWizard")
|
||||||
label="admin.wizard.create"
|
label="admin.wizard.create"
|
||||||
icon="plus"}}
|
icon="plus"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{wizard-message
|
{{wizard-message key=messageKey url=messageUrl component="wizard"}}
|
||||||
key=messageKey
|
|
||||||
url=messageUrl
|
|
||||||
component="wizard"}}
|
|
||||||
|
|
||||||
<div class="admin-wizard-container settings">
|
<div class="admin-wizard-container settings">
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
|
|
|
@ -1,12 +1,21 @@
|
||||||
{{#admin-nav}}
|
{{#admin-nav}}
|
||||||
{{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}}
|
{{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}}
|
||||||
{{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}}
|
{{nav-item
|
||||||
{{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}}
|
route="adminWizardsCustomFields"
|
||||||
|
label="admin.wizard.custom_field.nav_label"
|
||||||
|
}}
|
||||||
|
{{nav-item
|
||||||
|
route="adminWizardsSubmissions"
|
||||||
|
label="admin.wizard.submissions.nav_label"
|
||||||
|
}}
|
||||||
{{#if showApi}}
|
{{#if showApi}}
|
||||||
{{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}}
|
{{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}}
|
{{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">
|
<div class="admin-actions">
|
||||||
{{wizard-subscription-badge}}
|
{{wizard-subscription-badge}}
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
feature="custom_field"
|
feature="custom_field"
|
||||||
attribute="klass"
|
attribute="klass"
|
||||||
onChange=(action (mut field.klass))
|
onChange=(action (mut field.klass))
|
||||||
options=(hash
|
options=(hash none="admin.wizard.custom_field.klass.select")
|
||||||
none="admin.wizard.custom_field.klass.select"
|
}}
|
||||||
)}}
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{wizard-subscription-selector
|
{{wizard-subscription-selector
|
||||||
|
@ -15,23 +14,22 @@
|
||||||
feature="custom_field"
|
feature="custom_field"
|
||||||
attribute="type"
|
attribute="type"
|
||||||
onChange=(action (mut field.type))
|
onChange=(action (mut field.type))
|
||||||
options=(hash
|
options=(hash none="admin.wizard.custom_field.type.select")
|
||||||
none="admin.wizard.custom_field.type.select"
|
}}
|
||||||
)}}
|
|
||||||
</td>
|
</td>
|
||||||
<td class="input">
|
<td class="input">
|
||||||
{{input
|
<Input
|
||||||
value=field.name
|
@value={{this.field.name}}
|
||||||
placeholder=(i18n "admin.wizard.custom_field.name.select")}}
|
placeholder={{i18n "admin.wizard.custom_field.name.select"}}
|
||||||
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td class="multi-select">
|
<td class="multi-select">
|
||||||
{{multi-select
|
{{multi-select
|
||||||
value=field.serializers
|
value=field.serializers
|
||||||
content=serializerContent
|
content=serializerContent
|
||||||
onChange=(action (mut field.serializers))
|
onChange=(action (mut field.serializers))
|
||||||
options=(hash
|
options=(hash none="admin.wizard.custom_field.serializers.select")
|
||||||
none="admin.wizard.custom_field.serializers.select"
|
}}
|
||||||
)}}
|
|
||||||
</td>
|
</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{#if loading}}
|
{{#if loading}}
|
||||||
|
@ -45,16 +43,15 @@
|
||||||
action=(action "destroy")
|
action=(action "destroy")
|
||||||
icon="trash-alt"
|
icon="trash-alt"
|
||||||
class="destroy"
|
class="destroy"
|
||||||
disabled=destroyDisabled}}
|
disabled=destroyDisabled
|
||||||
|
}}
|
||||||
{{d-button
|
{{d-button
|
||||||
icon="save"
|
icon="save"
|
||||||
action=(action "save")
|
action=(action "save")
|
||||||
disabled=saveDisabled
|
disabled=saveDisabled
|
||||||
class="save"}}
|
class="save"
|
||||||
{{d-button
|
}}
|
||||||
action=(action "close")
|
{{d-button action=(action "close") icon="times" disabled=closeDisabled}}
|
||||||
icon="times"
|
|
||||||
disabled=closeDisabled}}
|
|
||||||
</td>
|
</td>
|
||||||
{{else}}
|
{{else}}
|
||||||
<td><label>{{field.klass}}</label></td>
|
<td><label>{{field.klass}}</label></td>
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
wizardComposer=true
|
wizardComposer=true
|
||||||
fieldId=field.id
|
fieldId=field.id
|
||||||
disabled=disableTextarea
|
disabled=disableTextarea
|
||||||
outletArgs=(hash composer=composer editorType="composer")}}
|
outletArgs=(hash composer=composer editorType="composer")
|
||||||
|
}}
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
|
@ -22,4 +23,4 @@
|
||||||
class="wizard-composer-upload"
|
class="wizard-composer-upload"
|
||||||
accept={{allowedFileTypes}}
|
accept={{allowedFileTypes}}
|
||||||
multiple
|
multiple
|
||||||
>
|
/>
|
|
@ -1,21 +0,0 @@
|
||||||
<div class="wizard-composer-hyperlink-contents">
|
|
||||||
<h3>{{i18n "composer.link_dialog_title"}}</h3>
|
|
||||||
{{input
|
|
||||||
class="composer-link-name"
|
|
||||||
placeholder=(i18n "composer.link_optional_text")
|
|
||||||
type="text"
|
|
||||||
value=linkName}}
|
|
||||||
{{input
|
|
||||||
class="composer-link-url"
|
|
||||||
placeholder=(i18n "composer.link_url_placeholder")
|
|
||||||
type="text"
|
|
||||||
value=linkUrl}}
|
|
||||||
{{d-button
|
|
||||||
label="wizard_composer.modal_ok"
|
|
||||||
class="add-link btn-primary"
|
|
||||||
click=(action "addLink")}}
|
|
||||||
{{d-button
|
|
||||||
label="wizard_composer.modal_cancel"
|
|
||||||
class="hide-hyperlink-box btn-danger"
|
|
||||||
click=(action "hideBox")}}
|
|
||||||
</div>
|
|
|
@ -1,11 +1,11 @@
|
||||||
{{input
|
<Input
|
||||||
type=inputType
|
@type={{this.inputType}}
|
||||||
|
@value={{readonly this.value}}
|
||||||
class="date-picker"
|
class="date-picker"
|
||||||
placeholder=placeholder
|
placeholder={{this.placeholder}}
|
||||||
value=(readonly value)
|
tabindex={{this.tabindex}}
|
||||||
input=(action "onChangeDate")
|
{{on "input" (action "onChangeDate")}}
|
||||||
tabindex=tabindex
|
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
}}
|
/>
|
||||||
|
|
||||||
<div class="picker-container"></div>
|
<div class="picker-container"></div>
|
|
@ -26,9 +26,5 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if clearable}}
|
{{#if clearable}}
|
||||||
{{d-button
|
{{d-button class="clear-date-time" icon="times" action=(action "onClear")}}
|
||||||
class="clear-date-time"
|
|
||||||
icon="times"
|
|
||||||
action=(action "onClear")
|
|
||||||
}}
|
|
||||||
{{/if}}
|
{{/if}}
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<div class="d-editor-container">
|
<div class="d-editor-container">
|
||||||
{{#if showPreview}}
|
{{#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">
|
<div class="d-editor-preview">
|
||||||
{{html-safe preview}}
|
{{html-safe preview}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,13 +18,16 @@
|
||||||
onExpand=(action b.action b)
|
onExpand=(action b.action b)
|
||||||
class=b.className
|
class=b.className
|
||||||
content=popupMenuOptions
|
content=popupMenuOptions
|
||||||
options=(hash
|
options=(hash popupTitle=b.title icon=b.icon)
|
||||||
popupTitle=b.title
|
}}
|
||||||
icon=b.icon
|
|
||||||
)}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div>{{d.icon}}</div>
|
<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}}
|
{{d-icon b.icon}}
|
||||||
{{#if b.label}}
|
{{#if b.label}}
|
||||||
<span class="d-button-label">{{i18n b.label}}</span>
|
<span class="d-button-label">{{i18n b.label}}</span>
|
||||||
|
@ -40,7 +43,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{conditional-loading-spinner condition=loading}}
|
{{conditional-loading-spinner condition=loading}}
|
||||||
{{textarea tabindex=tabindex value=value class="d-editor-input" placeholder=placeholder}}
|
<Textarea
|
||||||
|
tabindex={{this.tabindex}}
|
||||||
|
@value={{this.value}}
|
||||||
|
class="d-editor-input"
|
||||||
|
placeholder={{this.placeholder}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
|
@ -1,8 +1,8 @@
|
||||||
{{custom-wizard-category-selector
|
{{custom-wizard-category-selector
|
||||||
categories=categories
|
categories=categories
|
||||||
|
class=fieldClass
|
||||||
whitelist=field.content
|
whitelist=field.content
|
||||||
onChange=(action (mut categories))
|
onChange=(action (mut categories))
|
||||||
tabindex=field.tabindex
|
tabindex=field.tabindex
|
||||||
options=(hash
|
options=(hash maximum=field.limit)
|
||||||
maximum=field.limit
|
}}
|
||||||
)}}
|
|
|
@ -1 +1,7 @@
|
||||||
{{input type="checkbox" id=field.id checked=field.value tabindex=field.tabindex}}
|
<Input
|
||||||
|
id={{this.field.id}}
|
||||||
|
@type="checkbox"
|
||||||
|
@checked={{this.field.value}}
|
||||||
|
tabindex={{this.field.tabindex}}
|
||||||
|
class={{this.fieldClass}}
|
||||||
|
/>
|
|
@ -2,18 +2,24 @@
|
||||||
field=field
|
field=field
|
||||||
composer=composer
|
composer=composer
|
||||||
wizard=wizard
|
wizard=wizard
|
||||||
|
fieldClass=fieldClass
|
||||||
groupsMentioned=(action "groupsMentioned")
|
groupsMentioned=(action "groupsMentioned")
|
||||||
cannotSeeMention=(action "cannotSeeMention")
|
cannotSeeMention=(action "cannotSeeMention")
|
||||||
importQuote=(action "importQuote")
|
importQuote=(action "importQuote")
|
||||||
togglePreview=(action "togglePreview")
|
togglePreview=(action "togglePreview")
|
||||||
afterRefresh=(action "afterRefresh")}}
|
afterRefresh=(action "afterRefresh")
|
||||||
|
}}
|
||||||
|
|
||||||
<div class="bottom-bar">
|
<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>
|
<span class="d-button-label">{{i18n togglePreviewLabel}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{{#if field.char_counter}}
|
{{#if field.char_counter}}
|
||||||
{{char-counter field.value field.max_length}}
|
{{wizard-char-counter field.value field.max_length}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
|
@ -4,6 +4,5 @@
|
||||||
content=field.content
|
content=field.content
|
||||||
tabindex=field.tabindex
|
tabindex=field.tabindex
|
||||||
onChange=(action "onChangeValue")
|
onChange=(action "onChangeValue")
|
||||||
options=(hash
|
options=(hash none="select_kit.default_header_text")
|
||||||
none="select_kit.default_header_text"
|
}}
|
||||||
)}}
|
|
|
@ -1,10 +1,10 @@
|
||||||
{{custom-wizard-group-selector
|
{{custom-wizard-group-selector
|
||||||
groups=site.groups
|
groups=site.groups
|
||||||
|
class=fieldClass
|
||||||
field=field
|
field=field
|
||||||
whitelist=field.content
|
whitelist=field.content
|
||||||
value=field.value
|
value=field.value
|
||||||
tabindex=field.tabindex
|
tabindex=field.tabindex
|
||||||
onChange=(action (mut field.value))
|
onChange=(action (mut field.value))
|
||||||
options=(hash
|
options=(hash none="select_kit.default_header_text")
|
||||||
none="select_kit.default_header_text"
|
}}
|
||||||
)}}
|
|
|
@ -1 +1,8 @@
|
||||||
{{input type="number" step="0.01" id=field.id value=field.value tabindex=field.tabindex}}
|
<Input
|
||||||
|
id={{this.field.id}}
|
||||||
|
step="0.01"
|
||||||
|
@type="number"
|
||||||
|
@value={{this.field.value}}
|
||||||
|
tabindex={{this.field.tabindex}}
|
||||||
|
class={{this.fieldClass}}
|
||||||
|
/>
|
|
@ -1,9 +1,8 @@
|
||||||
{{custom-wizard-tag-chooser
|
{{custom-wizard-tag-chooser
|
||||||
tags=field.value
|
tags=field.value
|
||||||
|
class=fieldClass
|
||||||
tabindex=field.tabindex
|
tabindex=field.tabindex
|
||||||
tagGroups=field.tag_groups
|
tagGroups=field.tag_groups
|
||||||
everyTag=true
|
everyTag=true
|
||||||
options=(hash
|
options=(hash maximum=field.limit allowAny=field.can_create_tag)
|
||||||
maximum=field.limit
|
}}
|
||||||
allowAny=field.can_create_tag
|
|
||||||
)}}
|
|
|
@ -1 +1,8 @@
|
||||||
{{input id=field.id value=field.value class=fieldClass placeholder=field.translatedPlaceholder tabindex=field.tabindex autocomplete=autocomplete}}
|
<Input
|
||||||
|
id={{this.field.id}}
|
||||||
|
@value={{this.field.value}}
|
||||||
|
tabindex={{this.field.tabindex}}
|
||||||
|
class={{this.fieldClass}}
|
||||||
|
placeholder={{this.field.translatedPlaceholder}}
|
||||||
|
autocomplete={{this.autocomplete}}
|
||||||
|
/>
|
|
@ -1 +1,7 @@
|
||||||
{{textarea id=field.id value=field.value class=fieldClass placeholder=field.translatedPlaceholder tabindex=field.tabindex}}
|
<Textarea
|
||||||
|
id={{this.field.id}}
|
||||||
|
@value={{this.field.value}}
|
||||||
|
tabindex={{this.field.tabindex}}
|
||||||
|
class={{this.fieldClass}}
|
||||||
|
placeholder={{this.field.translatedPlaceholder}}
|
||||||
|
/>
|
|
@ -1,4 +1,7 @@
|
||||||
<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}}
|
{{#if uploading}}
|
||||||
{{i18n "wizard.uploading"}}
|
{{i18n "wizard.uploading"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -6,12 +9,18 @@
|
||||||
{{d-icon "upload"}}
|
{{d-icon "upload"}}
|
||||||
{{/if}}
|
{{/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>
|
</label>
|
||||||
|
|
||||||
{{#if field.value}}
|
{{#if field.value}}
|
||||||
{{#if isImage}}
|
{{#if isImage}}
|
||||||
<img src={{field.value.url}} class="wizard-image-preview">
|
<img src={{field.value.url}} class="wizard-image-preview" />
|
||||||
{{else}}
|
{{else}}
|
||||||
{{field.value.original_filename}}
|
{{field.value.original_filename}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
{{input type="text" id=field.id value=field.value tabindex=field.tabindex}}
|
<Input
|
||||||
|
id={{this.field.id}}
|
||||||
|
@value={{this.field.value}}
|
||||||
|
tabindex={{this.field.tabindex}}
|
||||||
|
class={{this.fieldClass}}
|
||||||
|
/>
|
|
@ -1,4 +1,5 @@
|
||||||
{{custom-user-selector
|
{{custom-user-selector
|
||||||
usernames=field.value
|
usernames=field.value
|
||||||
placeholderKey=field.placeholder
|
placeholderKey=field.placeholder
|
||||||
tabindex=field.tabindex}}
|
tabindex=field.tabindex
|
||||||
|
}}
|
|
@ -3,7 +3,7 @@
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
{{#if field.image}}
|
{{#if field.image}}
|
||||||
<div class="field-image"><img src={{field.image}}></div>
|
<div class="field-image"><img src={{field.image}} /></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if field.description}}
|
{{#if field.description}}
|
||||||
|
@ -13,17 +13,26 @@
|
||||||
{{#field-validators field=field as |validators|}}
|
{{#field-validators field=field as |validators|}}
|
||||||
{{#if inputComponentName}}
|
{{#if inputComponentName}}
|
||||||
<div class="input-area">
|
<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>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/field-validators}}
|
{{/field-validators}}
|
||||||
|
|
||||||
{{#if field.char_counter}}
|
{{#if field.char_counter}}
|
||||||
{{#if textType}}
|
{{#if textType}}
|
||||||
{{char-counter field.value field.max_length}}
|
{{wizard-char-counter field.value field.max_length}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if field.errorDescription}}
|
{{#if field.errorDescription}}
|
||||||
<div class="field-error-description">{{html-safe field.errorDescription}}</div>
|
<div class="field-error-description">{{html-safe
|
||||||
|
field.errorDescription
|
||||||
|
}}</div>
|
||||||
{{/if}}
|
{{/if}}
|
|
@ -1,6 +1,10 @@
|
||||||
<div>{{text}}</div>
|
<div>{{text}}</div>
|
||||||
<div class="no-access-gutter">
|
<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}}
|
{{i18n "wizard.return_to_site" siteName=siteName}}
|
||||||
{{d-icon "sign-out-alt"}}
|
{{d-icon "sign-out-alt"}}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<a href={{topic.url}} target="_blank" rel="noopener noreferrer">
|
<a href={{topic.url}} target="_blank" rel="noopener noreferrer">
|
||||||
<span class="title">{{html-safe topic.fancy_title}}</span>
|
<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>
|
</a>
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
{{#if bannerImage}}
|
{{#if bannerImage}}
|
||||||
<div class="wizard-step-banner">
|
<div class="wizard-step-banner">
|
||||||
<img src={{bannerImage}}>
|
<img src={{bannerImage}} />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -26,7 +26,11 @@
|
||||||
<div class="white"></div>
|
<div class="white"></div>
|
||||||
<div class="black" style={{barStyle}}></div>
|
<div class="black" style={{barStyle}}></div>
|
||||||
<div class="screen"></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>
|
||||||
|
|
||||||
<div class="wizard-buttons">
|
<div class="wizard-buttons">
|
||||||
|
@ -34,22 +38,44 @@
|
||||||
{{loading-spinner size="small"}}
|
{{loading-spinner size="small"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if showQuitButton}}
|
{{#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}}
|
||||||
{{#if showBackButton}}
|
{{#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}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showNextButton}}
|
{{#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"}}
|
{{i18n "wizard.next"}}
|
||||||
{{d-icon "chevron-right"}}
|
{{d-icon "chevron-right"}}
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showDoneButton}}
|
{{#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"}}
|
{{i18n "wizard.done_custom"}}
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,12 +1,22 @@
|
||||||
{{#if field.validations}}
|
{{#if field.validations}}
|
||||||
{{#each-in field.validations.above as |type validation|}}
|
{{#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}}
|
{{/each-in}}
|
||||||
|
|
||||||
{{yield (hash perform=(action "perform") autocomplete="off")}}
|
{{yield (hash perform=(action "perform") autocomplete="off")}}
|
||||||
|
|
||||||
{{#each-in field.validations.below as |type validation|}}
|
{{#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}}
|
{{/each-in}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{yield}}
|
{{yield}}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
action=(action "undoChanges")
|
action=(action "undoChanges")
|
||||||
icon=undoIcon
|
icon=undoIcon
|
||||||
label=undoKey
|
label=undoKey
|
||||||
class="undo-changes"}}
|
class="undo-changes"
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
|
@ -17,9 +18,8 @@
|
||||||
feature="action"
|
feature="action"
|
||||||
attribute="type"
|
attribute="type"
|
||||||
onChange=(action "changeType")
|
onChange=(action "changeType")
|
||||||
options=(hash
|
wizard=wizard
|
||||||
none="admin.wizard.select_type"
|
options=(hash none="admin.wizard.select_type")
|
||||||
)
|
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,14 +33,12 @@
|
||||||
{{combo-box
|
{{combo-box
|
||||||
value=action.run_after
|
value=action.run_after
|
||||||
content=runAfterContent
|
content=runAfterContent
|
||||||
onChange=(action (mut action.run_after))}}
|
onChange=(action (mut action.run_after))
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{wizard-message
|
{{wizard-message key=messageKey url=messageUrl component="action"}}
|
||||||
key=messageKey
|
|
||||||
url=messageUrl
|
|
||||||
component="action"}}
|
|
||||||
|
|
||||||
{{#if basicTopicFields}}
|
{{#if basicTopicFields}}
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
|
@ -57,7 +55,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -75,10 +74,11 @@
|
||||||
options=(hash
|
options=(hash
|
||||||
none="admin.wizard.selector.placeholder.wizard_field"
|
none="admin.wizard.selector.placeholder.wizard_field"
|
||||||
isDisabled=showPostBuilder
|
isDisabled=showPostBuilder
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
|
|
||||||
<div class="setting-gutter">
|
<div class="setting-gutter">
|
||||||
{{input type="checkbox" checked=action.post_builder}}
|
<Input @type="checkbox" @checked={{this.action.post_builder}} />
|
||||||
<span>{{i18n "admin.wizard.action.post_builder.checkbox"}}</span>
|
<span>{{i18n "admin.wizard.action.post_builder.checkbox"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,7 +93,8 @@
|
||||||
<div class="setting-value editor">
|
<div class="setting-value editor">
|
||||||
{{wizard-text-editor
|
{{wizard-text-editor
|
||||||
value=action.post_template
|
value=action.post_template
|
||||||
wizardFields=wizardFields}}
|
wizardFields=wizardFields
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -118,7 +119,8 @@
|
||||||
wizardActionSelection="output"
|
wizardActionSelection="output"
|
||||||
outputDefaultSelection="category"
|
outputDefaultSelection="category"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -139,7 +141,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -154,10 +157,9 @@
|
||||||
property="visible"
|
property="visible"
|
||||||
onUpdate=(action "mappedFieldUpdated")
|
onUpdate=(action "mappedFieldUpdated")
|
||||||
options=(hash
|
options=(hash
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true userFieldSelection=true context="action"
|
||||||
userFieldSelection=true
|
)
|
||||||
context="action"
|
}}
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -172,10 +174,8 @@
|
||||||
inputs=action.add_event
|
inputs=action.add_event
|
||||||
property="add_event"
|
property="add_event"
|
||||||
onUpdate=(action "mappedFieldUpdated")
|
onUpdate=(action "mappedFieldUpdated")
|
||||||
options=(hash
|
options=(hash wizardFieldSelection=true context="action")
|
||||||
wizardFieldSelection=true
|
}}
|
||||||
context="action"
|
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -191,10 +191,8 @@
|
||||||
inputs=action.add_location
|
inputs=action.add_location
|
||||||
property="add_location"
|
property="add_location"
|
||||||
onUpdate=(action "mappedFieldUpdated")
|
onUpdate=(action "mappedFieldUpdated")
|
||||||
options=(hash
|
options=(hash wizardFieldSelection=true context="action")
|
||||||
wizardFieldSelection=true
|
}}
|
||||||
context="action"
|
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -219,7 +217,8 @@
|
||||||
userSelection="output"
|
userSelection="output"
|
||||||
outputDefaultSelection="user"
|
outputDefaultSelection="user"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -242,7 +241,8 @@
|
||||||
wizardActionSelection="value"
|
wizardActionSelection="value"
|
||||||
keyDefaultSelection="userField"
|
keyDefaultSelection="userField"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -260,7 +260,8 @@
|
||||||
options=(hash
|
options=(hash
|
||||||
isDisabled=action.custom_title_enabled
|
isDisabled=action.custom_title_enabled
|
||||||
none="admin.wizard.action.send_to_api.select_an_api"
|
none="admin.wizard.action.send_to_api.select_an_api"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -277,7 +278,8 @@
|
||||||
options=(hash
|
options=(hash
|
||||||
isDisabled=apiEmpty
|
isDisabled=apiEmpty
|
||||||
none="admin.wizard.action.send_to_api.select_an_endpoint"
|
none="admin.wizard.action.send_to_api.select_an_endpoint"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -292,7 +294,8 @@
|
||||||
previewEnabled=false
|
previewEnabled=false
|
||||||
barEnabled=false
|
barEnabled=false
|
||||||
wizardFields=wizardFields
|
wizardFields=wizardFields
|
||||||
placeholder="admin.wizard.action.send_to_api.body_placeholder"}}
|
placeholder="admin.wizard.action.send_to_api.body_placeholder"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -316,7 +319,8 @@
|
||||||
groupSelection="value,output"
|
groupSelection="value,output"
|
||||||
outputDefaultSelection="group"
|
outputDefaultSelection="group"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -339,7 +343,8 @@
|
||||||
groupSelection="key,value"
|
groupSelection="key,value"
|
||||||
categorySelection="key,value"
|
categorySelection="key,value"
|
||||||
userSelection="key,value"
|
userSelection="key,value"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -362,13 +367,16 @@
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
categorySelection="output"
|
categorySelection="output"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -380,13 +388,16 @@
|
||||||
context="action"
|
context="action"
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -397,7 +408,8 @@
|
||||||
options=(hash
|
options=(hash
|
||||||
isDisabled=action.custom_title_enabled
|
isDisabled=action.custom_title_enabled
|
||||||
none="admin.wizard.action.watch_x.select_a_notification_level"
|
none="admin.wizard.action.watch_x.select_a_notification_level"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -407,7 +419,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=action.wizard_user}}
|
<Input @type="checkbox" @checked={{this.action.wizard_user}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -426,7 +438,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
userSelection="output"
|
userSelection="output"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -449,13 +462,16 @@
|
||||||
wizardActionSelection=true
|
wizardActionSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -466,7 +482,8 @@
|
||||||
options=(hash
|
options=(hash
|
||||||
isDisabled=action.custom_title_enabled
|
isDisabled=action.custom_title_enabled
|
||||||
none="admin.wizard.action.watch_x.select_a_notification_level"
|
none="admin.wizard.action.watch_x.select_a_notification_level"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -476,7 +493,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=action.wizard_user}}
|
<Input @type="checkbox" @checked={{this.action.wizard_user}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -495,7 +512,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
userSelection="output"
|
userSelection="output"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -516,7 +534,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
|
@ -534,7 +553,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
|
@ -552,7 +572,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
|
@ -570,7 +591,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
|
@ -589,7 +611,8 @@
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
userSelection="output"
|
userSelection="output"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
|
@ -608,12 +631,15 @@
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
userSelection="output"
|
userSelection="output"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -626,12 +652,15 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -644,12 +673,15 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -662,12 +694,15 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -680,12 +715,15 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -698,7 +736,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -715,11 +754,12 @@
|
||||||
property="name"
|
property="name"
|
||||||
onUpdate=(action "mappedFieldUpdated")
|
onUpdate=(action "mappedFieldUpdated")
|
||||||
options=(hash
|
options=(hash
|
||||||
textSelection="key,value"
|
textSelection="key,value,output"
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -738,7 +778,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -757,7 +798,8 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -776,13 +818,16 @@
|
||||||
wizardFieldSelection=true
|
wizardFieldSelection=true
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting full field-mapper-setting">
|
<div class="setting full field-mapper-setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
|
@ -796,7 +841,8 @@
|
||||||
userFieldSelection="key,value"
|
userFieldSelection="key,value"
|
||||||
categorySelection="output"
|
categorySelection="output"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -818,7 +864,8 @@
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
groupSelection="key"
|
groupSelection="key"
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -842,7 +889,8 @@
|
||||||
userFieldSelection="value"
|
userFieldSelection="value"
|
||||||
keyPlaceholder="admin.wizard.action.custom_fields.key"
|
keyPlaceholder="admin.wizard.action.custom_fields.key"
|
||||||
context=customFieldsContext
|
context=customFieldsContext
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -864,7 +912,8 @@
|
||||||
userFieldSelection=true
|
userFieldSelection=true
|
||||||
groupSelection=true
|
groupSelection=true
|
||||||
context="action"
|
context="action"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -876,7 +925,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=action.skip_redirect}}
|
<Input @type="checkbox" @checked={{this.action.skip_redirect}} />
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
{{i18n "admin.wizard.action.skip_redirect.description" type="topic"}}
|
{{i18n "admin.wizard.action.skip_redirect.description" type="topic"}}
|
||||||
|
@ -890,10 +939,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="checkbox" checked=action.suppress_notifications}}
|
<Input @type="checkbox" @checked={{this.action.suppress_notifications}} />
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
{{i18n "admin.wizard.action.suppress_notifications.description" type="topic"}}
|
{{i18n
|
||||||
|
"admin.wizard.action.suppress_notifications.description"
|
||||||
|
type="topic"
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -906,7 +958,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input value=action.code}}
|
<Input @value={{this.action.code}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
|
@ -3,7 +3,8 @@
|
||||||
action=(action "undoChanges")
|
action=(action "undoChanges")
|
||||||
icon=undoIcon
|
icon=undoIcon
|
||||||
label=undoKey
|
label=undoKey
|
||||||
class="undo-changes"}}
|
class="undo-changes"
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
<label>{{i18n "admin.wizard.field.label"}}</label>
|
<label>{{i18n "admin.wizard.field.label"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input name="label" value=field.label}}
|
<Input name="label" @value={{this.field.label}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
<span>{{i18n "admin.wizard.field.required_label"}}</span>
|
<span>{{i18n "admin.wizard.field.required_label"}}</span>
|
||||||
{{input type="checkbox" checked=field.required}}
|
<Input @type="checkbox" @checked={{this.field.required}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@
|
||||||
<label>{{i18n "admin.wizard.field.description"}}</label>
|
<label>{{i18n "admin.wizard.field.description"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{textarea name="description" value=field.description}}
|
<Textarea name="description" @value={{this.field.description}} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -46,7 +47,8 @@
|
||||||
onUploadDeleted=(action "imageUploadDeleted")
|
onUploadDeleted=(action "imageUploadDeleted")
|
||||||
type="wizard-field-image"
|
type="wizard-field-image"
|
||||||
class="no-repeat contain-image"
|
class="no-repeat contain-image"
|
||||||
id=(concat "wizard-field-" field.id "-image-upload")}}
|
id=(concat "wizard-field-" field.id "-image-upload")
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -56,20 +58,18 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{combo-box
|
{{wizard-subscription-selector
|
||||||
value=field.type
|
value=field.type
|
||||||
content=fieldTypes
|
feature="field"
|
||||||
|
attribute="type"
|
||||||
onChange=(action "changeType")
|
onChange=(action "changeType")
|
||||||
options=(hash
|
wizard=wizard
|
||||||
none="admin.wizard.select_type"
|
options=(hash none="admin.wizard.select_type")
|
||||||
)}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{wizard-message
|
{{wizard-message key=messageKey url=messageUrl component="field"}}
|
||||||
key=messageKey
|
|
||||||
url=messageUrl
|
|
||||||
component="field"}}
|
|
||||||
|
|
||||||
{{#if isTextType}}
|
{{#if isTextType}}
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
|
@ -78,11 +78,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input
|
<Input
|
||||||
type="number"
|
@type="number"
|
||||||
name="min_length"
|
name="min_length"
|
||||||
value=field.min_length
|
@value={{this.field.min_length}}
|
||||||
class="small"}}
|
class="small"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -92,11 +93,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input
|
<Input
|
||||||
type="number"
|
@type="number"
|
||||||
name="max_length"
|
name="max_length"
|
||||||
value=field.max_length
|
@value={{this.field.max_length}}
|
||||||
class="small"}}
|
class="small"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -107,9 +109,7 @@
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
<span>{{i18n "admin.wizard.field.char_counter_placeholder"}}</span>
|
<span>{{i18n "admin.wizard.field.char_counter_placeholder"}}</span>
|
||||||
{{input
|
<Input @type="checkbox" @checked={{this.field.char_counter}} />
|
||||||
type="checkbox"
|
|
||||||
checked=field.char_counter}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -119,10 +119,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{textarea
|
<Textarea
|
||||||
name="field_placeholder"
|
name="field_placeholder"
|
||||||
class="medium"
|
class="medium"
|
||||||
value=field.placeholder}}
|
@value={{this.field.placeholder}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -134,7 +135,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{textarea name="preview-template" value=field.preview_template class="preview-template"}}
|
<Textarea
|
||||||
|
name="preview-template"
|
||||||
|
class="preview-template"
|
||||||
|
@value={{this.field.preview_template}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -146,7 +151,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input value=field.file_types class="medium"}}
|
<Input @value={{this.field.file_types}} class="medium" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -158,7 +163,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="number" value=field.limit class="small"}}
|
<Input @type="number" @value={{this.field.limit}} class="small" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -166,12 +171,16 @@
|
||||||
{{#if isDateTime}}
|
{{#if isDateTime}}
|
||||||
<div class="setting">
|
<div class="setting">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input value=field.format class="medium"}}
|
<Input @value={{this.field.format}} class="medium" />
|
||||||
<label>{{html-safe (i18n "admin.wizard.field.date_time_format.instructions")}}</label>
|
<label>{{html-safe
|
||||||
|
(i18n "admin.wizard.field.date_time_format.instructions")
|
||||||
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -187,7 +196,8 @@
|
||||||
inputs=field.prefill
|
inputs=field.prefill
|
||||||
property="prefill"
|
property="prefill"
|
||||||
onUpdate=(action "mappedFieldUpdated")
|
onUpdate=(action "mappedFieldUpdated")
|
||||||
options=prefillOptions}}
|
options=prefillOptions
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -203,7 +213,8 @@
|
||||||
inputs=field.content
|
inputs=field.content
|
||||||
property="content"
|
property="content"
|
||||||
onUpdate=(action "mappedFieldUpdated")
|
onUpdate=(action "mappedFieldUpdated")
|
||||||
options=contentOptions}}
|
options=contentOptions
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -229,9 +240,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input
|
<Input @type="checkbox" @checked={{this.field.can_create_tag}} />
|
||||||
type="checkbox"
|
|
||||||
checked=field.can_create_tag}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -243,9 +252,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{wizard-mapper
|
{{wizard-mapper inputs=field.condition options=fieldConditionOptions}}
|
||||||
inputs=field.condition
|
|
||||||
options=fieldConditionOptions}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -255,9 +262,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{wizard-mapper
|
{{wizard-mapper inputs=field.index options=fieldIndexOptions}}
|
||||||
inputs=field.index
|
|
||||||
options=fieldIndexOptions}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -272,9 +277,8 @@
|
||||||
value=field.property
|
value=field.property
|
||||||
content=categoryPropertyTypes
|
content=categoryPropertyTypes
|
||||||
onChange=(action (mut field.property))
|
onChange=(action (mut field.property))
|
||||||
options=(hash
|
options=(hash none="admin.wizard.selector.placeholder.property")
|
||||||
none="admin.wizard.selector.placeholder.property"
|
}}
|
||||||
)}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -3,9 +3,7 @@
|
||||||
<label>{{i18n "admin.wizard.step.title"}}</label>
|
<label>{{i18n "admin.wizard.step.title"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input
|
<Input name="title" @value={{this.step.title}} />
|
||||||
name="title"
|
|
||||||
value=step.title}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -20,7 +18,8 @@
|
||||||
onUploadDeleted=(action "bannerUploadDeleted")
|
onUploadDeleted=(action "bannerUploadDeleted")
|
||||||
type="wizard-step-banner"
|
type="wizard-step-banner"
|
||||||
class="no-repeat contain-image"
|
class="no-repeat contain-image"
|
||||||
id=(concat "wizard-step-" step.id "-banner-upload")}}
|
id=(concat "wizard-step-" step.id "-banner-upload")
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -29,8 +28,7 @@
|
||||||
<label>{{i18n "admin.wizard.step.description"}}</label>
|
<label>{{i18n "admin.wizard.step.description"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{wizard-text-editor
|
{{wizard-text-editor value=step.raw_description}}
|
||||||
value=step.raw_description}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -41,9 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{wizard-mapper
|
{{wizard-mapper inputs=step.condition options=stepConditionOptions}}
|
||||||
inputs=step.condition
|
|
||||||
options=stepConditionOptions}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -51,7 +47,7 @@
|
||||||
<div class="setting-label"></div>
|
<div class="setting-label"></div>
|
||||||
<div class="setting-value force-final">
|
<div class="setting-value force-final">
|
||||||
<h4>{{i18n "admin.wizard.step.force_final.label"}}</h4>
|
<h4>{{i18n "admin.wizard.step.force_final.label"}}</h4>
|
||||||
{{input type="checkbox" checked=step.force_final}}
|
<Input @type="checkbox" @checked={{this.step.force_final}} />
|
||||||
<span>{{i18n "admin.wizard.step.force_final.description"}}</span>
|
<span>{{i18n "admin.wizard.step.force_final.description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -71,13 +67,14 @@
|
||||||
userFieldSelection="value"
|
userFieldSelection="value"
|
||||||
keyPlaceholder="admin.wizard.submission_key"
|
keyPlaceholder="admin.wizard.submission_key"
|
||||||
context="step"
|
context="step"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
{{#if step.required_data}}
|
{{#if step.required_data}}
|
||||||
<div class="required-data-message">
|
<div class="required-data-message">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
{{i18n "admin.wizard.step.required_data.not_permitted_message"}}
|
{{i18n "admin.wizard.step.required_data.not_permitted_message"}}
|
||||||
</div>
|
</div>
|
||||||
{{input value=step.required_data_message}}
|
<Input @value={{this.step.required_data_message}} />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -96,7 +93,8 @@
|
||||||
keyPlaceholder="admin.wizard.param_key"
|
keyPlaceholder="admin.wizard.param_key"
|
||||||
valuePlaceholder="admin.wizard.submission_key"
|
valuePlaceholder="admin.wizard.submission_key"
|
||||||
context="step"
|
context="step"
|
||||||
)}}
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/wizard-subscription-container}}
|
{{/wizard-subscription-container}}
|
||||||
|
@ -105,15 +103,18 @@
|
||||||
itemType="field"
|
itemType="field"
|
||||||
current=currentField
|
current=currentField
|
||||||
items=step.fields
|
items=step.fields
|
||||||
parentId=step.id}}
|
parentId=step.id
|
||||||
|
}}
|
||||||
|
|
||||||
{{#each step.fields as |field|}}
|
{{#each step.fields as |field|}}
|
||||||
{{wizard-custom-field
|
{{wizard-custom-field
|
||||||
field=field
|
field=field
|
||||||
step=step
|
step=step
|
||||||
|
wizard=wizard
|
||||||
currentFieldId=currentField.id
|
currentFieldId=currentField.id
|
||||||
fieldTypes=fieldTypes
|
fieldTypes=fieldTypes
|
||||||
removeField="removeField"
|
removeField="removeField"
|
||||||
wizardFields=wizardFields
|
wizardFields=wizardFields
|
||||||
subscribed=subscribed}}
|
subscribed=subscribed
|
||||||
|
}}
|
||||||
{{/each}}
|
{{/each}}
|
|
@ -4,14 +4,34 @@
|
||||||
{{#if anyLinks}}
|
{{#if anyLinks}}
|
||||||
{{#each links as |link|}}
|
{{#each links as |link|}}
|
||||||
<div data-id={{link.id}}>
|
<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}}
|
{{#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}}
|
||||||
{{#unless link.last}}
|
{{#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}}
|
{{/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>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
{{combo-box
|
{{combo-box
|
||||||
value=connector
|
value=connector
|
||||||
content=connectors
|
content=connectors
|
||||||
onChange=(action "changeConnector")}}
|
onChange=(action "changeConnector")
|
||||||
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if connector}}
|
{{#if connector}}
|
||||||
<span class="connector-single">
|
<span class="connector-single">
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
inputType=inputType
|
inputType=inputType
|
||||||
connectorType="type"
|
connectorType="type"
|
||||||
options=options
|
options=options
|
||||||
onUpdate=onUpdate}}
|
onUpdate=onUpdate
|
||||||
|
}}
|
||||||
|
|
||||||
{{#if hasPairs}}
|
{{#if hasPairs}}
|
||||||
<div class="mapper-pairs mapper-block">
|
<div class="mapper-pairs mapper-block">
|
||||||
|
@ -16,7 +17,8 @@
|
||||||
inputType=inputType
|
inputType=inputType
|
||||||
options=options
|
options=options
|
||||||
removePair=(action "removePair")
|
removePair=(action "removePair")
|
||||||
onUpdate=onUpdate}}
|
onUpdate=onUpdate
|
||||||
|
}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
{{#if canAddPair}}
|
{{#if canAddPair}}
|
||||||
|
@ -35,7 +37,8 @@
|
||||||
connectorType="output"
|
connectorType="output"
|
||||||
inputType=inputType
|
inputType=inputType
|
||||||
options=options
|
options=options
|
||||||
onUpdate=onUpdate}}
|
onUpdate=onUpdate
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="output mapper-block">
|
<div class="output mapper-block">
|
||||||
|
@ -45,7 +48,8 @@
|
||||||
value=input.output
|
value=input.output
|
||||||
activeType=input.output_type
|
activeType=input.output_type
|
||||||
options=options
|
options=options
|
||||||
onUpdate=onUpdate}}
|
onUpdate=onUpdate
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
value=pair.key
|
value=pair.key
|
||||||
activeType=pair.key_type
|
activeType=pair.key_type
|
||||||
options=options
|
options=options
|
||||||
onUpdate=onUpdate}}
|
onUpdate=onUpdate
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{wizard-mapper-connector
|
{{wizard-mapper-connector
|
||||||
|
@ -14,7 +15,8 @@
|
||||||
connectorType="pair"
|
connectorType="pair"
|
||||||
inputType=inputType
|
inputType=inputType
|
||||||
options=options
|
options=options
|
||||||
onUpdate=onUpdate}}
|
onUpdate=onUpdate
|
||||||
|
}}
|
||||||
|
|
||||||
<div class="value mapper-block">
|
<div class="value mapper-block">
|
||||||
{{wizard-mapper-selector
|
{{wizard-mapper-selector
|
||||||
|
@ -24,7 +26,8 @@
|
||||||
activeType=pair.value_type
|
activeType=pair.value_type
|
||||||
options=options
|
options=options
|
||||||
onUpdate=onUpdate
|
onUpdate=onUpdate
|
||||||
connector=pair.connector}}
|
connector=pair.connector
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if showJoin}}
|
{{#if showJoin}}
|
||||||
|
@ -32,5 +35,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showRemove}}
|
{{#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}}
|
{{/if}}
|
|
@ -10,7 +10,8 @@
|
||||||
{{wizard-mapper-selector-type
|
{{wizard-mapper-selector-type
|
||||||
activeType=activeType
|
activeType=activeType
|
||||||
item=item
|
item=item
|
||||||
toggle=(action "toggleType")}}
|
toggle=(action "toggleType")
|
||||||
|
}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -21,11 +22,12 @@
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
{{#if showText}}
|
{{#if showText}}
|
||||||
{{input
|
<Input
|
||||||
type="text"
|
@type="text"
|
||||||
value=value
|
@value={{this.value}}
|
||||||
placeholder=(i18n placeholderKey)
|
placeholder={{i18n placeholderKey}}
|
||||||
change=(action "changeInputValue")}}
|
{{on "change" (action "changeInputValue")}}
|
||||||
|
/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showComboBox}}
|
{{#if showComboBox}}
|
||||||
|
@ -33,10 +35,8 @@
|
||||||
value=value
|
value=value
|
||||||
content=comboBoxContent
|
content=comboBoxContent
|
||||||
onChange=(action "changeValue")
|
onChange=(action "changeValue")
|
||||||
options=(hash
|
options=(hash none=placeholderKey allowAny=comboBoxAllowAny)
|
||||||
none=placeholderKey
|
}}
|
||||||
allowAny=comboBoxAllowAny
|
|
||||||
)}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showMultiSelect}}
|
{{#if showMultiSelect}}
|
||||||
|
@ -44,14 +44,16 @@
|
||||||
content=multiSelectContent
|
content=multiSelectContent
|
||||||
value=value
|
value=value
|
||||||
onChange=(action "changeValue")
|
onChange=(action "changeValue")
|
||||||
options=multiSelectOptions}}
|
options=multiSelectOptions
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showList}}
|
{{#if showList}}
|
||||||
{{wizard-value-list
|
{{wizard-value-list
|
||||||
values=value
|
values=value
|
||||||
addKey=placeholderKey
|
addKey=placeholderKey
|
||||||
onChange=(action "changeValue")}}
|
onChange=(action "changeValue")
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showTag}}
|
{{#if showTag}}
|
||||||
|
@ -59,10 +61,8 @@
|
||||||
tags=value
|
tags=value
|
||||||
onChange=(action "changeValue")
|
onChange=(action "changeValue")
|
||||||
everyTag=true
|
everyTag=true
|
||||||
options=(hash
|
options=(hash none=placeholderKey filterable=true)
|
||||||
none=placeholderKey
|
}}
|
||||||
filterable=true
|
|
||||||
)}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showUser}}
|
{{#if showUser}}
|
||||||
|
@ -71,8 +71,7 @@
|
||||||
value=value
|
value=value
|
||||||
autocomplete="discourse"
|
autocomplete="discourse"
|
||||||
onChange=(action "changeUserValue")
|
onChange=(action "changeUserValue")
|
||||||
options=(hash
|
options=(hash includeMessageableGroups="true")
|
||||||
includeMessageableGroups="true"
|
}}
|
||||||
)}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
|
@ -3,14 +3,16 @@
|
||||||
{{wizard-mapper-connector
|
{{wizard-mapper-connector
|
||||||
connector=input.connector
|
connector=input.connector
|
||||||
connectorType="input"
|
connectorType="input"
|
||||||
onUpdate=(action "inputUpdated")}}
|
onUpdate=(action "inputUpdated")
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{wizard-mapper-input
|
{{wizard-mapper-input
|
||||||
input=input
|
input=input
|
||||||
options=inputOptions
|
options=inputOptions
|
||||||
remove=(action "remove")
|
remove=(action "remove")
|
||||||
onUpdate=(action "inputUpdated")}}
|
onUpdate=(action "inputUpdated")
|
||||||
|
}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
{{#if canAdd}}
|
{{#if canAdd}}
|
||||||
|
|
|
@ -7,32 +7,44 @@
|
||||||
<li>
|
<li>
|
||||||
<span class="setting-title">
|
<span class="setting-title">
|
||||||
<h4>{{i18n (concat "admin.wizard.field.validations." type)}}</h4>
|
<h4>{{i18n (concat "admin.wizard.field.validations." type)}}</h4>
|
||||||
{{input type="checkbox" checked=props.status}}
|
<Input @type="checkbox" @checked={{this.props.status}} />
|
||||||
{{i18n "admin.wizard.field.validations.enabled"}}
|
{{i18n "admin.wizard.field.validations.enabled"}}
|
||||||
</span>
|
</span>
|
||||||
<div class="validation-container">
|
<div class="validation-container">
|
||||||
<div class="validation-section">
|
<div class="validation-section">
|
||||||
<div class="setting-label">
|
<div class="setting-label">
|
||||||
<label>{{i18n "admin.wizard.field.validations.categories"}}</label>
|
<label>{{i18n
|
||||||
|
"admin.wizard.field.validations.categories"
|
||||||
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{category-selector
|
{{category-selector
|
||||||
categories=(get this (concat "validationBuffer." type ".categories"))
|
categories=(get
|
||||||
|
this (concat "validationBuffer." type ".categories")
|
||||||
|
)
|
||||||
onChange=(action "updateValidationCategories" type props)
|
onChange=(action "updateValidationCategories" type props)
|
||||||
class="wizard"}}
|
class="wizard"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="validation-section">
|
<div class="validation-section">
|
||||||
<div class="setting-label">
|
<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>
|
||||||
<div class="setting-value">
|
<div class="setting-value">
|
||||||
{{input type="number" class="time-n-value" value=props.time_n_value}}
|
<Input
|
||||||
|
@type="number"
|
||||||
|
@value={{this.props.time_n_value}}
|
||||||
|
class="time-n-value"
|
||||||
|
/>
|
||||||
{{combo-box
|
{{combo-box
|
||||||
value=(readonly props.time_unit)
|
value=(readonly props.time_unit)
|
||||||
content=timeUnits
|
content=timeUnits
|
||||||
class="time-unit-selector"
|
class="time-unit-selector"
|
||||||
onChange=(action (mut props.time_unit))}}
|
onChange=(action (mut props.time_unit))
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="validation-section">
|
<div class="validation-section">
|
||||||
|
@ -40,9 +52,17 @@
|
||||||
<label>{{i18n "admin.wizard.field.validations.position"}}</label>
|
<label>{{i18n "admin.wizard.field.validations.position"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-value">
|
<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>
|
<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>
|
<span>{{i18n "admin.wizard.field.validations.below"}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,24 @@
|
||||||
<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">
|
<svg
|
||||||
<g id="pavilion-logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
width="300px"
|
||||||
<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>
|
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>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
<span>{{label}}</span>
|
<span>{{label}}</span>
|
Vorher Breite: | Höhe: | Größe: 538 B Nachher Breite: | Höhe: | Größe: 602 B |
|
@ -1,6 +1,7 @@
|
||||||
<div class="select-kit-header-wrapper">
|
<div class="select-kit-header-wrapper">
|
||||||
|
|
||||||
{{component selectKit.options.selectedNameComponent
|
{{component
|
||||||
|
selectKit.options.selectedNameComponent
|
||||||
tabindex=tabindex
|
tabindex=tabindex
|
||||||
item=selectedContent
|
item=selectedContent
|
||||||
selectKit=selectKit
|
selectKit=selectKit
|
||||||
|
|
|
@ -16,7 +16,10 @@
|
||||||
|
|
||||||
{{#if isComposer}}
|
{{#if isComposer}}
|
||||||
<div class="wizard-table-long-text">
|
<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}}
|
{{value.value}}
|
||||||
</p>
|
</p>
|
||||||
<a href {{action "expandText"}}>
|
<a href {{action "expandText"}}>
|
||||||
|
@ -28,7 +31,8 @@
|
||||||
{{#if isComposerPreview}}
|
{{#if isComposerPreview}}
|
||||||
{{d-icon "comment-alt"}}
|
{{d-icon "comment-alt"}}
|
||||||
<span class="wizard-table-composer-text">
|
<span class="wizard-table-composer-text">
|
||||||
{{i18n "admin.wizard.submissions.composer_preview"}}: {{value.value}}
|
{{i18n "admin.wizard.submissions.composer_preview"}}:
|
||||||
|
{{value.value}}
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -146,7 +150,12 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if showUsername}}
|
{{#if showUsername}}
|
||||||
<a target="_blank" rel="noopener noreferrer" href={{userProfileUrl}} title={{username}}>
|
<a
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
href={{userProfileUrl}}
|
||||||
|
title={{username}}
|
||||||
|
>
|
||||||
{{username}}
|
{{username}}
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
{{d-editor
|
{{d-editor value=value forcePreview=forcePreview placeholder=placeholder}}
|
||||||
value=value
|
|
||||||
forcePreview=forcePreview
|
|
||||||
placeholder=placeholder}}
|
|
||||||
|
|
||||||
<div class="wizard-editor-gutter">
|
<div class="wizard-editor-gutter">
|
||||||
{{#if previewEnabled}}
|
{{#if previewEnabled}}
|
||||||
{{d-button
|
{{d-button action=(action "togglePreview") translatedLabel=previewLabel}}
|
||||||
action=(action "togglePreview")
|
|
||||||
translatedLabel=previewLabel}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if fieldsEnabled}}
|
{{#if fieldsEnabled}}
|
||||||
{{d-button
|
{{d-button action=(action "togglePopover") translatedLabel=popoverLabel}}
|
||||||
action=(action "togglePopover")
|
|
||||||
translatedLabel=popoverLabel}}
|
|
||||||
|
|
||||||
{{#if showPopover}}
|
{{#if showPopover}}
|
||||||
<div class="wizard-editor-gutter-popover">
|
<div class="wizard-editor-gutter-popover">
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
{{#if noAccess}}
|
{{#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}}
|
{{/if}}
|
|
@ -16,5 +16,6 @@
|
||||||
wizard=wizard
|
wizard=wizard
|
||||||
goNext=(action "goNext")
|
goNext=(action "goNext")
|
||||||
goBack=(action "goBack")
|
goBack=(action "goBack")
|
||||||
showMessage=(action "showMessage")}}
|
showMessage=(action "showMessage")
|
||||||
|
}}
|
||||||
{{/if}}
|
{{/if}}
|
|
@ -4,7 +4,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="wizard-footer">
|
<div class="wizard-footer">
|
||||||
{{#if customWizard}}
|
{{#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}}
|
{{else}}
|
||||||
<div class="discourse-logo"></div>
|
<div class="discourse-logo"></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -8,7 +8,10 @@
|
||||||
<div class="left-content">
|
<div class="left-content">
|
||||||
<label class="column-name">
|
<label class="column-name">
|
||||||
{{input type="checkbox" checked=column.enabled}}
|
{{input type="checkbox" checked=column.enabled}}
|
||||||
{{directory-table-header-title field=column.label translated=true}}
|
{{directory-table-header-title
|
||||||
|
field=column.label
|
||||||
|
translated=true
|
||||||
|
}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,5 +12,6 @@
|
||||||
action=(action "submit")
|
action=(action "submit")
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
label="admin.wizard.after_time_modal.done"
|
label="admin.wizard.after_time_modal.done"
|
||||||
disabled=submitDisabled}}
|
disabled=submitDisabled
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
|
@ -32,15 +32,10 @@ body.custom-wizard {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.invalid {
|
&.invalid .wizard-focusable {
|
||||||
textarea,
|
|
||||||
input[type="text"],
|
|
||||||
input[type="checkbox"],
|
|
||||||
.select-kit {
|
|
||||||
outline: 4px solid var(--danger);
|
outline: 4px solid var(--danger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.checkbox-field {
|
.checkbox-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -17,7 +17,7 @@ body.custom-wizard .wizard-column {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img.emoji {
|
.emoji {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
@ -29,7 +29,7 @@ body.custom-wizard .wizard-column {
|
||||||
|
|
||||||
p {
|
p {
|
||||||
img {
|
img {
|
||||||
@extend img.emoji;
|
@extend .emoji;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden …
In neuem Issue referenzieren