Commits vergleichen
376 Commits
Autor | SHA1 | Datum | |
---|---|---|---|
5fe63ec70e | |||
6bc33ebd64 | |||
df456abda0 | |||
df30ce32ee | |||
4750829e1a | |||
49535d88bb | |||
|
d5aa616ff8 | ||
|
578c92e90e | ||
|
3d104406fd | ||
|
0eb6fb1ae0 | ||
|
0992e9601c | ||
|
10609f33e2 | ||
|
bb81c5700a | ||
|
03ef41f7f0 | ||
|
bdd290f4e6 | ||
|
2ab15aaf86 | ||
|
de9dccf233 | ||
|
bb3f0c6252 | ||
|
61309fd320 | ||
|
b365b5dd4f | ||
|
de03cbd15a | ||
|
29d7818a4a | ||
|
f2d1437cff | ||
|
9ab4ca21c8 | ||
|
16109b01e7 | ||
|
43cd090b17 | ||
|
5f99dc226a | ||
|
2460685e65 | ||
|
c6fded7113 | ||
|
713c1bcaa5 | ||
|
ffa37e895c | ||
|
22fac139b6 | ||
|
61ea75dcad | ||
|
766d3b5fc9 | ||
|
a786b5956b | ||
|
794b7c9d5c | ||
|
76c359be3b | ||
|
6572b32706 | ||
|
d71d9976b8 | ||
|
27596a1624 | ||
|
3c17ef574e | ||
|
742239b023 | ||
|
33a320021f | ||
|
e6f44b7dfc | ||
|
31f917ec80 | ||
|
6c0d7a671e | ||
|
31b2625a65 | ||
|
bce0acbfd2 | ||
|
b81bc762c7 | ||
|
785bce228e | ||
|
52efc15576 | ||
|
ebc0f706e3 | ||
|
050a38a9d3 | ||
|
8649ab2286 | ||
|
037132fb1a | ||
|
8332818616 | ||
|
36d6f9bc6f | ||
|
121d60330a | ||
|
13a1538eb9 | ||
|
fee56c2d43 | ||
|
da4fe79aea | ||
|
0a450d58f4 | ||
|
b45e01803d | ||
|
b8cfaa7f23 | ||
|
690f12ee3e | ||
|
1f35b80f85 | ||
|
72b1a2aca5 | ||
|
f5129b7ffe | ||
|
a342626267 | ||
|
3fe1a7c7e8 | ||
|
609df33680 | ||
|
ec739d0450 | ||
|
c26a89a78a | ||
|
ec88af0cc0 | ||
|
10d597c495 | ||
|
cc2eb8c742 | ||
|
98fe9ce77f | ||
|
55a4797e4f | ||
|
33da03b63a | ||
|
580889a34e | ||
|
8d32aebf05 | ||
|
b71f627d73 | ||
|
1b93c06188 | ||
|
4449ab7aff | ||
|
1662ff166d | ||
|
270d7926cc | ||
|
a13f7be6a3 | ||
|
f94df66613 | ||
|
5aefa9c544 | ||
|
7861e37224 | ||
|
6a9f93bccb | ||
|
bf2dcdba86 | ||
|
6beccd95f0 | ||
|
603886b394 | ||
|
7fd4d9bd24 | ||
|
0cec743253 | ||
|
ccb7095b00 | ||
|
3189c03fbe | ||
|
c4521b4b92 | ||
|
00a66cd1f9 | ||
|
c495540157 | ||
|
b8965de717 | ||
|
6f4e7015f8 | ||
|
90046f5fe3 | ||
|
ba20a8a195 | ||
|
1f928f0f81 | ||
|
c67d5075cb | ||
|
2737210baf | ||
|
b73cb95e46 | ||
|
a575ffdf76 | ||
|
e51ba49e11 | ||
|
2df920895d | ||
|
39b947d003 | ||
|
10df3208df | ||
|
d74f5cbd89 | ||
|
eadd64bbbc | ||
|
c85be78af5 | ||
|
ebd25f2780 | ||
|
af39c567ea | ||
|
cd6503d425 | ||
|
6e0f10ca0d | ||
|
f8ea421852 | ||
|
f08f9f303f | ||
|
b4d23970bc | ||
|
7561bc8042 | ||
|
d9ace0449f | ||
|
712c15e845 | ||
|
a5179e568b | ||
|
9e65fcb410 | ||
|
29141ab35c | ||
|
a5ebc282cf | ||
|
0602e59d70 | ||
|
78e7ae4e04 | ||
|
c8a19e8c85 | ||
|
298c083624 | ||
|
92b8fdc6d9 | ||
|
61bf199934 | ||
|
86e6945ad4 | ||
|
e7ab0f7143 | ||
|
519e868078 | ||
|
c1f06c6fff | ||
|
42d6e094a2 | ||
|
2fe8501c65 | ||
|
c256a41668 | ||
|
99e747a331 | ||
|
2cb876ac69 | ||
|
acbaebf0aa | ||
|
97db657227 | ||
|
c1ee353470 | ||
|
4bfea70dde | ||
|
12ca60775a | ||
|
4cdfdbf9d5 | ||
|
6dbd8f7c4f | ||
|
49c1848e88 | ||
|
00ba8425e3 | ||
|
705c84dd02 | ||
|
dc23db7a0c | ||
|
929edc5d0e | ||
|
594a226576 | ||
|
b965afa020 | ||
|
92461ad9d3 | ||
|
a4a18115ee | ||
|
dd8b4b8e99 | ||
|
537ffeb883 | ||
|
69dc96562d | ||
|
c83e514de9 | ||
|
887057d0d2 | ||
|
64b1c0264e | ||
|
02a3c426c0 | ||
|
9793ef6453 | ||
|
ed37c13664 | ||
|
e46d681379 | ||
|
2103c4d67e | ||
|
e4b9be9393 | ||
|
1a84acec21 | ||
|
d0459575e0 | ||
|
0c08b5c044 | ||
|
b3266c6d18 | ||
|
7c56b6d4d7 | ||
|
af064dc655 | ||
|
9ff9844420 | ||
|
63d975eba0 | ||
|
6be5511d18 | ||
|
44f078caff | ||
|
42517c094e | ||
|
99f2e8bbd9 | ||
|
3ea19e1086 | ||
|
92fe9db1e0 | ||
|
4c784d98e6 | ||
|
461e617453 | ||
|
8b443e0f08 | ||
|
caab850127 | ||
|
32a8dcf19f | ||
|
06c812a720 | ||
|
15cc33b8cc | ||
|
54ad75bafd | ||
|
cff6796d7c | ||
|
fcb6b2a359 | ||
|
51624ac819 | ||
|
2f6492c2ed | ||
|
93b574beb7 | ||
|
f7cdc77a06 | ||
|
37cef2ccc2 | ||
|
766cae92ba | ||
|
6b2dd5a443 | ||
|
3d65ad032d | ||
|
2423e9afb7 | ||
|
4c8fd63d6f | ||
|
f29f300a6f | ||
|
b035ab9168 | ||
|
80405555b0 | ||
|
454ed607b4 | ||
|
2114b80185 | ||
|
81372b4d3b | ||
|
61ec6123d7 | ||
|
4ceffb7d0f | ||
|
0f59c9092f | ||
|
0b70806b6b | ||
|
1705a2728f | ||
|
6429bff31a | ||
|
2d8b830962 | ||
|
889caf3fa5 | ||
|
d3e4b16610 | ||
|
5da7030c76 | ||
|
fa3e2d0c55 | ||
|
c4e2f2a4a8 | ||
|
6bcc24eabc | ||
|
3fe42c4183 | ||
|
af62ebb547 | ||
|
978aaf89b0 | ||
|
82aae6d34a | ||
|
5ab4147a40 | ||
|
3f0e1b21f0 | ||
|
e7e9c0e8f8 | ||
|
8734cda00b | ||
|
095cfe1eb6 | ||
|
392b6f3d58 | ||
|
e2797ced64 | ||
|
8fdd21601b | ||
|
759358e081 | ||
|
076e1f4966 | ||
|
a146d57f0e | ||
|
78f5af87e1 | ||
|
83d3ca8eb3 | ||
|
014219c038 | ||
|
1254fcfb4e | ||
|
2c52459f29 | ||
|
ebddcb5606 | ||
|
60d50afc54 | ||
|
99c2c2a461 | ||
|
0a5b7411aa | ||
|
c6c4e31ba9 | ||
|
c6dc80f02c | ||
|
7d6456667a | ||
|
33abececd4 | ||
|
ef1a8d1457 | ||
|
5eca78f172 | ||
|
936efe5aff | ||
|
0e5f0fc86d | ||
|
c375c1dcd9 | ||
|
9b8a3589bd | ||
|
345885bdbd | ||
|
e6d7f3d9bc | ||
|
59f00d6278 | ||
|
c475ec65cd | ||
|
a4e49e7bbc | ||
|
c0ed596ff9 | ||
|
20e7b492ea | ||
|
52fe5166cd | ||
|
24ce4da6f2 | ||
|
e489845daf | ||
|
6a4063951e | ||
|
0e70a5a221 | ||
|
030929a414 | ||
|
3a5430c767 | ||
|
091362cb00 | ||
|
631b5fe44c | ||
|
c2c86b12c2 | ||
|
b73437299c | ||
|
a84bf52542 | ||
|
148e188490 | ||
|
a3b665434c | ||
|
9e59b73ebe | ||
|
092947f68b | ||
|
320196b1f0 | ||
|
e422867729 | ||
|
9bb01d29ab | ||
|
0fc2c6b850 | ||
|
762ddfa16e | ||
|
ebea3e666a | ||
|
71277f8448 | ||
|
3e25f43ba0 | ||
|
7068dfd727 | ||
|
ce914c3f57 | ||
|
aef9ed24ae | ||
|
da6e75faca | ||
|
bc81ca89aa | ||
|
dfc23978ae | ||
|
9eb5fc6ff6 | ||
|
643c5ecff0 | ||
|
75d429388e | ||
|
f5d265846d | ||
|
e5d6a20532 | ||
|
e7ee89048a | ||
|
b2b93aad59 | ||
|
7c8f530c86 | ||
|
75e262a526 | ||
|
1e6a5c39b1 | ||
|
4171d81528 | ||
|
edc94b6ea7 | ||
|
a038e72854 | ||
|
202f6ddc06 | ||
|
e82c158c4a | ||
|
a931caffc1 | ||
|
0cb76659e9 | ||
|
7657149e6f | ||
|
1eefd99c6a | ||
|
8f8c6d50c6 | ||
|
735d43e1ee | ||
|
2c84f019bb | ||
|
82d2eee414 | ||
|
ebdc045236 | ||
|
b712b26896 | ||
|
1b3551b13d | ||
|
dfc1540d52 | ||
|
7d2e876584 | ||
|
e21c3fa296 | ||
|
24a8b95e0b | ||
|
146fd30ab5 | ||
|
e88e83dd80 | ||
|
57f591e488 | ||
|
8103a3b9fa | ||
|
be3a479270 | ||
|
8f42268e88 | ||
|
082139cd97 | ||
|
c1007e78f5 | ||
|
ded6dacd60 | ||
|
2557d15a0c | ||
|
f0f27769fd | ||
|
828ded7c05 | ||
|
d6b1655a37 | ||
|
fbf7319c36 | ||
|
7c70e8ca75 | ||
|
ac751b269e | ||
|
ff8294b8e9 | ||
|
ced9d768fb | ||
|
2a38aabdca | ||
|
28cf4421d4 | ||
|
c866395495 | ||
|
9a5328a7e9 | ||
|
28bb6f2886 | ||
|
e67cf5001f | ||
|
b7953fb882 | ||
|
9583851501 | ||
|
bd03d62da1 | ||
|
f54025677a | ||
|
0a03817237 | ||
|
039ba8f603 | ||
|
b05cbec277 | ||
|
6026d67b12 | ||
|
a6b6a2c025 | ||
|
06366a1574 | ||
|
8568a1d97f | ||
|
786c5cd6fc | ||
|
9df0fb97d5 | ||
|
0eaf7b7798 | ||
|
fab0095b1f | ||
|
953123fbf8 | ||
|
23fafeaf05 | ||
|
230fe4a51f | ||
|
27186caafc | ||
|
52d308e7b4 | ||
|
09e56499ca | ||
|
71b6a184ca | ||
|
0f9fa5fe94 | ||
|
cc37043195 |
197 geänderte Dateien mit 8314 neuen und 2841 gelöschten Zeilen
|
@ -1,2 +1,3 @@
|
|||
3.1.999: 1f35b80f85e5fd1efb7f4851f0845700432febdc
|
||||
2.7.99: e07a57e398b6b1676ab42a7e34467556fca5416b
|
||||
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
|
||||
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">
|
||||
|
||||
👋 Looking to report an issue? We're managing issues for this plugin using our [bug report wizard](https://coop.pavilion.tech/w/bug-report).
|
||||
|
||||
## Install
|
||||
|
||||
If you're not sure how to install a plugin in Discourse, please follow the [plugin installation guide](https://meta.discourse.org/t/install-a-plugin/19157) or contact your Discourse hosting provider.
|
||||
|
||||
## Documentation
|
||||
|
||||
[Read the full documentation here](https://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 Settings](https://discourse.pluginmanager.org/t/wizard-settings)
|
||||
- [Step Settings](https://discourse.pluginmanager.org/t/step-settings)
|
||||
- [Field Settings](https://discourse.pluginmanager.org/t/field-settings)
|
||||
- [Conditional Settings](https://discourse.pluginmanager.org/t/conditional-settings)
|
||||
- [Field Interpolation](https://discourse.pluginmanager.org/t/field-interpolation)
|
||||
- [Wizard Examples and Templates](https://discourse.pluginmanager.org/t/wizard-examples-and-templates)
|
||||
- [Wizard Administration](https://coop.pavilion.tech/t/1602)
|
||||
- [Wizard Settings](https://coop.pavilion.tech/t/1614)
|
||||
- [Step Settings](https://coop.pavilion.tech/t/1735)
|
||||
- [Field Settings](https://coop.pavilion.tech/t/1580)
|
||||
- [Conditional Settings](https://coop.pavilion.tech/t/1673)
|
||||
- [Field Interpolation](https://coop.pavilion.tech/t/1557)
|
||||
- [Handling Dates and Times](https://coop.pavilion.tech/t/1708)
|
||||
|
||||
## 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?,
|
||||
subscription_type: subcription.type,
|
||||
subscription_attributes: CustomWizard::Subscription.attributes,
|
||||
subscription_client_installed: subcription.client_installed?
|
||||
subscription_client_installed: CustomWizard::Subscription.client_installed?
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -22,7 +22,12 @@ class CustomWizard::AdminSubmissionsController < CustomWizard::AdminController
|
|||
end
|
||||
|
||||
def download
|
||||
send_data submission_list.submissions.to_json,
|
||||
content = ActiveModel::ArraySerializer.new(
|
||||
CustomWizard::Submission.list(@wizard).submissions,
|
||||
each_serializer: CustomWizard::SubmissionSerializer
|
||||
)
|
||||
|
||||
send_data content.to_json,
|
||||
filename: "#{Discourse.current_hostname}-wizard-submissions-#{@wizard.name}.json",
|
||||
content_type: "application/json",
|
||||
disposition: "attachment"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
class CustomWizard::StepsController < ::ApplicationController
|
||||
before_action :ensure_logged_in
|
||||
class CustomWizard::StepsController < ::CustomWizard::WizardClientController
|
||||
before_action :ensure_can_update
|
||||
|
||||
def update
|
||||
|
@ -22,7 +21,7 @@ class CustomWizard::StepsController < ::ApplicationController
|
|||
|
||||
if updater.success?
|
||||
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)
|
||||
|
||||
current_step = @wizard.find_step(update[:step_id])
|
||||
|
@ -85,7 +84,6 @@ class CustomWizard::StepsController < ::ApplicationController
|
|||
private
|
||||
|
||||
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::InvalidAccess.new if !@builder.wizard || !@builder.wizard.can_access?
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
class CustomWizard::WizardController < ::ApplicationController
|
||||
before_action :ensure_plugin_enabled
|
||||
before_action :ensure_logged_in, only: [:skip]
|
||||
|
||||
class CustomWizard::WizardController < ::CustomWizard::WizardClientController
|
||||
def show
|
||||
if wizard.present?
|
||||
render json: CustomWizard::WizardSerializer.new(wizard, scope: guardian, root: false).as_json, status: 200
|
||||
|
@ -35,19 +32,8 @@ class CustomWizard::WizardController < ::ApplicationController
|
|||
|
||||
def wizard
|
||||
@wizard ||= begin
|
||||
builder = CustomWizard::Builder.new(params[:wizard_id].underscore, current_user)
|
||||
return nil unless builder.present?
|
||||
opts = {}
|
||||
opts[:reset] = params[:reset]
|
||||
builder.build(opts, params)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ensure_plugin_enabled
|
||||
unless SiteSetting.custom_wizard_enabled
|
||||
redirect_to path("/")
|
||||
return nil unless @builder.present?
|
||||
@builder.build({ reset: params[:reset] }, params)
|
||||
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
|
||||
attributes :id,
|
||||
:fields,
|
||||
:submitted_at
|
||||
|
||||
has_one :user, serializer: ::BasicUserSerializer, embed: :objects
|
||||
:submitted_at,
|
||||
:user
|
||||
|
||||
def include_user?
|
||||
object.user.present?
|
||||
object.wizard.user.present?
|
||||
end
|
||||
|
||||
def user
|
||||
::BasicUserSerializer.new(object.wizard.user, root: false).as_json
|
||||
end
|
||||
|
||||
def fields
|
||||
|
|
|
@ -7,7 +7,7 @@ import userSearch from "discourse/lib/user-search";
|
|||
import I18n from "I18n";
|
||||
import Handlebars from "handlebars";
|
||||
import { isEmpty } from "@ember/utils";
|
||||
import TextField from "@ember/component/text-field";
|
||||
import TextField from "discourse/components/text-field";
|
||||
|
||||
const template = function (params) {
|
||||
const options = params.options;
|
||||
|
|
|
@ -12,14 +12,18 @@ import { alias } from "@ember/object/computed";
|
|||
import Site from "discourse/models/site";
|
||||
import { uploadIcon } from "discourse/lib/uploads";
|
||||
import { dasherize } from "@ember/string";
|
||||
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
const IMAGE_MARKDOWN_REGEX = /!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
|
||||
const IMAGE_MARKDOWN_REGEX =
|
||||
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
|
||||
|
||||
export default ComposerEditor.extend({
|
||||
modal: service(),
|
||||
|
||||
classNameBindings: ["fieldClass"],
|
||||
allowUpload: true,
|
||||
showLink: false,
|
||||
showHyperlinkBox: false,
|
||||
topic: null,
|
||||
showToolbar: true,
|
||||
focusTarget: "reply",
|
||||
|
@ -29,6 +33,7 @@ export default ComposerEditor.extend({
|
|||
draftStatus: "null",
|
||||
replyPlaceholder: alias("field.translatedPlaceholder"),
|
||||
wizardEventFieldId: null,
|
||||
composerEventPrefix: "wizard-editor",
|
||||
|
||||
@on("didInsertElement")
|
||||
_composerEditorInit() {
|
||||
|
@ -77,24 +82,13 @@ export default ComposerEditor.extend({
|
|||
$input.on("scroll", this._throttledSyncEditorAndPreviewScroll);
|
||||
this._bindUploadTarget();
|
||||
|
||||
const wizardEventNames = ["insert-text", "replace-text"];
|
||||
const eventPrefix = this.eventPrefix;
|
||||
this.appEvents.reopen({
|
||||
trigger(name, ...args) {
|
||||
let eventParts = name.split(":");
|
||||
let currentEventPrefix = eventParts[0];
|
||||
let currentEventName = eventParts[1];
|
||||
const field = this.field;
|
||||
this.editorInputClass = `.${dasherize(field.type)}-${dasherize(
|
||||
field.id
|
||||
)} .d-editor-input`;
|
||||
|
||||
if (
|
||||
currentEventPrefix !== "wizard-editor" &&
|
||||
wizardEventNames.some((wen) => wen === currentEventName)
|
||||
) {
|
||||
let wizardEventName = name.replace(eventPrefix, "wizard-editor");
|
||||
return this._super(wizardEventName, ...args);
|
||||
} else {
|
||||
return this._super(name, ...args);
|
||||
}
|
||||
},
|
||||
this._uppyInstance.on("file-added", () => {
|
||||
this.session.set("wizardEventFieldId", field.id);
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -116,12 +110,6 @@ export default ComposerEditor.extend({
|
|||
return uploadIcon(false, this.siteSettings);
|
||||
},
|
||||
|
||||
click(e) {
|
||||
if ($(e.target).hasClass("wizard-composer-hyperlink")) {
|
||||
this.set("showHyperlinkBox", false);
|
||||
}
|
||||
},
|
||||
|
||||
@bind
|
||||
_handleImageDeleteButtonClick(event) {
|
||||
if (!event.target.classList.contains("delete-image-button")) {
|
||||
|
@ -132,9 +120,8 @@ export default ComposerEditor.extend({
|
|||
event.target.closest(".button-wrapper").dataset.imageIndex,
|
||||
10
|
||||
);
|
||||
const matchingPlaceholder = this.get("composer.reply").match(
|
||||
IMAGE_MARKDOWN_REGEX
|
||||
);
|
||||
const matchingPlaceholder =
|
||||
this.get("composer.reply").match(IMAGE_MARKDOWN_REGEX);
|
||||
|
||||
this.session.set("wizardEventFieldId", this.field.id);
|
||||
this.appEvents.trigger(
|
||||
|
@ -165,7 +152,7 @@ export default ComposerEditor.extend({
|
|||
shortcut: "K",
|
||||
trimLeading: true,
|
||||
unshift: true,
|
||||
sendAction: () => component.set("showHyperlinkBox", true),
|
||||
sendAction: (event) => component.send("showLinkModal", event),
|
||||
});
|
||||
|
||||
if (this.siteSettings.mentionables_enabled) {
|
||||
|
@ -206,17 +193,16 @@ export default ComposerEditor.extend({
|
|||
this._super(...arguments);
|
||||
},
|
||||
|
||||
addLink(linkName, linkUrl) {
|
||||
let link = `[${linkName}](${linkUrl})`;
|
||||
this.appEvents.trigger("wizard-editor:insert-text", {
|
||||
fieldId: this.field.id,
|
||||
text: link,
|
||||
});
|
||||
this.set("showHyperlinkBox", false);
|
||||
},
|
||||
showLinkModal(toolbarEvent) {
|
||||
let linkText = "";
|
||||
this._lastSel = toolbarEvent.selected;
|
||||
|
||||
hideBox() {
|
||||
this.set("showHyperlinkBox", false);
|
||||
if (this._lastSel) {
|
||||
linkText = this._lastSel.value;
|
||||
}
|
||||
this.modal.show(InsertHyperlink, {
|
||||
model: { linkText, toolbarEvent },
|
||||
});
|
||||
},
|
||||
|
||||
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({
|
||||
useNativePicker: false,
|
||||
classNameBindings: ["fieldClass"],
|
||||
|
||||
@discourseComputed()
|
||||
placeholder() {
|
||||
|
|
|
@ -2,6 +2,8 @@ import DateTimeInput from "discourse/components/date-time-input";
|
|||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
export default DateTimeInput.extend({
|
||||
classNameBindings: ["fieldClass"],
|
||||
|
||||
@discourseComputed("timeFirst", "tabindex")
|
||||
timeTabindex(timeFirst, tabindex) {
|
||||
return timeFirst ? tabindex : tabindex + 1;
|
||||
|
|
|
@ -2,6 +2,8 @@ import Component from "@ember/component";
|
|||
import { observes } from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend({
|
||||
classNameBindings: ["fieldClass"],
|
||||
|
||||
@observes("time")
|
||||
setValue() {
|
||||
this.set("field.value", this.time.format(this.field.format));
|
||||
|
|
|
@ -4,7 +4,7 @@ import { computed } from "@ember/object";
|
|||
|
||||
export default Component.extend(UppyUploadMixin, {
|
||||
classNames: ["wizard-field-upload"],
|
||||
classNameBindings: ["isImage"],
|
||||
classNameBindings: ["isImage", "fieldClass"],
|
||||
uploading: false,
|
||||
type: computed(function () {
|
||||
return `wizard_${this.field.id}`;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import Component from "@ember/component";
|
||||
|
||||
export default Component.extend({});
|
||||
export default Component.extend({
|
||||
classNameBindings: ["fieldClass"],
|
||||
});
|
||||
|
|
|
@ -9,6 +9,7 @@ import CustomWizard, {
|
|||
updateCachedWizard,
|
||||
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
|
||||
import { alias, not } from "@ember/object/computed";
|
||||
import discourseLater from "discourse-common/lib/later";
|
||||
|
||||
const alreadyWarned = {};
|
||||
|
||||
|
@ -110,29 +111,22 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
autoFocus() {
|
||||
schedule("afterRender", () => {
|
||||
const $invalid = $(
|
||||
".wizard-field.invalid:nth-of-type(1) .wizard-focusable"
|
||||
);
|
||||
|
||||
if ($invalid.length) {
|
||||
return $invalid.focus();
|
||||
}
|
||||
|
||||
$(".wizard-focusable:first").focus();
|
||||
discourseLater(() => {
|
||||
schedule("afterRender", () => {
|
||||
if ($(".invalid .wizard-focusable").length) {
|
||||
this.animateInvalidFields();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
animateInvalidFields() {
|
||||
schedule("afterRender", () => {
|
||||
let $element = $(
|
||||
".invalid input[type=text],.invalid textarea,.invalid input[type=checkbox],.invalid .select-kit"
|
||||
);
|
||||
|
||||
if ($element.length) {
|
||||
let $invalid = $(".invalid .wizard-focusable");
|
||||
if ($invalid.length) {
|
||||
$([document.documentElement, document.body]).animate(
|
||||
{
|
||||
scrollTop: $element.offset().top - 200,
|
||||
scrollTop: $invalid.offset().top - 200,
|
||||
},
|
||||
400
|
||||
);
|
||||
|
|
|
@ -4,7 +4,10 @@ export default TagChooser.extend({
|
|||
searchTags(url, data, callback) {
|
||||
if (this.tagGroups) {
|
||||
let tagGroupsString = this.tagGroups.join(",");
|
||||
data.tag_groups = tagGroupsString;
|
||||
data.filterForInput = {
|
||||
name: "custom-wizard-tag-chooser",
|
||||
groups: tagGroupsString,
|
||||
};
|
||||
}
|
||||
|
||||
return this._super(url, data, callback);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import computed from "discourse-common/utils/decorators";
|
||||
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
|
||||
import I18n from "I18n";
|
||||
import TextField from "@ember/component/text-field";
|
||||
import TextField from "discourse/components/text-field";
|
||||
|
||||
export default TextField.extend({
|
||||
attributeBindings: [
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<DModal @closeModal={{@closeModal}} @title={{this.title}}>
|
||||
{{#if loading}}
|
||||
<LoadingSpinner size="large" />
|
||||
{{else}}
|
||||
<div class="edit-directory-columns-container">
|
||||
{{#each @model.columns as |column|}}
|
||||
<div class="edit-directory-column">
|
||||
<div class="left-content">
|
||||
<label class="column-name">
|
||||
<Input @type="checkbox" @checked={{column.enabled}} />
|
||||
{{directory-table-header-title
|
||||
field=column.label
|
||||
translated=true
|
||||
}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="modal-footer">
|
||||
<DButton
|
||||
class="btn-primary"
|
||||
@label="directory.edit_columns.save"
|
||||
@action={{action "save"}}
|
||||
/>
|
||||
|
||||
<DButton
|
||||
class="btn-secondary reset-to-default"
|
||||
@label="directory.edit_columns.reset_to_default"
|
||||
@action={{action "resetToDefault"}}
|
||||
/>
|
||||
</div>
|
||||
</DModal>
|
|
@ -0,0 +1,15 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { action } from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class AdminWizardsColumnComponent extends Component {
|
||||
title = I18n.t("admin.wizard.edit_columns");
|
||||
|
||||
@action save() {
|
||||
this.args.closeModal();
|
||||
}
|
||||
|
||||
@action resetToDefault() {
|
||||
this.args.model.reset();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
<DModal
|
||||
@closeModal={{@closeModal}}
|
||||
class="next-session-time-modal"
|
||||
@title={{this.title}}
|
||||
>
|
||||
<DateTimeInput
|
||||
@date={{this.bufferedDateTime}}
|
||||
@onChange={{action "dateTimeChanged"}}
|
||||
@showTime="true"
|
||||
@clearable="true"
|
||||
/>
|
||||
<div class="modal-footer">
|
||||
<DButton
|
||||
@action={{action "submit"}}
|
||||
class="btn-primary"
|
||||
@label="admin.wizard.after_time_modal.done"
|
||||
@disabled={{this.submitDisabled}}
|
||||
/>
|
||||
</div>
|
||||
</DModal>
|
|
@ -0,0 +1,30 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default class NextSessionScheduledComponent extends Component {
|
||||
@tracked bufferedDateTime;
|
||||
title = I18n.t("admin.wizard.after_time_modal.title");
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.bufferedDateTime = this.args.model.dateTime
|
||||
? moment(this.args.model.dateTime)
|
||||
: moment(Date.now());
|
||||
}
|
||||
|
||||
get submitDisabled() {
|
||||
return moment().isAfter(this.bufferedDateTime);
|
||||
}
|
||||
|
||||
@action submit() {
|
||||
const dateTime = this.bufferedDateTime;
|
||||
this.args.model.update(moment(dateTime).utc().toISOString());
|
||||
this.args.closeModal();
|
||||
}
|
||||
|
||||
@action dateTimeChanged(dateTime) {
|
||||
this.bufferedDateTime = dateTime;
|
||||
}
|
||||
}
|
|
@ -15,6 +15,7 @@ import {
|
|||
import Component from "@ember/component";
|
||||
import { bind, later } from "@ember/runloop";
|
||||
import I18n from "I18n";
|
||||
import Subscription from "../mixins/subscription";
|
||||
|
||||
const customFieldActionMap = {
|
||||
topic: ["create_topic", "send_message"],
|
||||
|
@ -26,7 +27,7 @@ const customFieldActionMap = {
|
|||
|
||||
const values = ["present", "true", "false"];
|
||||
|
||||
export default Component.extend({
|
||||
export default Component.extend(Subscription, {
|
||||
classNameBindings: [":mapper-selector", "activeType"],
|
||||
|
||||
showText: computed("activeType", function () {
|
||||
|
@ -116,6 +117,9 @@ export default Component.extend({
|
|||
groupEnabled: computed("options.groupSelection", "inputType", function () {
|
||||
return this.optionEnabled("groupSelection");
|
||||
}),
|
||||
guestGroup: computed("options.guestGroup", "inputType", function () {
|
||||
return this.optionEnabled("guestGroup");
|
||||
}),
|
||||
userEnabled: computed("options.userSelection", "inputType", function () {
|
||||
return this.optionEnabled("userSelection");
|
||||
}),
|
||||
|
@ -126,7 +130,29 @@ export default Component.extend({
|
|||
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"),
|
||||
showComboBox: or(
|
||||
"showWizardField",
|
||||
|
|
|
@ -32,6 +32,7 @@ export default Component.extend({
|
|||
pairConnector: options.pairConnector || null,
|
||||
outputConnector: options.outputConnector || null,
|
||||
context: options.context || null,
|
||||
guestGroup: options.guestGroup || false,
|
||||
};
|
||||
|
||||
let inputTypes = ["key", "value", "output"];
|
||||
|
|
|
@ -7,7 +7,7 @@ export default Component.extend(Subscription, {
|
|||
|
||||
@discourseComputed("subscribed")
|
||||
subscribedIcon(subscribed) {
|
||||
return subscribed ? "check" : "dash";
|
||||
return subscribed ? "check" : "times";
|
||||
},
|
||||
|
||||
@discourseComputed("subscribed")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import SingleSelectComponent from "select-kit/components/single-select";
|
||||
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 I18n from "I18n";
|
||||
|
||||
|
@ -40,9 +40,9 @@ export default SingleSelectComponent.extend(Subscription, {
|
|||
return allowedTypes;
|
||||
},
|
||||
|
||||
@discourseComputed("feature", "attribute")
|
||||
@discourseComputed("feature", "attribute", "wizard.allowGuests")
|
||||
content(feature, attribute) {
|
||||
return wizardSchema[feature][attribute]
|
||||
return filterValues(this.wizard, feature, attribute)
|
||||
.map((value) => {
|
||||
let allowedSubscriptionTypes = this.allowedSubscriptionTypes(
|
||||
feature,
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
value=wizardListVal
|
||||
content=wizardList
|
||||
onChange=(action "changeWizard")
|
||||
options=(hash
|
||||
none="admin.wizard.select"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.select")
|
||||
}}
|
||||
</div>
|
||||
</section>
|
|
@ -1,7 +1,10 @@
|
|||
{{#each site.complete_custom_wizard as |wizard|}}
|
||||
<div class="row">
|
||||
<div class="alert alert-info alert-wizard">
|
||||
<a href={{wizard.url}}>{{i18n "wizard.complete_custom" name=wizard.name}}</a>
|
||||
<a href={{wizard.url}}>{{i18n
|
||||
"wizard.complete_custom"
|
||||
name=wizard.name
|
||||
}}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
|
@ -4,10 +4,14 @@ import CustomWizardApi from "../models/custom-wizard-api";
|
|||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import { and, equal, not } from "@ember/object/computed";
|
||||
import { selectKitContent } from "../lib/wizard";
|
||||
import { underscore } from "@ember/string";
|
||||
import Controller from "@ember/controller";
|
||||
import I18n from "I18n";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Controller.extend({
|
||||
router: service(),
|
||||
|
||||
queryParams: ["refresh_list"],
|
||||
loadingSubscriptions: false,
|
||||
notAuthorized: not("api.authorized"),
|
||||
|
@ -20,29 +24,8 @@ export default Controller.extend({
|
|||
"application/x-www-form-urlencoded",
|
||||
]),
|
||||
successCodes: selectKitContent([
|
||||
100,
|
||||
101,
|
||||
102,
|
||||
200,
|
||||
201,
|
||||
202,
|
||||
203,
|
||||
204,
|
||||
205,
|
||||
206,
|
||||
207,
|
||||
208,
|
||||
226,
|
||||
300,
|
||||
301,
|
||||
302,
|
||||
303,
|
||||
303,
|
||||
304,
|
||||
305,
|
||||
306,
|
||||
307,
|
||||
308,
|
||||
100, 101, 102, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301,
|
||||
302, 303, 303, 304, 305, 306, 307, 308,
|
||||
]),
|
||||
|
||||
@discourseComputed(
|
||||
|
@ -118,7 +101,7 @@ export default Controller.extend({
|
|||
|
||||
if (authType === "oauth_2") {
|
||||
this.set("authorizing", true);
|
||||
ajax(`/admin/wizards/apis/${name.underscore()}/authorize`)
|
||||
ajax(`/admin/wizards/apis/${underscore(name)}/authorize`)
|
||||
.catch(popupAjaxError)
|
||||
.then((result) => {
|
||||
if (result.success) {
|
||||
|
@ -187,11 +170,11 @@ export default Controller.extend({
|
|||
if (!api[rp]) {
|
||||
let key = rp.replace("auth", "");
|
||||
error = `${I18n.t(
|
||||
`admin.wizard.api.auth.${key.underscore()}`
|
||||
`admin.wizard.api.auth.${underscore(key)}`
|
||||
)} is required for ${authType}`;
|
||||
break;
|
||||
}
|
||||
data[rp.underscore()] = api[rp];
|
||||
data[underscore(rp)] = api[rp];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,7 +204,7 @@ export default Controller.extend({
|
|||
|
||||
this.set("updating", true);
|
||||
|
||||
ajax(`/admin/wizards/api/${name.underscore()}`, {
|
||||
ajax(`/admin/wizards/api/${underscore(name)}`, {
|
||||
type: "PUT",
|
||||
data,
|
||||
})
|
||||
|
@ -244,7 +227,7 @@ export default Controller.extend({
|
|||
|
||||
this.set("updating", true);
|
||||
|
||||
ajax(`/admin/wizards/api/${name.underscore()}`, {
|
||||
ajax(`/admin/wizards/api/${underscore(name)}`, {
|
||||
type: "DELETE",
|
||||
})
|
||||
.catch(popupAjaxError)
|
||||
|
@ -262,13 +245,13 @@ export default Controller.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
ajax(`/admin/wizards/api/${name.underscore()}/logs`, {
|
||||
ajax(`/admin/wizards/api/${underscore(name)}/logs`, {
|
||||
type: "DELETE",
|
||||
})
|
||||
.catch(popupAjaxError)
|
||||
.then((result) => {
|
||||
if (result.success) {
|
||||
this.transitionToRoute("adminWizardsApis").then(() => {
|
||||
this.router.transitionTo("adminWizardsApis").then(() => {
|
||||
this.send("refreshModel");
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
import Controller from "@ember/controller";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
actions: {
|
||||
save() {
|
||||
this.send("closeModal");
|
||||
},
|
||||
|
||||
resetToDefault() {
|
||||
this.get("model.reset")();
|
||||
},
|
||||
},
|
||||
});
|
|
@ -2,11 +2,13 @@ import Controller from "@ember/controller";
|
|||
import { empty } from "@ember/object/computed";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { fmt } from "discourse/lib/computed";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { inject as service } from "@ember/service";
|
||||
import AdminWizardsColumnsModal from "../components/modal/admin-wizards-columns";
|
||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
import { formatModel } from "../lib/wizard-submission";
|
||||
|
||||
export default Controller.extend({
|
||||
modal: service(),
|
||||
downloadUrl: fmt("wizard.id", "/admin/wizards/submissions/%@/download"),
|
||||
noResults: empty("submissions"),
|
||||
page: 0,
|
||||
|
@ -57,7 +59,7 @@ export default Controller.extend({
|
|||
},
|
||||
|
||||
showEditColumnsModal() {
|
||||
return showModal("admin-wizards-columns", {
|
||||
return this.modal.show(AdminWizardsColumnsModal, {
|
||||
model: {
|
||||
columns: this.get("fields"),
|
||||
reset: () => {
|
||||
|
|
|
@ -3,15 +3,18 @@ import {
|
|||
observes,
|
||||
} from "discourse-common/utils/decorators";
|
||||
import { notEmpty } from "@ember/object/computed";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { inject as service } from "@ember/service";
|
||||
import NextSessionScheduledModal from "../components/modal/next-session-scheduled";
|
||||
import { generateId, wizardFieldList } from "../lib/wizard";
|
||||
import { dasherize } from "@ember/string";
|
||||
import { later, scheduleOnce } from "@ember/runloop";
|
||||
import Controller from "@ember/controller";
|
||||
import copyText from "discourse/lib/copy-text";
|
||||
import I18n from "I18n";
|
||||
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
||||
|
||||
export default Controller.extend({
|
||||
modal: service(),
|
||||
hasName: notEmpty("wizard.name"),
|
||||
|
||||
@observes("currentStep")
|
||||
|
@ -59,6 +62,19 @@ export default Controller.extend({
|
|||
}
|
||||
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) {
|
||||
if (result.backend_validation_error) {
|
||||
return result.backend_validation_error;
|
||||
|
@ -112,15 +128,13 @@ export default Controller.extend({
|
|||
},
|
||||
|
||||
setNextSessionScheduled() {
|
||||
let controller = showModal("next-session-scheduled", {
|
||||
this.modal.show(NextSessionScheduledModal, {
|
||||
model: {
|
||||
dateTime: this.wizard.after_time_scheduled,
|
||||
update: (dateTime) =>
|
||||
this.set("wizard.after_time_scheduled", dateTime),
|
||||
},
|
||||
});
|
||||
|
||||
controller.setup();
|
||||
},
|
||||
|
||||
copyUrl() {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import Controller from "@ember/controller";
|
||||
import getUrl from "discourse-common/lib/get-url";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Controller.extend({
|
||||
router: service(),
|
||||
wizard: null,
|
||||
step: null,
|
||||
|
||||
|
@ -15,12 +17,12 @@ export default Controller.extend({
|
|||
const wizardId = this.get("wizard.id");
|
||||
window.location.href = getUrl(`/w/${wizardId}/steps/${nextStepId}`);
|
||||
} else {
|
||||
this.transitionToRoute("customWizardStep", nextStepId);
|
||||
this.router.transitionTo("customWizardStep", nextStepId);
|
||||
}
|
||||
},
|
||||
|
||||
goBack() {
|
||||
this.transitionToRoute("customWizardStep", this.get("step.previous"));
|
||||
this.router.transitionTo("customWizardStep", this.get("step.previous"));
|
||||
},
|
||||
|
||||
showMessage(message) {
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||
import Controller from "@ember/controller";
|
||||
|
||||
export default Controller.extend({
|
||||
title: "admin.wizard.after_time_modal.title",
|
||||
|
||||
setup() {
|
||||
this.set("bufferedDateTime", moment(this.model.dateTime));
|
||||
},
|
||||
|
||||
@discourseComputed("bufferedDateTime")
|
||||
submitDisabled(dateTime) {
|
||||
return moment().isAfter(dateTime);
|
||||
},
|
||||
|
||||
actions: {
|
||||
submit() {
|
||||
const dateTime = this.get("bufferedDateTime");
|
||||
this.get("model.update")(moment(dateTime).utc().toISOString());
|
||||
this.send("closeModal");
|
||||
},
|
||||
|
||||
dateTimeChanged(dateTime) {
|
||||
this.set("bufferedDateTime", dateTime);
|
||||
},
|
||||
},
|
||||
});
|
|
@ -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) {
|
||||
if (this.session.wizardEventFieldId === this.fieldId && this.element) {
|
||||
if (
|
||||
this.session.wizardEventFieldId === this.fieldId &&
|
||||
this.element
|
||||
) {
|
||||
this.insertText(text, options);
|
||||
}
|
||||
},
|
||||
|
@ -80,6 +83,16 @@ export default {
|
|||
}
|
||||
},
|
||||
});
|
||||
|
||||
api.modifyClass("component:category-chooser", {
|
||||
categoriesByScope(options = {}) {
|
||||
let categories = this._super(options);
|
||||
|
||||
return categories.filter((category) => {
|
||||
return !category.custom_fields?.create_topic_wizard;
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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 {
|
||||
name: "custom-wizard-redirect",
|
||||
after: "message-bus",
|
||||
|
||||
initialize: function (container) {
|
||||
initialize(container) {
|
||||
const messageBus = container.lookup("service:message-bus");
|
||||
const siteSettings = container.lookup("service:site-settings");
|
||||
|
||||
if (!siteSettings.custom_wizard_enabled || !messageBus) {
|
||||
if (!siteSettings.custom_wizard_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -17,28 +19,27 @@ export default {
|
|||
window.location.href = wizardUrl;
|
||||
});
|
||||
|
||||
ApplicationRoute.reopen({
|
||||
actions: {
|
||||
willTransition(transition) {
|
||||
const redirectToWizard = this.get("currentUser.redirect_to_wizard");
|
||||
const excludedPaths = this.siteSettings.wizard_redirect_exclude_paths
|
||||
withPluginApi("0.8.36", (api) => {
|
||||
api.onAppEvent("page:changed", (data) => {
|
||||
const currentUser = api.getCurrentUser();
|
||||
|
||||
if (currentUser) {
|
||||
const redirectToWizard = currentUser.redirect_to_wizard;
|
||||
const excludedPaths = siteSettings.wizard_redirect_exclude_paths
|
||||
.split("|")
|
||||
.concat(["loading"]);
|
||||
|
||||
if (
|
||||
redirectToWizard &&
|
||||
(!transition.intent.name ||
|
||||
!excludedPaths.find((p) => {
|
||||
return transition.intent.name.indexOf(p) > -1;
|
||||
}))
|
||||
!data.url.includes("ignore_redirect") &&
|
||||
data.currentRouteName !== "customWizardStep" &&
|
||||
!excludedPaths.find((p) => {
|
||||
return data.currentRouteName.indexOf(p) > -1;
|
||||
})
|
||||
) {
|
||||
transition.abort();
|
||||
window.location = "/w/" + redirectToWizard.dasherize();
|
||||
DiscourseURL.routeTo(`/w/${dasherize(redirectToWizard)}`);
|
||||
}
|
||||
|
||||
return this._super(transition);
|
||||
},
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
|
@ -35,6 +35,7 @@ function inputTypesContent(options = {}) {
|
|||
const connectors = {
|
||||
pair: [
|
||||
"equal",
|
||||
"not_equal",
|
||||
"greater",
|
||||
"less",
|
||||
"greater_or_equal",
|
||||
|
|
|
@ -72,6 +72,7 @@ const field = {
|
|||
required: null,
|
||||
type: null,
|
||||
condition: null,
|
||||
tag_groups: null,
|
||||
},
|
||||
types: {},
|
||||
mapped: ["prefill", "content", "condition", "index"],
|
||||
|
@ -210,11 +211,42 @@ const action = {
|
|||
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 = {
|
||||
klass: ["topic", "post", "group", "category"],
|
||||
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);
|
||||
action.type = Object.keys(action.types);
|
||||
|
||||
|
@ -224,16 +256,29 @@ const wizardSchema = {
|
|||
field,
|
||||
custom_field,
|
||||
action,
|
||||
filters,
|
||||
};
|
||||
|
||||
export function buildFieldTypes(types) {
|
||||
wizardSchema.field.types = types;
|
||||
}
|
||||
|
||||
export function buildFieldValidations(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");
|
||||
if (siteSettings.wizard_apis_enabled) {
|
||||
wizardSchema.action.types.send_to_api = {
|
||||
|
|
|
@ -4,6 +4,8 @@ import { get, set } from "@ember/object";
|
|||
import Mixin from "@ember/object/mixin";
|
||||
import { deepEqual } from "discourse-common/lib/object";
|
||||
|
||||
const observedCache = [];
|
||||
|
||||
export default Mixin.create({
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
|
@ -32,7 +34,13 @@ export default Mixin.create({
|
|||
};
|
||||
|
||||
listProperties(componentType, opts).forEach((property) => {
|
||||
obj.removeObserver(property, this, this.toggleUndo);
|
||||
if (observedCache.includes(property)) {
|
||||
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) => {
|
||||
if (observedCache.indexOf(property) === -1) {
|
||||
observedCache.push(property);
|
||||
}
|
||||
obj.addObserver(property, this, this.toggleUndo);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -5,8 +5,20 @@ import wizardSchema from "../lib/wizard-schema";
|
|||
import { Promise } from "rsvp";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
const GUEST_GROUP_ID = -1;
|
||||
|
||||
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) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let wizard = this.buildJson(this, "wizard");
|
||||
|
|
|
@ -72,7 +72,7 @@ export default EmberObject.extend(ValidState, {
|
|||
valid = true;
|
||||
}
|
||||
|
||||
this.setValid(valid);
|
||||
this.setValid(Boolean(valid));
|
||||
|
||||
return valid;
|
||||
},
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import CustomWizardApi from "../models/custom-wizard-api";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model(params) {
|
||||
if (params.name === "create") {
|
||||
return CustomWizardApi.create({ isNew: true });
|
||||
|
@ -10,6 +13,12 @@ export default DiscourseRoute.extend({
|
|||
}
|
||||
},
|
||||
|
||||
afterModel(model) {
|
||||
if (model === null) {
|
||||
return this.router.transitionTo("adminWizardsApi");
|
||||
}
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
controller.set("api", model);
|
||||
},
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import CustomWizardApi from "../models/custom-wizard-api";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model() {
|
||||
return CustomWizardApi.list();
|
||||
},
|
||||
|
@ -25,11 +28,11 @@ export default DiscourseRoute.extend({
|
|||
actions: {
|
||||
changeApi(apiName) {
|
||||
this.controllerFor("adminWizardsApi").set("apiName", apiName);
|
||||
this.transitionTo("adminWizardsApiShow", apiName);
|
||||
this.router.transitionTo("adminWizardsApiShow", apiName);
|
||||
},
|
||||
|
||||
afterDestroy() {
|
||||
this.transitionTo("adminWizardsApi").then(() => this.refresh());
|
||||
this.router.transitionTo("adminWizardsApi").then(() => this.refresh());
|
||||
},
|
||||
|
||||
afterSave(apiName) {
|
||||
|
@ -38,7 +41,7 @@ export default DiscourseRoute.extend({
|
|||
|
||||
createApi() {
|
||||
this.controllerFor("adminWizardsApi").set("apiName", "create");
|
||||
this.transitionTo("adminWizardsApiShow", "create");
|
||||
this.router.transitionTo("adminWizardsApiShow", "create");
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,12 +1,21 @@
|
|||
import CustomWizardLogs from "../models/custom-wizard-logs";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { A } from "@ember/array";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model(params) {
|
||||
return CustomWizardLogs.list(params.wizardId);
|
||||
},
|
||||
|
||||
afterModel(model) {
|
||||
if (model === null) {
|
||||
return this.router.transitionTo("adminWizardsLogs");
|
||||
}
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
controller.setProperties({
|
||||
wizard: model.wizard,
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model() {
|
||||
return ajax(`/admin/wizards/wizard`);
|
||||
},
|
||||
|
@ -18,7 +21,7 @@ export default DiscourseRoute.extend({
|
|||
actions: {
|
||||
changeWizard(wizardId) {
|
||||
this.controllerFor("adminWizardsLogs").set("wizardId", wizardId);
|
||||
this.transitionTo("adminWizardsLogsShow", wizardId);
|
||||
this.router.transitionTo("adminWizardsLogsShow", wizardId);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -2,12 +2,21 @@ import { A } from "@ember/array";
|
|||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { formatModel } from "../lib/wizard-submission";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model(params) {
|
||||
return CustomWizardAdmin.submissions(params.wizardId);
|
||||
},
|
||||
|
||||
afterModel(model) {
|
||||
if (model === null) {
|
||||
return this.router.transitionTo("adminWizardsSubmissions");
|
||||
}
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
const { fields, submissions } = formatModel(model);
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model() {
|
||||
return ajax(`/admin/wizards/wizard`);
|
||||
},
|
||||
|
@ -18,7 +21,7 @@ export default DiscourseRoute.extend({
|
|||
actions: {
|
||||
changeWizard(wizardId) {
|
||||
this.controllerFor("adminWizardsSubmissions").set("wizardId", wizardId);
|
||||
this.transitionTo("adminWizardsSubmissionsShow", wizardId);
|
||||
this.router.transitionTo("adminWizardsSubmissionsShow", wizardId);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -2,8 +2,11 @@ import CustomWizardAdmin from "../models/custom-wizard-admin";
|
|||
import { ajax } from "discourse/lib/ajax";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import I18n from "I18n";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model(params) {
|
||||
if (params.wizardId === "create") {
|
||||
return { create: true };
|
||||
|
@ -14,7 +17,7 @@ export default DiscourseRoute.extend({
|
|||
|
||||
afterModel(model) {
|
||||
if (model.none) {
|
||||
return this.transitionTo("adminWizardsWizard");
|
||||
return this.router.transitionTo("adminWizardsWizard");
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -4,8 +4,11 @@ import EmberObject, { set } from "@ember/object";
|
|||
import { A } from "@ember/array";
|
||||
import { all } from "rsvp";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model() {
|
||||
return ajax("/admin/wizards/wizard");
|
||||
},
|
||||
|
@ -80,14 +83,14 @@ export default DiscourseRoute.extend({
|
|||
this.controllerFor("adminWizardsWizard").set("wizardId", wizardId);
|
||||
|
||||
if (wizardId) {
|
||||
this.transitionTo("adminWizardsWizardShow", wizardId);
|
||||
this.router.transitionTo("adminWizardsWizardShow", wizardId);
|
||||
} else {
|
||||
this.transitionTo("adminWizardsWizard");
|
||||
this.router.transitionTo("adminWizardsWizard");
|
||||
}
|
||||
},
|
||||
|
||||
afterDestroy() {
|
||||
this.transitionTo("adminWizardsWizard").then(() => this.refresh());
|
||||
this.router.transitionTo("adminWizardsWizard").then(() => this.refresh());
|
||||
},
|
||||
|
||||
afterSave(wizardId) {
|
||||
|
@ -96,7 +99,7 @@ export default DiscourseRoute.extend({
|
|||
|
||||
createWizard() {
|
||||
this.controllerFor("adminWizardsWizard").set("wizardId", "create");
|
||||
this.transitionTo("adminWizardsWizardShow", "create");
|
||||
this.router.transitionTo("adminWizardsWizardShow", "create");
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
router: service(),
|
||||
|
||||
model() {
|
||||
return ajax("/admin/wizards");
|
||||
},
|
||||
|
@ -17,7 +20,7 @@ export default DiscourseRoute.extend({
|
|||
|
||||
afterModel(model, transition) {
|
||||
if (transition.targetName === "adminWizards.index") {
|
||||
this.transitionTo("adminWizardsWizard");
|
||||
this.router.transitionTo("adminWizardsWizard");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
import { getCachedWizard } from "../models/custom-wizard";
|
||||
import Route from "@ember/routing/route";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Route.extend({
|
||||
router: service(),
|
||||
|
||||
beforeModel() {
|
||||
const wizard = getCachedWizard();
|
||||
if (
|
||||
wizard &&
|
||||
wizard.user &&
|
||||
wizard.permitted &&
|
||||
!wizard.completed &&
|
||||
wizard.start
|
||||
) {
|
||||
this.replaceWith("customWizardStep", wizard.start);
|
||||
if (wizard && wizard.permitted && !wizard.completed && wizard.start) {
|
||||
this.router.replaceWith("customWizardStep", wizard.start);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -26,7 +23,7 @@ export default Route.extend({
|
|||
const wizardId = model.get("id");
|
||||
const user = model.get("user");
|
||||
const name = model.get("name");
|
||||
const requiresLogin = !user;
|
||||
const requiresLogin = !user && !permitted;
|
||||
const notPermitted = !permitted;
|
||||
|
||||
const props = {
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
import I18n from "I18n";
|
||||
import { getCachedWizard } from "../models/custom-wizard";
|
||||
import Route from "@ember/routing/route";
|
||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||
import { action } from "@ember/object";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
export default Route.extend({
|
||||
router: service(),
|
||||
|
||||
beforeModel() {
|
||||
const wizard = getCachedWizard();
|
||||
this.set("wizard", wizard);
|
||||
|
||||
if (!wizard || !wizard.user || !wizard.permitted || wizard.completed) {
|
||||
this.replaceWith("customWizard");
|
||||
if (!wizard || !wizard.permitted || wizard.completed) {
|
||||
this.router.replaceWith("customWizard");
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -25,7 +30,7 @@ export default Route.extend({
|
|||
|
||||
afterModel(model) {
|
||||
if (model.completed) {
|
||||
return this.transitionTo("wizard.index");
|
||||
return this.router.transitionTo("wizard.index");
|
||||
}
|
||||
return model.set("wizardId", this.wizard.id);
|
||||
},
|
||||
|
@ -48,4 +53,10 @@ export default Route.extend({
|
|||
|
||||
controller.setProperties(props);
|
||||
},
|
||||
|
||||
@action
|
||||
didTransition() {
|
||||
scrollTop();
|
||||
return true;
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
|
||||
import I18n from "I18n";
|
||||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import bootbox from "bootbox";
|
||||
|
||||
export default DiscourseRoute.extend({
|
||||
titleToken() {
|
||||
|
|
|
@ -8,7 +8,12 @@
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{d-button label="admin.wizard.api.save" action=(action "save") class="btn-primary" disabled=saveDisabled}}
|
||||
{{d-button
|
||||
label="admin.wizard.api.save"
|
||||
action=(action "save")
|
||||
class="btn-primary"
|
||||
disabled=saveDisabled
|
||||
}}
|
||||
|
||||
{{#if showRemove}}
|
||||
{{d-button action=(action "remove") label="admin.wizard.api.remove"}}
|
||||
|
@ -32,13 +37,19 @@
|
|||
<div class="metadata">
|
||||
<div class="title">
|
||||
<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 class="name {{nameClass}}">
|
||||
<label>{{i18n "admin.wizard.api.name"}}</label>
|
||||
{{#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}}
|
||||
<span>{{api.name}}</span>
|
||||
{{/if}}
|
||||
|
@ -56,10 +67,12 @@
|
|||
<span>{{authErrorMessage}}</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{d-button label="admin.wizard.api.auth.btn"
|
||||
action=(action "authorize")
|
||||
disabled=authDisabled
|
||||
class="btn-primary"}}
|
||||
{{d-button
|
||||
label="admin.wizard.api.auth.btn"
|
||||
action=(action "authorize")
|
||||
disabled=authDisabled
|
||||
class="btn-primary"
|
||||
}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
|
@ -93,9 +106,8 @@
|
|||
value=api.authType
|
||||
content=authorizationTypes
|
||||
onChange=(action (mut api.authType))
|
||||
options=(hash
|
||||
none="admin.wizard.api.auth.type_none"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.api.auth.type_none")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -104,7 +116,7 @@
|
|||
<div class="control-group">
|
||||
<label>{{i18n "admin.wizard.api.auth.url"}}</label>
|
||||
<div class="controls">
|
||||
{{input value=api.authUrl}}
|
||||
<Input @value={{this.api.authUrl}} />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -112,21 +124,21 @@
|
|||
<div class="control-group">
|
||||
<label>{{i18n "admin.wizard.api.auth.token_url"}}</label>
|
||||
<div class="controls">
|
||||
{{input value=api.tokenUrl}}
|
||||
<Input @value={{this.api.tokenUrl}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.wizard.api.auth.client_id"}}</label>
|
||||
<div class="controls">
|
||||
{{input value=api.clientId}}
|
||||
<Input @value={{this.api.clientId}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.wizard.api.auth.client_secret"}}</label>
|
||||
<div class="controls">
|
||||
{{input value=api.clientSecret}}
|
||||
<Input @value={{this.api.clientSecret}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -135,12 +147,26 @@
|
|||
<div class="controls">
|
||||
{{#each api.authParams as |param|}}
|
||||
<div class="param">
|
||||
{{input value=param.key placeholder=(i18n "admin.wizard.key")}}
|
||||
{{input value=param.value placeholder=(i18n "admin.wizard.value")}}
|
||||
{{d-button action=(action "removeParam") actionParam=param icon="times"}}
|
||||
<Input
|
||||
@value={{this.param.key}}
|
||||
placeholder={{i18n "admin.wizard.key"}}
|
||||
/>
|
||||
<Input
|
||||
@value={{this.param.value}}
|
||||
placeholder={{i18n "admin.wizard.value"}}
|
||||
/>
|
||||
{{d-button
|
||||
action=(action "removeParam")
|
||||
actionParam=param
|
||||
icon="times"
|
||||
}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{d-button label="admin.wizard.api.auth.params.new" icon="plus" action=(action "addParam")}}
|
||||
{{d-button
|
||||
label="admin.wizard.api.auth.params.new"
|
||||
icon="plus"
|
||||
action=(action "addParam")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -149,14 +175,14 @@
|
|||
<div class="control-group">
|
||||
<label>{{i18n "admin.wizard.api.auth.username"}}</label>
|
||||
<div class="controls">
|
||||
{{input value=api.username}}
|
||||
<Input @value={{this.api.username}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label>{{i18n "admin.wizard.api.auth.password"}}</label>
|
||||
<div class="controls">
|
||||
{{input value=api.password}}
|
||||
<Input @value={{this.api.password}} />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -225,7 +251,11 @@
|
|||
</div>
|
||||
|
||||
<div class="wizard-api-endpoints">
|
||||
{{d-button action=(action "addEndpoint") label="admin.wizard.api.endpoint.add" icon="plus"}}
|
||||
{{d-button
|
||||
action=(action "addEndpoint")
|
||||
label="admin.wizard.api.endpoint.add"
|
||||
icon="plus"
|
||||
}}
|
||||
|
||||
{{#if api.endpoints}}
|
||||
<div class="endpoint-list">
|
||||
|
@ -235,38 +265,43 @@
|
|||
<div class="endpoint">
|
||||
<div class="endpoint-">
|
||||
<div class="top">
|
||||
{{input value=endpoint.name
|
||||
placeholder=(i18n "admin.wizard.api.endpoint.name")}}
|
||||
{{input value=endpoint.url
|
||||
placeholder=(i18n "admin.wizard.api.endpoint.url")
|
||||
class="endpoint-url"}}
|
||||
{{d-button action=(action "removeEndpoint")
|
||||
actionParam=endpoint
|
||||
icon="times"
|
||||
class="remove-endpoint"}}
|
||||
<Input
|
||||
@value={{endpoint.name}}
|
||||
placeholder={{i18n "admin.wizard.api.endpoint.name"}}
|
||||
/>
|
||||
<Input
|
||||
@value={{endpoint.url}}
|
||||
placeholder={{i18n "admin.wizard.api.endpoint.url"}}
|
||||
class="endpoint-url"
|
||||
/>
|
||||
{{d-button
|
||||
action=(action "removeEndpoint")
|
||||
actionParam=endpoint
|
||||
icon="times"
|
||||
class="remove-endpoint"
|
||||
}}
|
||||
</div>
|
||||
<div class="bottom">
|
||||
{{combo-box
|
||||
content=endpointMethods
|
||||
value=endpoint.method
|
||||
onChange=(action (mut endpoint.method))
|
||||
options=(hash
|
||||
none="admin.wizard.api.endpoint.method"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.api.endpoint.method")
|
||||
}}
|
||||
{{combo-box
|
||||
content=contentTypes
|
||||
value=endpoint.content_type
|
||||
onChange=(action (mut endpoint.content_type))
|
||||
options=(hash
|
||||
none="admin.wizard.api.endpoint.content_type"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.api.endpoint.content_type")
|
||||
}}
|
||||
{{multi-select
|
||||
value=endpoint.success_codes
|
||||
content=successCodes
|
||||
onChange=(action (mut endpoint.success_codes))
|
||||
options=(hash
|
||||
none="admin.wizard.api.endpoint.success_codes"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -284,7 +319,8 @@
|
|||
{{d-button
|
||||
action=(action "clearLogs")
|
||||
class="clear-logs"
|
||||
label="admin.wizard.api.log.clear"}}
|
||||
label="admin.wizard.api.log.clear"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -304,7 +340,10 @@
|
|||
<td>{{logentry.time}}</td>
|
||||
<td class="user-image">
|
||||
<div class="user-image-inner">
|
||||
<a href={{logentry.userpath}} data-user-card={{logentry.username}}>{{avatar logentry imageSize="medium"}}</a>
|
||||
<a
|
||||
href={{logentry.userpath}}
|
||||
data-user-card={{logentry.username}}
|
||||
>{{avatar logentry imageSize="medium"}}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{logentry.status}}</td>
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
value=apiName
|
||||
content=apiList
|
||||
onChange=(route-action "changeApi")
|
||||
options=(hash
|
||||
none="admin.wizard.api.select"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.api.select")
|
||||
}}
|
||||
|
||||
{{d-button
|
||||
action=(route-action "createApi")
|
||||
label="admin.wizard.api.create"
|
||||
icon="plus"}}
|
||||
icon="plus"
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div class="admin-wizard-container">
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
{{d-button
|
||||
label="admin.wizard.custom_field.add"
|
||||
icon="plus"
|
||||
action=(action "addField")}}
|
||||
action=(action "addField")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -14,7 +15,8 @@
|
|||
opts=messageOpts
|
||||
type=messageType
|
||||
url=documentationUrl
|
||||
component="custom_fields"}}
|
||||
component="custom_fields"
|
||||
}}
|
||||
|
||||
<div class="admin-wizard-container">
|
||||
{{#if customFields}}
|
||||
|
@ -32,7 +34,8 @@
|
|||
{{custom-field-input
|
||||
field=field
|
||||
removeField=(action "removeField")
|
||||
saveField=(action "saveField")}}
|
||||
saveField=(action "saveField")
|
||||
}}
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
label="refresh"
|
||||
icon="sync"
|
||||
action=(action "refresh")
|
||||
class="refresh"}}
|
||||
class="refresh"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -31,7 +32,10 @@
|
|||
{{#each logs as |log|}}
|
||||
<tr>
|
||||
{{#each-in log as |field value|}}
|
||||
<td class="small">{{wizard-table-field field=field value=value}}</td>
|
||||
<td class="small">{{wizard-table-field
|
||||
field=field
|
||||
value=value
|
||||
}}</td>
|
||||
{{/each-in}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
value=wizardId
|
||||
content=wizardList
|
||||
onChange=(route-action "changeWizard")
|
||||
options=(hash
|
||||
none="admin.wizard.select"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.select")
|
||||
}}
|
||||
</div>
|
||||
|
||||
{{wizard-message
|
||||
key=messageKey
|
||||
opts=messageOpts
|
||||
url=documentationUrl
|
||||
component="logs"}}
|
||||
component="logs"
|
||||
}}
|
||||
|
||||
<div class="admin-wizard-container">
|
||||
{{outlet}}
|
||||
|
|
|
@ -11,30 +11,35 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{input
|
||||
<Input
|
||||
id="custom-wizard-file-upload"
|
||||
type="file"
|
||||
@type="file"
|
||||
accept="application/json"
|
||||
input=(action "setFile")}}
|
||||
{{on "input" (action "setFile")}}
|
||||
/>
|
||||
{{d-button
|
||||
id="upload-button"
|
||||
label="admin.wizard.manager.upload"
|
||||
action=(action "upload")}}
|
||||
action=(action "upload")
|
||||
}}
|
||||
{{d-button
|
||||
id="import-button"
|
||||
label="admin.wizard.manager.import"
|
||||
action=(action "import")
|
||||
disabled=importDisabled}}
|
||||
disabled=importDisabled
|
||||
}}
|
||||
{{d-button
|
||||
id="export-button"
|
||||
label="admin.wizard.manager.export"
|
||||
action=(action "export")
|
||||
disabled=exportDisabled}}
|
||||
disabled=exportDisabled
|
||||
}}
|
||||
{{d-button
|
||||
id="destroy-button"
|
||||
label="admin.wizard.manager.destroy"
|
||||
action=(action "destroy")
|
||||
disabled=destoryDisabled}}
|
||||
disabled=destoryDisabled
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -45,7 +50,8 @@
|
|||
opts=messageOpts
|
||||
items=messageItems
|
||||
loading=loading
|
||||
component="manager"}}
|
||||
component="manager"
|
||||
}}
|
||||
|
||||
<div class="admin-wizard-container">
|
||||
<table class="table grid">
|
||||
|
@ -65,16 +71,18 @@
|
|||
{{/link-to}}
|
||||
</td>
|
||||
<td class="control-column">
|
||||
{{input
|
||||
type="checkbox"
|
||||
<Input
|
||||
@type="checkbox"
|
||||
class="export"
|
||||
change=(action "selectWizard")}}
|
||||
{{on "change" (action "selectWizard")}}
|
||||
/>
|
||||
</td>
|
||||
<td class="control-column">
|
||||
{{input
|
||||
type="checkbox"
|
||||
<Input
|
||||
@type="checkbox"
|
||||
class="destroy"
|
||||
change=(action "selectWizard")}}
|
||||
{{on "change" (action "selectWizard")}}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
value=wizardId
|
||||
content=wizardList
|
||||
onChange=(route-action "changeWizard")
|
||||
options=(hash
|
||||
none="admin.wizard.select"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.select")
|
||||
}}
|
||||
</div>
|
||||
|
||||
{{wizard-message
|
||||
key=messageKey
|
||||
opts=messageOpts
|
||||
url=documentationUrl
|
||||
component="submissions"}}
|
||||
component="submissions"
|
||||
}}
|
||||
|
||||
<div class="admin-wizard-container">
|
||||
{{outlet}}
|
||||
|
|
|
@ -1,18 +1,31 @@
|
|||
{{#if wizard}}
|
||||
<div class="wizard-header large">
|
||||
{{input
|
||||
<Input
|
||||
@value={{this.wizard.name}}
|
||||
name="name"
|
||||
value=wizard.name
|
||||
placeholderKey="admin.wizard.name_placeholder"}}
|
||||
placeholder={{i18n "admin.wizard.name_placeholder"}}
|
||||
/>
|
||||
|
||||
<div class="wizard-url">
|
||||
{{#if wizard.name}}
|
||||
{{#if copiedUrl}}
|
||||
{{d-button class="btn-hover pull-right" icon="copy" label="ip_lookup.copied"}}
|
||||
{{d-button
|
||||
class="btn-hover pull-right"
|
||||
icon="copy"
|
||||
label="ip_lookup.copied"
|
||||
}}
|
||||
{{else}}
|
||||
{{d-button action=(action "copyUrl") class="pull-right no-text" icon="copy"}}
|
||||
{{d-button
|
||||
action=(action "copyUrl")
|
||||
class="pull-right no-text"
|
||||
icon="copy"
|
||||
}}
|
||||
{{/if}}
|
||||
<a href={{wizardUrl}} target="_blank" rel="noopener noreferrer">{{wizardUrl}}</a>
|
||||
<a
|
||||
href={{wizardUrl}}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>{{wizardUrl}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,11 +36,12 @@
|
|||
<label>{{i18n "admin.wizard.background"}}</label>
|
||||
</div>
|
||||
<div class="setting-value">
|
||||
{{input
|
||||
<Input
|
||||
@value={{this.wizard.background}}
|
||||
name="background"
|
||||
value=wizard.background
|
||||
placeholderKey="admin.wizard.background_placeholder"
|
||||
class="small"}}
|
||||
placeholder={{i18n "admin.wizard.background_placeholder"}}
|
||||
class="small"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -41,9 +55,8 @@
|
|||
valueProperty="id"
|
||||
value=wizard.theme_id
|
||||
onChange=(action (mut wizard.theme_id))
|
||||
options=(hash
|
||||
none="admin.wizard.no_theme"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.no_theme")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +71,7 @@
|
|||
<label>{{i18n "admin.wizard.save_submissions"}}</label>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -68,7 +81,7 @@
|
|||
<label>{{i18n "admin.wizard.multiple_submissions"}}</label>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -78,7 +91,7 @@
|
|||
<label>{{i18n "admin.wizard.after_signup"}}</label>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -88,7 +101,7 @@
|
|||
<label>{{i18n "admin.wizard.prompt_completion"}}</label>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -98,13 +111,14 @@
|
|||
<label>{{i18n "admin.wizard.after_time"}}</label>
|
||||
</div>
|
||||
<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>
|
||||
{{d-button
|
||||
action=(action "setNextSessionScheduled")
|
||||
translatedLabel=nextSessionScheduledLabel
|
||||
class="btn-after-time"
|
||||
icon="far-calendar"}}
|
||||
icon="far-calendar"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -114,7 +128,7 @@
|
|||
<label>{{i18n "admin.wizard.required"}}</label>
|
||||
</div>
|
||||
<div class="setting-value">
|
||||
{{input type="checkbox" checked=wizard.required}}
|
||||
<Input @type="checkbox" @checked={{this.wizard.required}} />
|
||||
<span>{{i18n "admin.wizard.required_label"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -124,7 +138,7 @@
|
|||
<label>{{i18n "admin.wizard.restart_on_revisit"}}</label>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -140,19 +154,18 @@
|
|||
context="wizard"
|
||||
inputTypes="assignment,validation"
|
||||
groupSelection="output"
|
||||
guestGroup=true
|
||||
userFieldSelection="key"
|
||||
textSelection="value"
|
||||
inputConnector="and"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/wizard-subscription-container}}
|
||||
</div>
|
||||
|
||||
{{wizard-links
|
||||
itemType="step"
|
||||
current=currentStep
|
||||
items=wizard.steps}}
|
||||
{{wizard-links itemType="step" current=currentStep items=wizard.steps}}
|
||||
|
||||
{{#if currentStep}}
|
||||
{{wizard-custom-step
|
||||
|
@ -160,15 +173,17 @@
|
|||
wizard=wizard
|
||||
currentField=currentField
|
||||
wizardFields=wizardFields
|
||||
fieldTypes=fieldTypes
|
||||
subscribed=subscribed}}
|
||||
fieldTypes=filteredFieldTypes
|
||||
subscribed=subscribed
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
{{wizard-links
|
||||
itemType="action"
|
||||
current=currentAction
|
||||
items=wizard.actions
|
||||
generateLabels=true}}
|
||||
generateLabels=true
|
||||
}}
|
||||
|
||||
{{#each wizard.actions as |wizardAction|}}
|
||||
{{wizard-custom-action
|
||||
|
@ -178,11 +193,17 @@
|
|||
apis=apis
|
||||
removeAction="removeAction"
|
||||
wizardFields=wizardFields
|
||||
fieldTypes=fieldTypes}}
|
||||
fieldTypes=filteredFieldTypes
|
||||
}}
|
||||
{{/each}}
|
||||
|
||||
<div class="admin-wizard-buttons">
|
||||
<button {{action "save"}} disabled={{disableSave}} class="btn btn-primary" type="button">
|
||||
<button
|
||||
{{action "save"}}
|
||||
disabled={{disableSave}}
|
||||
class="btn btn-primary"
|
||||
type="button"
|
||||
>
|
||||
{{i18n "admin.wizard.save"}}
|
||||
</button>
|
||||
|
||||
|
|
|
@ -3,20 +3,17 @@
|
|||
value=wizardListVal
|
||||
content=wizardList
|
||||
onChange=(route-action "changeWizard")
|
||||
options=(hash
|
||||
none="admin.wizard.select"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.select")
|
||||
}}
|
||||
|
||||
{{d-button
|
||||
action=(route-action "createWizard")
|
||||
label="admin.wizard.create"
|
||||
icon="plus"}}
|
||||
icon="plus"
|
||||
}}
|
||||
</div>
|
||||
|
||||
{{wizard-message
|
||||
key=messageKey
|
||||
url=messageUrl
|
||||
component="wizard"}}
|
||||
{{wizard-message key=messageKey url=messageUrl component="wizard"}}
|
||||
|
||||
<div class="admin-wizard-container settings">
|
||||
{{outlet}}
|
||||
|
|
|
@ -1,12 +1,21 @@
|
|||
{{#admin-nav}}
|
||||
{{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}}
|
||||
{{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}}
|
||||
{{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}}
|
||||
{{nav-item
|
||||
route="adminWizardsCustomFields"
|
||||
label="admin.wizard.custom_field.nav_label"
|
||||
}}
|
||||
{{nav-item
|
||||
route="adminWizardsSubmissions"
|
||||
label="admin.wizard.submissions.nav_label"
|
||||
}}
|
||||
{{#if showApi}}
|
||||
{{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}}
|
||||
{{/if}}
|
||||
{{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}}
|
||||
{{nav-item route="adminWizardsManager" label="admin.wizard.manager.nav_label"}}
|
||||
{{nav-item
|
||||
route="adminWizardsManager"
|
||||
label="admin.wizard.manager.nav_label"
|
||||
}}
|
||||
|
||||
<div class="admin-actions">
|
||||
{{wizard-subscription-badge}}
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
feature="custom_field"
|
||||
attribute="klass"
|
||||
onChange=(action (mut field.klass))
|
||||
options=(hash
|
||||
none="admin.wizard.custom_field.klass.select"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.custom_field.klass.select")
|
||||
}}
|
||||
</td>
|
||||
<td>
|
||||
{{wizard-subscription-selector
|
||||
|
@ -15,23 +14,22 @@
|
|||
feature="custom_field"
|
||||
attribute="type"
|
||||
onChange=(action (mut field.type))
|
||||
options=(hash
|
||||
none="admin.wizard.custom_field.type.select"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.custom_field.type.select")
|
||||
}}
|
||||
</td>
|
||||
<td class="input">
|
||||
{{input
|
||||
value=field.name
|
||||
placeholder=(i18n "admin.wizard.custom_field.name.select")}}
|
||||
<Input
|
||||
@value={{this.field.name}}
|
||||
placeholder={{i18n "admin.wizard.custom_field.name.select"}}
|
||||
/>
|
||||
</td>
|
||||
<td class="multi-select">
|
||||
{{multi-select
|
||||
value=field.serializers
|
||||
content=serializerContent
|
||||
onChange=(action (mut field.serializers))
|
||||
options=(hash
|
||||
none="admin.wizard.custom_field.serializers.select"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.custom_field.serializers.select")
|
||||
}}
|
||||
</td>
|
||||
<td class="actions">
|
||||
{{#if loading}}
|
||||
|
@ -45,16 +43,15 @@
|
|||
action=(action "destroy")
|
||||
icon="trash-alt"
|
||||
class="destroy"
|
||||
disabled=destroyDisabled}}
|
||||
disabled=destroyDisabled
|
||||
}}
|
||||
{{d-button
|
||||
icon="save"
|
||||
action=(action "save")
|
||||
disabled=saveDisabled
|
||||
class="save"}}
|
||||
{{d-button
|
||||
action=(action "close")
|
||||
icon="times"
|
||||
disabled=closeDisabled}}
|
||||
class="save"
|
||||
}}
|
||||
{{d-button action=(action "close") icon="times" disabled=closeDisabled}}
|
||||
</td>
|
||||
{{else}}
|
||||
<td><label>{{field.klass}}</label></td>
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
wizardComposer=true
|
||||
fieldId=field.id
|
||||
disabled=disableTextarea
|
||||
outletArgs=(hash composer=composer editorType="composer")}}
|
||||
outletArgs=(hash composer=composer editorType="composer")
|
||||
}}
|
||||
|
||||
<input
|
||||
type="file"
|
||||
|
@ -22,4 +23,4 @@
|
|||
class="wizard-composer-upload"
|
||||
accept={{allowedFileTypes}}
|
||||
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
|
||||
type=inputType
|
||||
<Input
|
||||
@type={{this.inputType}}
|
||||
@value={{readonly this.value}}
|
||||
class="date-picker"
|
||||
placeholder=placeholder
|
||||
value=(readonly value)
|
||||
input=(action "onChangeDate")
|
||||
tabindex=tabindex
|
||||
placeholder={{this.placeholder}}
|
||||
tabindex={{this.tabindex}}
|
||||
{{on "input" (action "onChangeDate")}}
|
||||
autocomplete="off"
|
||||
}}
|
||||
/>
|
||||
|
||||
<div class="picker-container"></div>
|
|
@ -26,9 +26,5 @@
|
|||
{{/if}}
|
||||
|
||||
{{#if clearable}}
|
||||
{{d-button
|
||||
class="clear-date-time"
|
||||
icon="times"
|
||||
action=(action "onClear")
|
||||
}}
|
||||
{{d-button class="clear-date-time" icon="times" action=(action "onClear")}}
|
||||
{{/if}}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div class="d-editor-container">
|
||||
{{#if showPreview}}
|
||||
<div class="d-editor-preview-wrapper {{if forcePreview "force-preview"}}">
|
||||
<div class="d-editor-preview-wrapper {{if forcePreview 'force-preview'}}">
|
||||
<div class="d-editor-preview">
|
||||
{{html-safe preview}}
|
||||
</div>
|
||||
|
@ -18,13 +18,16 @@
|
|||
onExpand=(action b.action b)
|
||||
class=b.className
|
||||
content=popupMenuOptions
|
||||
options=(hash
|
||||
popupTitle=b.title
|
||||
icon=b.icon
|
||||
)}}
|
||||
options=(hash popupTitle=b.title icon=b.icon)
|
||||
}}
|
||||
{{else}}
|
||||
<div>{{d.icon}}</div>
|
||||
<button class="wizard-btn {{b.className}}" {{action b.action b}} title={{b.title}} type="button">
|
||||
<button
|
||||
class="wizard-btn {{b.className}}"
|
||||
{{action b.action b}}
|
||||
title={{b.title}}
|
||||
type="button"
|
||||
>
|
||||
{{d-icon b.icon}}
|
||||
{{#if b.label}}
|
||||
<span class="d-button-label">{{i18n b.label}}</span>
|
||||
|
@ -40,7 +43,12 @@
|
|||
</div>
|
||||
|
||||
{{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>
|
||||
{{/if}}
|
||||
</div>
|
|
@ -1,8 +1,8 @@
|
|||
{{custom-wizard-category-selector
|
||||
categories=categories
|
||||
class=fieldClass
|
||||
whitelist=field.content
|
||||
onChange=(action (mut categories))
|
||||
tabindex=field.tabindex
|
||||
options=(hash
|
||||
maximum=field.limit
|
||||
)}}
|
||||
options=(hash maximum=field.limit)
|
||||
}}
|
|
@ -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
|
||||
composer=composer
|
||||
wizard=wizard
|
||||
fieldClass=fieldClass
|
||||
groupsMentioned=(action "groupsMentioned")
|
||||
cannotSeeMention=(action "cannotSeeMention")
|
||||
importQuote=(action "importQuote")
|
||||
togglePreview=(action "togglePreview")
|
||||
afterRefresh=(action "afterRefresh")}}
|
||||
afterRefresh=(action "afterRefresh")
|
||||
}}
|
||||
|
||||
<div class="bottom-bar">
|
||||
<button class="wizard-btn toggle-preview" {{action "togglePreview"}} type="button">
|
||||
<button
|
||||
class="wizard-btn toggle-preview"
|
||||
{{action "togglePreview"}}
|
||||
type="button"
|
||||
>
|
||||
<span class="d-button-label">{{i18n togglePreviewLabel}}</span>
|
||||
</button>
|
||||
|
||||
{{#if field.char_counter}}
|
||||
{{char-counter field.value field.max_length}}
|
||||
{{wizard-char-counter field.value field.max_length}}
|
||||
{{/if}}
|
||||
</div>
|
|
@ -4,6 +4,5 @@
|
|||
content=field.content
|
||||
tabindex=field.tabindex
|
||||
onChange=(action "onChangeValue")
|
||||
options=(hash
|
||||
none="select_kit.default_header_text"
|
||||
)}}
|
||||
options=(hash none="select_kit.default_header_text")
|
||||
}}
|
|
@ -1,10 +1,10 @@
|
|||
{{custom-wizard-group-selector
|
||||
groups=site.groups
|
||||
class=fieldClass
|
||||
field=field
|
||||
whitelist=field.content
|
||||
value=field.value
|
||||
tabindex=field.tabindex
|
||||
onChange=(action (mut field.value))
|
||||
options=(hash
|
||||
none="select_kit.default_header_text"
|
||||
)}}
|
||||
options=(hash none="select_kit.default_header_text")
|
||||
}}
|
|
@ -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
|
||||
tags=field.value
|
||||
class=fieldClass
|
||||
tabindex=field.tabindex
|
||||
tagGroups=field.tag_groups
|
||||
everyTag=true
|
||||
options=(hash
|
||||
maximum=field.limit
|
||||
allowAny=field.can_create_tag
|
||||
)}}
|
||||
options=(hash maximum=field.limit allowAny=field.can_create_tag)
|
||||
}}
|
|
@ -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}}
|
||||
{{i18n "wizard.uploading"}}
|
||||
{{else}}
|
||||
|
@ -6,12 +9,18 @@
|
|||
{{d-icon "upload"}}
|
||||
{{/if}}
|
||||
|
||||
<input disabled={{uploading}} class="hidden-upload-field" type="file" accept={{field.file_types}} style="visibility: hidden; position: absolute;" >
|
||||
<input
|
||||
disabled={{uploading}}
|
||||
class="hidden-upload-field"
|
||||
type="file"
|
||||
accept={{field.file_types}}
|
||||
style="visibility: hidden; position: absolute;"
|
||||
/>
|
||||
</label>
|
||||
|
||||
{{#if field.value}}
|
||||
{{#if isImage}}
|
||||
<img src={{field.value.url}} class="wizard-image-preview">
|
||||
<img src={{field.value.url}} class="wizard-image-preview" />
|
||||
{{else}}
|
||||
{{field.value.original_filename}}
|
||||
{{/if}}
|
||||
|
|
|
@ -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
|
||||
usernames=field.value
|
||||
placeholderKey=field.placeholder
|
||||
tabindex=field.tabindex}}
|
||||
tabindex=field.tabindex
|
||||
}}
|
|
@ -3,7 +3,7 @@
|
|||
</label>
|
||||
|
||||
{{#if field.image}}
|
||||
<div class="field-image"><img src={{field.image}}></div>
|
||||
<div class="field-image"><img src={{field.image}} /></div>
|
||||
{{/if}}
|
||||
|
||||
{{#if field.description}}
|
||||
|
@ -13,17 +13,26 @@
|
|||
{{#field-validators field=field as |validators|}}
|
||||
{{#if inputComponentName}}
|
||||
<div class="input-area">
|
||||
{{component inputComponentName field=field step=step fieldClass=fieldClass wizard=wizard autocomplete=validators.autocomplete}}
|
||||
{{component
|
||||
inputComponentName
|
||||
field=field
|
||||
step=step
|
||||
fieldClass=fieldClass
|
||||
wizard=wizard
|
||||
autocomplete=validators.autocomplete
|
||||
}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/field-validators}}
|
||||
|
||||
{{#if field.char_counter}}
|
||||
{{#if textType}}
|
||||
{{char-counter field.value field.max_length}}
|
||||
{{wizard-char-counter field.value field.max_length}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if field.errorDescription}}
|
||||
<div class="field-error-description">{{html-safe field.errorDescription}}</div>
|
||||
<div class="field-error-description">{{html-safe
|
||||
field.errorDescription
|
||||
}}</div>
|
||||
{{/if}}
|
|
@ -1,6 +1,10 @@
|
|||
<div>{{text}}</div>
|
||||
<div class="no-access-gutter">
|
||||
<button class="wizard-btn primary return-to-site" {{action "skip"}} type="button">
|
||||
<button
|
||||
class="wizard-btn primary return-to-site"
|
||||
{{action "skip"}}
|
||||
type="button"
|
||||
>
|
||||
{{i18n "wizard.return_to_site" siteName=siteName}}
|
||||
{{d-icon "sign-out-alt"}}
|
||||
</button>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<a href={{topic.url}} target="_blank" rel="noopener noreferrer">
|
||||
<span class="title">{{html-safe topic.fancy_title}}</span>
|
||||
<div class="blurb">{{date-node topic.created_at}} - {{html-safe topic.blurb}}</div>
|
||||
<div class="blurb">{{date-node topic.created_at}}
|
||||
-
|
||||
{{html-safe topic.blurb}}</div>
|
||||
</a>
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
{{#if bannerImage}}
|
||||
<div class="wizard-step-banner">
|
||||
<img src={{bannerImage}}>
|
||||
<img src={{bannerImage}} />
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
@ -26,7 +26,11 @@
|
|||
<div class="white"></div>
|
||||
<div class="black" style={{barStyle}}></div>
|
||||
<div class="screen"></div>
|
||||
<span>{{i18n "wizard.step" current=step.displayIndex total=wizard.totalSteps}}</span>
|
||||
<span>{{i18n
|
||||
"wizard.step"
|
||||
current=step.displayIndex
|
||||
total=wizard.totalSteps
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
<div class="wizard-buttons">
|
||||
|
@ -34,22 +38,44 @@
|
|||
{{loading-spinner size="small"}}
|
||||
{{else}}
|
||||
{{#if showQuitButton}}
|
||||
<a href {{action "quit"}} class="action-link quit" tabindex={{secondaryButtonIndex}}>{{i18n "wizard.quit"}}</a>
|
||||
<a
|
||||
href
|
||||
{{action "quit"}}
|
||||
class="action-link quit"
|
||||
tabindex={{secondaryButtonIndex}}
|
||||
>{{i18n "wizard.quit"}}</a>
|
||||
{{/if}}
|
||||
{{#if showBackButton}}
|
||||
<a href {{action "backStep"}} class="action-link back" tabindex={{secondaryButtonIndex}}>{{i18n "wizard.back"}}</a>
|
||||
<a
|
||||
href
|
||||
{{action "backStep"}}
|
||||
class="action-link back"
|
||||
tabindex={{secondaryButtonIndex}}
|
||||
>{{i18n "wizard.back"}}</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if showNextButton}}
|
||||
<button type="button" class="wizard-btn next primary" {{action "nextStep"}} disabled={{saving}} tabindex={{primaryButtonIndex}}>
|
||||
<button
|
||||
type="button"
|
||||
class="wizard-btn next primary"
|
||||
{{action "nextStep"}}
|
||||
disabled={{saving}}
|
||||
tabindex={{primaryButtonIndex}}
|
||||
>
|
||||
{{i18n "wizard.next"}}
|
||||
{{d-icon "chevron-right"}}
|
||||
</button>
|
||||
{{/if}}
|
||||
|
||||
{{#if showDoneButton}}
|
||||
<button type="button" class="wizard-btn done" {{action "done"}} disabled={{saving}} tabindex={{primaryButtonIndex}}>
|
||||
<button
|
||||
type="button"
|
||||
class="wizard-btn done"
|
||||
{{action "done"}}
|
||||
disabled={{saving}}
|
||||
tabindex={{primaryButtonIndex}}
|
||||
>
|
||||
{{i18n "wizard.done_custom"}}
|
||||
</button>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,12 +1,22 @@
|
|||
{{#if field.validations}}
|
||||
{{#each-in field.validations.above as |type validation|}}
|
||||
{{component validation.component field=field type=type validation=validation}}
|
||||
{{component
|
||||
validation.component
|
||||
field=field
|
||||
type=type
|
||||
validation=validation
|
||||
}}
|
||||
{{/each-in}}
|
||||
|
||||
{{yield (hash perform=(action "perform") autocomplete="off")}}
|
||||
|
||||
{{#each-in field.validations.below as |type validation|}}
|
||||
{{component validation.component field=field type=type validation=validation}}
|
||||
{{component
|
||||
validation.component
|
||||
field=field
|
||||
type=type
|
||||
validation=validation
|
||||
}}
|
||||
{{/each-in}}
|
||||
{{else}}
|
||||
{{yield}}
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
action=(action "undoChanges")
|
||||
icon=undoIcon
|
||||
label=undoKey
|
||||
class="undo-changes"}}
|
||||
class="undo-changes"
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
<div class="setting">
|
||||
|
@ -13,13 +14,12 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-subscription-selector
|
||||
value=action.type
|
||||
value=this.action.type
|
||||
feature="action"
|
||||
attribute="type"
|
||||
onChange=(action "changeType")
|
||||
options=(hash
|
||||
none="admin.wizard.select_type"
|
||||
)
|
||||
wizard=wizard
|
||||
options=(hash none="admin.wizard.select_type")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -31,16 +31,14 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{combo-box
|
||||
value=action.run_after
|
||||
value=this.action.run_after
|
||||
content=runAfterContent
|
||||
onChange=(action (mut action.run_after))}}
|
||||
onChange=(action (mut this.action.run_after))
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{wizard-message
|
||||
key=messageKey
|
||||
url=messageUrl
|
||||
component="action"}}
|
||||
{{wizard-message key=messageKey url=messageUrl component="action"}}
|
||||
|
||||
{{#if basicTopicFields}}
|
||||
<div class="setting full field-mapper-setting">
|
||||
|
@ -50,14 +48,15 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.title
|
||||
inputs=this.action.title
|
||||
property="title"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -68,23 +67,24 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{combo-box
|
||||
value=action.post
|
||||
value=this.action.post
|
||||
content=wizardFields
|
||||
nameProperty="label"
|
||||
onChange=(action (mut action.post))
|
||||
onChange=(action (mut this.action.post))
|
||||
options=(hash
|
||||
none="admin.wizard.selector.placeholder.wizard_field"
|
||||
isDisabled=showPostBuilder
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if action.post_builder}}
|
||||
{{#if this.action.post_builder}}
|
||||
<div class="setting full">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.post_builder.label"}}</label>
|
||||
|
@ -92,8 +92,9 @@
|
|||
|
||||
<div class="setting-value editor">
|
||||
{{wizard-text-editor
|
||||
value=action.post_template
|
||||
wizardFields=wizardFields}}
|
||||
value=this.action.post_template
|
||||
wizardFields=wizardFields
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -107,7 +108,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.category
|
||||
inputs=this.action.category
|
||||
property="category"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -118,7 +119,8 @@
|
|||
wizardActionSelection="output"
|
||||
outputDefaultSelection="category"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -129,7 +131,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.tags
|
||||
inputs=this.action.tags
|
||||
property="tags"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -139,7 +141,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -150,14 +153,13 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.visible
|
||||
inputs=this.action.visible
|
||||
property="visible"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
wizardFieldSelection=true userFieldSelection=true context="action"
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -169,13 +171,11 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.add_event
|
||||
inputs=this.action.add_event
|
||||
property="add_event"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
wizardFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
options=(hash wizardFieldSelection=true context="action")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -188,13 +188,11 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.add_location
|
||||
inputs=this.action.add_location
|
||||
property="add_location"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
wizardFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
options=(hash wizardFieldSelection=true context="action")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -208,7 +206,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.recipient
|
||||
inputs=this.action.recipient
|
||||
property="recipient"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -219,7 +217,8 @@
|
|||
userSelection="output"
|
||||
outputDefaultSelection="user"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -231,7 +230,7 @@
|
|||
</div>
|
||||
|
||||
{{wizard-mapper
|
||||
inputs=action.profile_updates
|
||||
inputs=this.action.profile_updates
|
||||
property="profile_updates"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -242,7 +241,8 @@
|
|||
wizardActionSelection="value"
|
||||
keyDefaultSelection="userField"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
@ -254,13 +254,14 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{combo-box
|
||||
value=action.api
|
||||
value=this.action.api
|
||||
content=availableApis
|
||||
onChange=(action (mut action.api))
|
||||
onChange=(action (mut this.action.api))
|
||||
options=(hash
|
||||
isDisabled=action.custom_title_enabled
|
||||
isDisabled=this.action.custom_title_enabled
|
||||
none="admin.wizard.action.send_to_api.select_an_api"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -271,13 +272,14 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{combo-box
|
||||
value=action.api_endpoint
|
||||
value=this.action.api_endpoint
|
||||
content=availableEndpoints
|
||||
onChange=(action (mut action.api_endpoint))
|
||||
onChange=(action (mut this.action.api_endpoint))
|
||||
options=(hash
|
||||
isDisabled=apiEmpty
|
||||
none="admin.wizard.action.send_to_api.select_an_endpoint"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -288,11 +290,12 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-text-editor
|
||||
value=action.api_body
|
||||
value=this.action.api_body
|
||||
previewEnabled=false
|
||||
barEnabled=false
|
||||
wizardFields=wizardFields
|
||||
placeholder="admin.wizard.action.send_to_api.body_placeholder"}}
|
||||
placeholder="admin.wizard.action.send_to_api.body_placeholder"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -305,7 +308,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.group
|
||||
inputs=this.action.group
|
||||
property="group"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -316,7 +319,8 @@
|
|||
groupSelection="value,output"
|
||||
outputDefaultSelection="group"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -329,7 +333,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.url
|
||||
inputs=this.action.url
|
||||
property="url"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -339,7 +343,8 @@
|
|||
groupSelection="key,value"
|
||||
categorySelection="key,value"
|
||||
userSelection="key,value"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -352,7 +357,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.categories
|
||||
inputs=this.action.categories
|
||||
property="categories"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -362,42 +367,49 @@
|
|||
userFieldSelection="key,value"
|
||||
categorySelection="output"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting full field-mapper-setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.watch_categories.mute_remainder"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.watch_categories.mute_remainder"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.mute_remainder
|
||||
inputs=this.action.mute_remainder
|
||||
property="mute_remainder"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
context="action"
|
||||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.watch_x.notification_level.label"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.watch_x.notification_level.label"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{combo-box
|
||||
value=action.notification_level
|
||||
value=this.action.notification_level
|
||||
content=availableNotificationLevels
|
||||
onChange=(action (mut action.notification_level))
|
||||
onChange=(action (mut this.action.notification_level))
|
||||
options=(hash
|
||||
isDisabled=action.custom_title_enabled
|
||||
isDisabled=this.action.custom_title_enabled
|
||||
none="admin.wizard.action.watch_x.select_a_notification_level"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -407,7 +419,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input type="checkbox" checked=action.wizard_user}}
|
||||
<Input @type="checkbox" @checked={{this.action.wizard_user}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -418,7 +430,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.usernames
|
||||
inputs=this.action.usernames
|
||||
property="usernames"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -426,7 +438,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
userSelection="output"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -439,7 +452,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.tags
|
||||
inputs=this.action.tags
|
||||
property="tags"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -449,24 +462,28 @@
|
|||
wizardActionSelection=true
|
||||
userFieldSelection="key,value"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.watch_x.notification_level.label"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.watch_x.notification_level.label"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{combo-box
|
||||
value=action.notification_level
|
||||
value=this.action.notification_level
|
||||
content=availableNotificationLevels
|
||||
onChange=(action (mut action.notification_level))
|
||||
onChange=(action (mut this.action.notification_level))
|
||||
options=(hash
|
||||
isDisabled=action.custom_title_enabled
|
||||
isDisabled=this.action.custom_title_enabled
|
||||
none="admin.wizard.action.watch_x.select_a_notification_level"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -476,7 +493,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input type="checkbox" checked=action.wizard_user}}
|
||||
<Input @type="checkbox" @checked={{this.action.wizard_user}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -487,7 +504,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.usernames
|
||||
inputs=this.action.usernames
|
||||
property="usernames"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -495,7 +512,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
userSelection="output"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -508,7 +526,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.name
|
||||
inputs=this.action.name
|
||||
property="name"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -516,7 +534,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
|
@ -526,7 +545,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.full_name
|
||||
inputs=this.action.full_name
|
||||
property="full_name"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -534,7 +553,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
|
@ -544,7 +564,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.title
|
||||
inputs=this.action.title
|
||||
property="title"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -552,7 +572,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
|
@ -562,7 +583,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.bio_raw
|
||||
inputs=this.action.bio_raw
|
||||
property="bio_raw"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -570,7 +591,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
|
@ -580,7 +602,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.owner_usernames
|
||||
inputs=this.action.owner_usernames
|
||||
property="owner_usernames"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -589,7 +611,8 @@
|
|||
userFieldSelection=true
|
||||
userSelection="output"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
|
@ -599,7 +622,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.usernames
|
||||
inputs=this.action.usernames
|
||||
property="usernames"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -608,17 +631,20 @@
|
|||
userFieldSelection=true
|
||||
userSelection="output"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.create_group.grant_trust_level"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.create_group.grant_trust_level"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.grant_trust_level
|
||||
inputs=this.action.grant_trust_level
|
||||
property="grant_trust_level"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -626,17 +652,20 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.create_group.mentionable_level"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.create_group.mentionable_level"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.mentionable_level
|
||||
inputs=this.action.mentionable_level
|
||||
property="mentionable_level"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -644,17 +673,20 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.create_group.messageable_level"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.create_group.messageable_level"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.messageable_level
|
||||
inputs=this.action.messageable_level
|
||||
property="messageable_level"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -662,17 +694,20 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.create_group.visibility_level"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.create_group.visibility_level"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.visibility_level
|
||||
inputs=this.action.visibility_level
|
||||
property="visibility_level"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -680,17 +715,20 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting full field-mapper-setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.create_group.members_visibility_level"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.create_group.members_visibility_level"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.members_visibility_level
|
||||
inputs=this.action.members_visibility_level
|
||||
property="members_visibility_level"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -698,7 +736,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -711,15 +750,16 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.name
|
||||
inputs=this.action.name
|
||||
property="name"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
textSelection="key,value"
|
||||
textSelection="key,value,output"
|
||||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -730,7 +770,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.slug
|
||||
inputs=this.action.slug
|
||||
property="slug"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -738,7 +778,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -749,7 +790,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.color
|
||||
inputs=this.action.color
|
||||
property="color"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -757,7 +798,8 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -768,7 +810,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.text_color
|
||||
inputs=this.action.text_color
|
||||
property="text_color"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -776,18 +818,21 @@
|
|||
wizardFieldSelection=true
|
||||
userFieldSelection="key,value"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="setting full field-mapper-setting">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.create_category.parent_category"}}</label>
|
||||
<label>{{i18n
|
||||
"admin.wizard.action.create_category.parent_category"
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.parent_category_id
|
||||
inputs=this.action.parent_category_id
|
||||
property="parent_category_id"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -796,7 +841,8 @@
|
|||
userFieldSelection="key,value"
|
||||
categorySelection="output"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -807,7 +853,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.permissions
|
||||
inputs=this.action.permissions
|
||||
property="permissions"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -818,7 +864,8 @@
|
|||
userFieldSelection=true
|
||||
groupSelection="key"
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -831,7 +878,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.custom_fields
|
||||
inputs=this.action.custom_fields
|
||||
property="custom_fields"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -842,7 +889,8 @@
|
|||
userFieldSelection="value"
|
||||
keyPlaceholder="admin.wizard.action.custom_fields.key"
|
||||
context=customFieldsContext
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -855,7 +903,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.required
|
||||
inputs=this.action.required
|
||||
property="required"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
|
@ -864,7 +912,8 @@
|
|||
userFieldSelection=true
|
||||
groupSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -876,7 +925,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input type="checkbox" checked=action.skip_redirect}}
|
||||
<Input @type="checkbox" @checked={{this.action.skip_redirect}} />
|
||||
|
||||
<span>
|
||||
{{i18n "admin.wizard.action.skip_redirect.description" type="topic"}}
|
||||
|
@ -890,10 +939,13 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input type="checkbox" checked=action.suppress_notifications}}
|
||||
<Input @type="checkbox" @checked={{this.action.suppress_notifications}} />
|
||||
|
||||
<span>
|
||||
{{i18n "admin.wizard.action.suppress_notifications.description" type="topic"}}
|
||||
{{i18n
|
||||
"admin.wizard.action.suppress_notifications.description"
|
||||
type="topic"
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -906,7 +958,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input value=action.code}}
|
||||
<Input @value={{this.action.code}} />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
|
@ -3,7 +3,8 @@
|
|||
action=(action "undoChanges")
|
||||
icon=undoIcon
|
||||
label=undoKey
|
||||
class="undo-changes"}}
|
||||
class="undo-changes"
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
<div class="setting">
|
||||
|
@ -11,7 +12,7 @@
|
|||
<label>{{i18n "admin.wizard.field.label"}}</label>
|
||||
</div>
|
||||
<div class="setting-value">
|
||||
{{input name="label" value=field.label}}
|
||||
<Input name="label" @value={{this.field.label}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -22,7 +23,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
<span>{{i18n "admin.wizard.field.required_label"}}</span>
|
||||
{{input type="checkbox" checked=field.required}}
|
||||
<Input @type="checkbox" @checked={{this.field.required}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -31,7 +32,7 @@
|
|||
<label>{{i18n "admin.wizard.field.description"}}</label>
|
||||
</div>
|
||||
<div class="setting-value">
|
||||
{{textarea name="description" value=field.description}}
|
||||
<Textarea name="description" @value={{this.field.description}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -46,7 +47,8 @@
|
|||
onUploadDeleted=(action "imageUploadDeleted")
|
||||
type="wizard-field-image"
|
||||
class="no-repeat contain-image"
|
||||
id=(concat "wizard-field-" field.id "-image-upload")}}
|
||||
id=(concat "wizard-field-" field.id "-image-upload")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -56,20 +58,18 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{combo-box
|
||||
{{wizard-subscription-selector
|
||||
value=field.type
|
||||
content=fieldTypes
|
||||
feature="field"
|
||||
attribute="type"
|
||||
onChange=(action "changeType")
|
||||
options=(hash
|
||||
none="admin.wizard.select_type"
|
||||
)}}
|
||||
wizard=wizard
|
||||
options=(hash none="admin.wizard.select_type")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{wizard-message
|
||||
key=messageKey
|
||||
url=messageUrl
|
||||
component="field"}}
|
||||
{{wizard-message key=messageKey url=messageUrl component="field"}}
|
||||
|
||||
{{#if isTextType}}
|
||||
<div class="setting">
|
||||
|
@ -78,11 +78,12 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input
|
||||
type="number"
|
||||
<Input
|
||||
@type="number"
|
||||
name="min_length"
|
||||
value=field.min_length
|
||||
class="small"}}
|
||||
@value={{this.field.min_length}}
|
||||
class="small"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -92,11 +93,12 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input
|
||||
type="number"
|
||||
<Input
|
||||
@type="number"
|
||||
name="max_length"
|
||||
value=field.max_length
|
||||
class="small"}}
|
||||
@value={{this.field.max_length}}
|
||||
class="small"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -107,9 +109,7 @@
|
|||
|
||||
<div class="setting-value">
|
||||
<span>{{i18n "admin.wizard.field.char_counter_placeholder"}}</span>
|
||||
{{input
|
||||
type="checkbox"
|
||||
checked=field.char_counter}}
|
||||
<Input @type="checkbox" @checked={{this.field.char_counter}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -119,10 +119,11 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{textarea
|
||||
<Textarea
|
||||
name="field_placeholder"
|
||||
class="medium"
|
||||
value=field.placeholder}}
|
||||
@value={{this.field.placeholder}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -134,7 +135,11 @@
|
|||
</div>
|
||||
|
||||
<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>
|
||||
{{/if}}
|
||||
|
@ -146,7 +151,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input value=field.file_types class="medium"}}
|
||||
<Input @value={{this.field.file_types}} class="medium" />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -158,7 +163,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input type="number" value=field.limit class="small"}}
|
||||
<Input @type="number" @value={{this.field.limit}} class="small" />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -166,12 +171,16 @@
|
|||
{{#if isDateTime}}
|
||||
<div class="setting">
|
||||
<div class="setting-label">
|
||||
<label>{{html-safe (i18n "admin.wizard.field.date_time_format.label")}}</label>
|
||||
<label>{{html-safe
|
||||
(i18n "admin.wizard.field.date_time_format.label")
|
||||
}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input value=field.format class="medium"}}
|
||||
<label>{{html-safe (i18n "admin.wizard.field.date_time_format.instructions")}}</label>
|
||||
<Input @value={{this.field.format}} class="medium" />
|
||||
<label>{{html-safe
|
||||
(i18n "admin.wizard.field.date_time_format.instructions")
|
||||
}}</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -187,7 +196,8 @@
|
|||
inputs=field.prefill
|
||||
property="prefill"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=prefillOptions}}
|
||||
options=prefillOptions
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -203,7 +213,8 @@
|
|||
inputs=field.content
|
||||
property="content"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=contentOptions}}
|
||||
options=contentOptions
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -229,9 +240,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{input
|
||||
type="checkbox"
|
||||
checked=field.can_create_tag}}
|
||||
<Input @type="checkbox" @checked={{this.field.can_create_tag}} />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -243,9 +252,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=field.condition
|
||||
options=fieldConditionOptions}}
|
||||
{{wizard-mapper inputs=field.condition options=fieldConditionOptions}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -255,9 +262,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=field.index
|
||||
options=fieldIndexOptions}}
|
||||
{{wizard-mapper inputs=field.index options=fieldIndexOptions}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -272,9 +277,8 @@
|
|||
value=field.property
|
||||
content=categoryPropertyTypes
|
||||
onChange=(action (mut field.property))
|
||||
options=(hash
|
||||
none="admin.wizard.selector.placeholder.property"
|
||||
)}}
|
||||
options=(hash none="admin.wizard.selector.placeholder.property")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
<label>{{i18n "admin.wizard.step.title"}}</label>
|
||||
</div>
|
||||
<div class="setting-value">
|
||||
{{input
|
||||
name="title"
|
||||
value=step.title}}
|
||||
<Input name="title" @value={{this.step.title}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -20,7 +18,8 @@
|
|||
onUploadDeleted=(action "bannerUploadDeleted")
|
||||
type="wizard-step-banner"
|
||||
class="no-repeat contain-image"
|
||||
id=(concat "wizard-step-" step.id "-banner-upload")}}
|
||||
id=(concat "wizard-step-" step.id "-banner-upload")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -29,8 +28,7 @@
|
|||
<label>{{i18n "admin.wizard.step.description"}}</label>
|
||||
</div>
|
||||
<div class="setting-value">
|
||||
{{wizard-text-editor
|
||||
value=step.raw_description}}
|
||||
{{wizard-text-editor value=step.raw_description}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -41,9 +39,7 @@
|
|||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=step.condition
|
||||
options=stepConditionOptions}}
|
||||
{{wizard-mapper inputs=step.condition options=stepConditionOptions}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -51,7 +47,7 @@
|
|||
<div class="setting-label"></div>
|
||||
<div class="setting-value force-final">
|
||||
<h4>{{i18n "admin.wizard.step.force_final.label"}}</h4>
|
||||
{{input type="checkbox" checked=step.force_final}}
|
||||
<Input @type="checkbox" @checked={{this.step.force_final}} />
|
||||
<span>{{i18n "admin.wizard.step.force_final.description"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -71,13 +67,14 @@
|
|||
userFieldSelection="value"
|
||||
keyPlaceholder="admin.wizard.submission_key"
|
||||
context="step"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
{{#if step.required_data}}
|
||||
<div class="required-data-message">
|
||||
<div class="label">
|
||||
{{i18n "admin.wizard.step.required_data.not_permitted_message"}}
|
||||
</div>
|
||||
{{input value=step.required_data_message}}
|
||||
<Input @value={{this.step.required_data_message}} />
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
@ -96,7 +93,8 @@
|
|||
keyPlaceholder="admin.wizard.param_key"
|
||||
valuePlaceholder="admin.wizard.submission_key"
|
||||
context="step"
|
||||
)}}
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
{{/wizard-subscription-container}}
|
||||
|
@ -105,15 +103,18 @@
|
|||
itemType="field"
|
||||
current=currentField
|
||||
items=step.fields
|
||||
parentId=step.id}}
|
||||
parentId=step.id
|
||||
}}
|
||||
|
||||
{{#each step.fields as |field|}}
|
||||
{{wizard-custom-field
|
||||
field=field
|
||||
step=step
|
||||
wizard=wizard
|
||||
currentFieldId=currentField.id
|
||||
fieldTypes=fieldTypes
|
||||
removeField="removeField"
|
||||
wizardFields=wizardFields
|
||||
subscribed=subscribed}}
|
||||
subscribed=subscribed
|
||||
}}
|
||||
{{/each}}
|
|
@ -4,14 +4,34 @@
|
|||
{{#if anyLinks}}
|
||||
{{#each links as |link|}}
|
||||
<div data-id={{link.id}}>
|
||||
{{d-button action=(action "change") actionParam=link.id translatedLabel=link.label class=link.classes}}
|
||||
{{d-button
|
||||
action=(action "change")
|
||||
actionParam=link.id
|
||||
translatedLabel=link.label
|
||||
class=link.classes
|
||||
}}
|
||||
{{#unless link.first}}
|
||||
{{d-button action=(action "back") actionParam=link icon="arrow-left" class="back"}}
|
||||
{{d-button
|
||||
action=(action "back")
|
||||
actionParam=link
|
||||
icon="arrow-left"
|
||||
class="back"
|
||||
}}
|
||||
{{/unless}}
|
||||
{{#unless link.last}}
|
||||
{{d-button action=(action "forward") actionParam=link icon="arrow-right" class="forward"}}
|
||||
{{d-button
|
||||
action=(action "forward")
|
||||
actionParam=link
|
||||
icon="arrow-right"
|
||||
class="forward"
|
||||
}}
|
||||
{{/unless}}
|
||||
{{d-button action=(action "remove") actionParam=link.id icon="times" class="remove"}}
|
||||
{{d-button
|
||||
action=(action "remove")
|
||||
actionParam=link.id
|
||||
icon="times"
|
||||
class="remove"
|
||||
}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
{{combo-box
|
||||
value=connector
|
||||
content=connectors
|
||||
onChange=(action "changeConnector")}}
|
||||
onChange=(action "changeConnector")
|
||||
}}
|
||||
{{else}}
|
||||
{{#if connector}}
|
||||
<span class="connector-single">
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
{{wizard-mapper-connector
|
||||
connector=input.type
|
||||
connectors=inputTypes
|
||||
connector=this.input.type
|
||||
connectors=this.inputTypes
|
||||
inputTypes=true
|
||||
inputType=inputType
|
||||
inputType=this.inputType
|
||||
connectorType="type"
|
||||
options=options
|
||||
onUpdate=onUpdate}}
|
||||
options=this.options
|
||||
onUpdate=this.onUpdate
|
||||
}}
|
||||
|
||||
{{#if hasPairs}}
|
||||
<div class="mapper-pairs mapper-block">
|
||||
{{#each input.pairs as |pair|}}
|
||||
{{#each this.input.pairs as |pair|}}
|
||||
{{wizard-mapper-pair
|
||||
pair=pair
|
||||
last=pair.last
|
||||
inputType=inputType
|
||||
options=options
|
||||
inputType=this.inputType
|
||||
options=this.options
|
||||
removePair=(action "removePair")
|
||||
onUpdate=onUpdate}}
|
||||
onUpdate=this.onUpdate
|
||||
}}
|
||||
{{/each}}
|
||||
|
||||
{{#if canAddPair}}
|
||||
|
@ -30,25 +32,27 @@
|
|||
{{#if hasOutput}}
|
||||
{{#if hasPairs}}
|
||||
{{wizard-mapper-connector
|
||||
connector=input.output_connector
|
||||
connectors=connectors
|
||||
connector=this.input.output_connector
|
||||
connectors=this.connectors
|
||||
connectorType="output"
|
||||
inputType=inputType
|
||||
options=options
|
||||
onUpdate=onUpdate}}
|
||||
inputType=this.inputType
|
||||
options=this.options
|
||||
onUpdate=this.onUpdate
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
<div class="output mapper-block">
|
||||
{{wizard-mapper-selector
|
||||
selectorType="output"
|
||||
inputType=input.type
|
||||
value=input.output
|
||||
activeType=input.output_type
|
||||
options=options
|
||||
onUpdate=onUpdate}}
|
||||
inputType=this.input.type
|
||||
value=this.input.output
|
||||
activeType=this.input.output_type
|
||||
options=this.options
|
||||
onUpdate=this.onUpdate
|
||||
}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<a role="button" class="remove-input" {{action remove input}}>
|
||||
<a role="button" class="remove-input" {{action remove this.input}}>
|
||||
{{d-icon "times"}}
|
||||
</a>
|
|
@ -5,7 +5,8 @@
|
|||
value=pair.key
|
||||
activeType=pair.key_type
|
||||
options=options
|
||||
onUpdate=onUpdate}}
|
||||
onUpdate=onUpdate
|
||||
}}
|
||||
</div>
|
||||
|
||||
{{wizard-mapper-connector
|
||||
|
@ -14,7 +15,8 @@
|
|||
connectorType="pair"
|
||||
inputType=inputType
|
||||
options=options
|
||||
onUpdate=onUpdate}}
|
||||
onUpdate=onUpdate
|
||||
}}
|
||||
|
||||
<div class="value mapper-block">
|
||||
{{wizard-mapper-selector
|
||||
|
@ -24,7 +26,8 @@
|
|||
activeType=pair.value_type
|
||||
options=options
|
||||
onUpdate=onUpdate
|
||||
connector=pair.connector}}
|
||||
connector=pair.connector
|
||||
}}
|
||||
</div>
|
||||
|
||||
{{#if showJoin}}
|
||||
|
@ -32,5 +35,7 @@
|
|||
{{/if}}
|
||||
|
||||
{{#if showRemove}}
|
||||
<a role="button" {{action removePair pair}} class="remove-pair">{{d-icon "times"}}</a>
|
||||
<a role="button" {{action removePair pair}} class="remove-pair">{{d-icon
|
||||
"times"
|
||||
}}</a>
|
||||
{{/if}}
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden …
In neuem Issue referenzieren