1
0
Fork 0

Commits vergleichen

..

376 Commits

Autor SHA1 Nachricht Datum
5fe63ec70e
test 2023-10-03 20:36:04 +02:00
6bc33ebd64
test 2023-10-03 20:25:00 +02:00
df456abda0
test3 2023-10-03 20:09:53 +02:00
df30ce32ee
test2 2023-10-03 19:54:15 +02:00
4750829e1a
testing 2023-10-03 19:35:16 +02:00
49535d88bb
set default type to business 2023-10-03 18:44:50 +02:00
Angus McLeod
d5aa616ff8 DEV: Add explicit ordering to more specs 2023-09-30 09:46:25 +08:00
Angus McLeod
578c92e90e
Merge pull request #269 from paviliondev/composer-control-feature
Composer control feature
2023-09-21 10:43:24 +10:00
jumagura
3d104406fd REFACTOR: Improve test for category chooser when there is a create_topic_wizard customfield 2023-09-20 03:55:32 -04:00
jumagura
0eb6fb1ae0 REFACTOR: Move before_create_topic event handler to plugin.rb 2023-09-19 20:46:42 -04:00
jumagura
0992e9601c DEV: Make hide category default when custom wizard is selected 2023-09-19 14:17:06 -04:00
jumagura
10609f33e2 FIX: linting error 2023-09-19 14:00:04 -04:00
jumagura
bb81c5700a DEV: Use Discourse Events instead of topic model 2023-09-19 13:57:11 -04:00
jumagura
03ef41f7f0 FIX: Linting error 2023-09-18 18:11:20 -04:00
jumagura
bdd290f4e6 FIX: Linting error 2023-09-18 18:07:27 -04:00
jumagura
2ab15aaf86 FIX: linting error 2023-09-18 18:06:52 -04:00
jumagura
de9dccf233 bump version 2023-09-18 17:46:41 -04:00
jumagura
bb3f0c6252 DEV: Add acceptance tests for category filtering 2023-09-18 17:41:24 -04:00
jumagura
61309fd320 DEV: Add initializer logic to filter categories 2023-09-18 17:40:44 -04:00
jumagura
b365b5dd4f DEV: Add custom_field 2023-09-18 17:40:07 -04:00
jumagura
de03cbd15a DEV: Implement control to hide category from composer dropdown in specified categories 2023-09-18 17:39:50 -04:00
jumagura
29d7818a4a DEV: Add spec for validation 2023-09-18 17:36:21 -04:00
jumagura
f2d1437cff DEV: Implement wizard replacement validation in Topic Creation 2023-09-18 17:35:38 -04:00
Angus McLeod
9ab4ca21c8
Merge pull request #268 from paviliondev/fix_export_size
FIX: avoid page limit on downloads
2023-09-16 16:03:15 +10:00
merefield
16109b01e7 bump patch 2023-09-15 16:19:09 +01:00
merefield
43cd090b17 FIX: avoid page limit on downloads 2023-09-15 16:15:31 +01:00
Angus McLeod
5f99dc226a
Merge pull request #267 from paviliondev/resolve_deprecations
COMPATIBILITY:  resolve deprecations expected in Ember upgrade for Discourse 3.2
2023-09-15 16:55:45 +10:00
merefield
2460685e65 remove unintentional comment 2023-09-15 07:04:17 +01:00
merefield
c6fded7113 fix disabled behaviour of start time button 2023-09-14 21:08:20 +01:00
merefield
713c1bcaa5 fix test 2023-09-14 20:47:05 +01:00
merefield
ffa37e895c fix test and test spelling 2023-09-14 20:35:30 +01:00
merefield
22fac139b6 linting 2023-09-14 20:08:10 +01:00
merefield
61ea75dcad remove debugger statement 2023-09-14 20:03:02 +01:00
merefield
766d3b5fc9 fix erroneous route transitions 2023-09-14 20:02:02 +01:00
merefield
a786b5956b linting 2023-09-14 19:21:10 +01:00
merefield
794b7c9d5c add missing I18n imports 2023-09-14 19:19:20 +01:00
merefield
76c359be3b linting 2023-09-14 19:16:59 +01:00
merefield
6572b32706 move modals to glimmer components 2023-09-14 19:14:44 +01:00
merefield
d71d9976b8 bump patch 2023-09-14 15:05:54 +01:00
merefield
27596a1624 linting 2023-09-14 15:03:15 +01:00
merefield
3c17ef574e linting 2023-09-14 14:59:22 +01:00
merefield
742239b023 add router service to controllers to avoid deprecation 2023-09-14 14:58:34 +01:00
merefield
33a320021f linting 2023-09-14 14:47:52 +01:00
merefield
e6f44b7dfc resolve a batch of router deprecations 2023-09-14 14:42:12 +01:00
merefield
31f917ec80 fix replaceWith calling style deprecation 2023-09-14 14:34:18 +01:00
merefield
6c0d7a671e more this additions 2023-09-14 14:18:47 +01:00
merefield
31b2625a65 add this to avoid deprecation 2023-09-14 14:05:55 +01:00
Robert
bce0acbfd2
Merge pull request #263 from paviliondev/update-compatibility-main
DEV: Pin plugin for Discourse 3.1 stable
2023-09-08 16:31:17 +01:00
Robert
b81bc762c7
Merge branch 'main' into update-compatibility-main 2023-09-08 16:21:00 +01:00
jumagura
785bce228e bump version 2023-09-08 10:02:12 -04:00
Angus McLeod
52efc15576
Merge pull request #265 from paviliondev/temp_ignore_redirect
FEATURE: implement a way to temporarily ignore redirect
2023-09-08 09:53:12 +02:00
merefield
ebc0f706e3 remove redundant assignment 2023-09-08 07:18:31 +01:00
merefield
050a38a9d3 make code testable, add test 2023-09-08 07:13:52 +01:00
merefield
8649ab2286 bump patch 2023-09-06 16:27:40 +01:00
merefield
037132fb1a prettier 2023-09-06 16:26:30 +01:00
merefield
8332818616 FEATURE: implement way to temporarily ignore redirect 2023-09-06 13:29:21 +01:00
jumagura
36d6f9bc6f bump version 2023-09-05 12:52:11 -04:00
jumagura
121d60330a DEV: Pin plugin for Discourse 3.1 stable 2023-09-05 12:49:58 -04:00
jumagura
13a1538eb9 DEV: Update compatibility for main branch 2023-09-05 12:38:25 -04:00
Angus McLeod
fee56c2d43
Merge pull request #261 from paviliondev/fix_submissions_data_export_content
SECURITY: remove sensitive user content from submissions export
2023-08-23 17:50:10 +02:00
merefield
da4fe79aea bump patch 2023-08-23 14:35:58 +01:00
merefield
0a450d58f4 SECURITY: remove sensitive user content from submissions export 2023-08-23 14:33:56 +01:00
Robert
b45e01803d
Merge pull request #260 from paviliondev/fix-hyperlink-modal-deprecation
COMPATIBILITY: Update insert-hyperlink invocation following core change
2023-08-15 07:52:08 +01:00
jumagura
b8cfaa7f23 bump version 2023-08-14 18:19:14 -04:00
jumagura
690f12ee3e COMPATIBILITY: Update insert-hyperlink invocation following core change 2023-08-14 18:17:57 -04:00
Angus McLeod
1f35b80f85
Merge pull request #247 from paviliondev/subscription_client_gem_update
Update subscription client class to support gem version of Subscription Client
2023-07-27 13:30:02 +02:00
merefield
72b1a2aca5 merge in main 2023-07-27 09:52:19 +01:00
Angus McLeod
f5129b7ffe
Merge pull request #257 from paviliondev/remove_category_custom_field_on_wizard_delete
FIX: Remove category custom field on wizard delete (Take Two)
2023-07-19 12:27:33 +01:00
merefield
a342626267 stick to one method for text conversion 2023-07-19 11:14:08 +01:00
merefield
3fe1a7c7e8 remove redundant downcasing 2023-07-19 09:23:48 +01:00
merefield
609df33680 downcase name for category cstm setting 2023-07-18 14:29:39 +01:00
merefield
ec739d0450 bump patch 2023-07-18 14:06:16 +01:00
merefield
c26a89a78a fix test 2023-07-18 14:05:09 +01:00
merefield
ec88af0cc0 FIX: also delete Category Cust Fld for wizrds with names of mult words 2023-07-18 13:53:09 +01:00
Angus McLeod
10d597c495
Merge pull request #256 from paviliondev/fix_timer_default_on_new_wizard
FIX: direct after start time default for new wizard
2023-07-17 12:01:49 +01:00
merefield
cc2eb8c742 linting 2023-07-17 10:55:44 +01:00
merefield
98fe9ce77f bump patch 2023-07-17 10:36:07 +01:00
merefield
55a4797e4f Merge branch 'main' into fix_timer_default_on_new_wizard 2023-07-17 10:35:37 +01:00
Angus McLeod
33da03b63a
Merge pull request #255 from paviliondev/remove_category_custom_field_on_wizard_delete
FIX: ensure related create topic wizard setting is removed when wizard is deleted
2023-07-17 10:32:58 +01:00
merefield
580889a34e move destroy logic into library method & transaction 2023-07-17 10:16:27 +01:00
merefield
8d32aebf05 FIX: direct after start time default for new wizard 2023-07-16 11:33:09 +01:00
merefield
b71f627d73 improve test explanation 2023-07-15 10:00:54 +01:00
merefield
1b93c06188 bump patch 2023-07-15 09:57:54 +01:00
merefield
4449ab7aff Add corresponding code to help pass test 2023-07-15 09:56:32 +01:00
merefield
1662ff166d Add failing test 2023-07-15 09:38:46 +01:00
Angus McLeod
270d7926cc
Merge pull request #253 from paviliondev/dont_rely_on_application_route_override
IMPROVE: Move pending wizard check to page change event
2023-07-14 08:19:45 +02:00
merefield
a13f7be6a3 revert remove redundant line as not redundant 2023-07-13 16:07:36 +01:00
merefield
f94df66613 move current user determination to api & remove redundant line 2023-07-13 16:04:31 +01:00
Robert Barrow
5aefa9c544 restore after directive 2023-07-12 12:53:20 +01:00
Robert Barrow
7861e37224 restore original redirect file 2023-07-12 11:04:59 +01:00
Robert Barrow
6a9f93bccb Add back message bus subscription 2023-07-11 19:49:19 +01:00
Robert Barrow
bf2dcdba86 linting 2023-07-11 17:58:10 +01:00
Robert Barrow
6beccd95f0 linting 2023-07-11 17:55:19 +01:00
Robert Barrow
603886b394 add test 2023-07-11 17:49:08 +01:00
Robert Barrow
7fd4d9bd24 revert unintended changes 2023-07-11 14:32:04 +01:00
merefield
0cec743253 fix for anon 2023-07-11 08:48:20 +01:00
merefield
ccb7095b00 bump patch 2023-07-11 08:24:36 +01:00
merefield
3189c03fbe Merge branch 'main' into dont_rely_on_application_route_override 2023-07-11 08:22:31 +01:00
Angus McLeod
c4521b4b92
Merge pull request #254 from paviliondev/linting_update
COMPATIBILITY: Linting update
2023-07-11 09:06:55 +02:00
merefield
00a66cd1f9 fix failing tests 2023-07-10 21:31:47 +01:00
merefield
c495540157 revert reversion of fix 2023-07-10 15:18:55 +01:00
merefield
b8965de717 revert prior selector change 2023-07-10 15:08:29 +01:00
merefield
6f4e7015f8 linting 2023-07-10 09:35:59 +01:00
merefield
90046f5fe3 simplify selector 2023-07-10 09:33:48 +01:00
merefield
ba20a8a195 prettier 2023-07-10 07:55:54 +01:00
merefield
1f928f0f81 more ES linting 2023-07-10 07:52:32 +01:00
merefield
c67d5075cb ES Linting 2023-07-10 07:46:43 +01:00
merefield
2737210baf import bootbox 2023-07-10 07:32:05 +01:00
merefield
b73cb95e46 bump patch 2023-07-10 07:28:08 +01:00
merefield
a575ffdf76 update yarn.lock 2023-07-10 07:25:42 +01:00
merefield
e51ba49e11 update package.json 2023-07-10 07:23:59 +01:00
merefield
2df920895d FE linting 2023-07-10 07:03:45 +01:00
merefield
39b947d003 bump patch 2023-07-10 06:58:52 +01:00
merefield
10df3208df IMPROVE: Move pending wizard check to page change event 2023-07-07 17:16:51 +01:00
Angus McLeod
d74f5cbd89
Merge pull request #252 from paviliondev/temp_app_route_fix
FIX: temp fix for javascript exception during init
2023-07-07 12:20:37 +02:00
merefield
eadd64bbbc FIX: temp fix for javascript exception during init 2023-07-07 11:11:00 +01:00
merefield
c85be78af5 merge in latest main 2023-07-05 19:59:11 +01:00
Angus McLeod
ebd25f2780
Merge pull request #250 from paviliondev/add_product_slug_env_variable
Add product slug env variable
2023-06-29 11:13:02 +02:00
Angus McLeod
af39c567ea Add product slug env variable 2023-06-29 10:26:39 +02:00
Angus McLeod
cd6503d425 Remove fragile tests 2023-06-28 09:22:07 +02:00
Angus McLeod
6e0f10ca0d
Merge pull request #248 from paviliondev/add-logs
Add memoization to reduce redis calls
2023-06-22 06:34:07 +02:00
Angus McLeod
f8ea421852 Bump version 2023-06-22 06:25:05 +02:00
Angus McLeod
f08f9f303f Bump version 2023-06-22 06:23:41 +02:00
Angus McLeod
b4d23970bc
Merge branch 'main' into add-logs 2023-06-22 06:20:02 +02:00
Angus McLeod
7561bc8042
Merge pull request #249 from paviliondev/fix_reset_behaviour
FIX: upon revisit, start at step 1 if reset on revisit is set
2023-06-21 11:06:42 +02:00
merefield
d9ace0449f Bump patch 2023-06-21 09:56:46 +01:00
merefield
712c15e845 FIX: upon revisit, start at step 1 if reset on revisit is set 2023-06-21 09:53:42 +01:00
jumagura
a5179e568b bump version 2023-06-21 00:44:39 -04:00
jumagura
9e65fcb410 Merge branch 'main' into add-logs 2023-06-21 00:43:38 -04:00
jumagura
29141ab35c DEV: Change instance name to a more specific name 2023-06-21 00:41:45 -04:00
jumagura
a5ebc282cf DEV: Implement instance-level caching for custom fields 2023-06-21 00:33:01 -04:00
Angus McLeod
0602e59d70 DEV: frontend tests cleanup
- Fix failing test
- Handle deprecations
- Fix typos
2023-06-20 09:10:53 +02:00
jumagura
78e7ae4e04 DEV: Undo formatting change 2023-06-19 16:54:23 -04:00
jumagura
c8a19e8c85 bump version 2023-06-19 16:53:34 -04:00
jumagura
298c083624 DEV: Add memoization to reduce redis calls 2023-06-19 16:52:20 -04:00
Robert
92b8fdc6d9
Bump patch 2023-06-13 19:23:54 +01:00
Angus McLeod
61bf199934 Update class in tests 2023-06-13 20:02:20 +02:00
Angus McLeod
86e6945ad4 Update subscription client class 2023-06-13 19:35:12 +02:00
Angus McLeod
e7ab0f7143
Merge pull request #214 from paviliondev/admin-acceptance-tests
Admin acceptance tests
2023-06-13 16:43:49 +02:00
jumagura
519e868078 bump version 2023-06-06 15:24:32 -04:00
jumagura
c1f06c6fff Merge branch 'main' into admin-acceptance-tests 2023-06-06 15:23:30 -04:00
Angus McLeod
42d6e094a2 Fix failing spec
See further 6cf863080a
2023-06-06 09:15:16 +02:00
Angus McLeod
2fe8501c65 Fix failing specs 2023-06-02 12:51:28 +02:00
Angus McLeod
c256a41668 Also ensure subscription client definition is in the right state 2023-05-31 14:27:00 +02:00
Angus McLeod
99e747a331 Ensure subscriptions are not stubbed if testing for no subscription 2023-05-31 12:09:00 +02:00
jumagura
2cb876ac69 Merge branch 'main' into admin-acceptance-tests 2023-05-26 00:53:58 -04:00
jumagura
acbaebf0aa DEV: Add test for reading wizard content 2023-05-26 00:41:35 -04:00
jumagura
97db657227 DEV: Add test for wizard set and if in actions section 2023-05-26 00:39:27 -04:00
jumagura
c1ee353470 DEV: Add another wizard to test reading a wizard content 2023-05-26 00:35:01 -04:00
Angus McLeod
4bfea70dde Linting fix 2023-05-23 10:27:42 +02:00
Angus McLeod
12ca60775a Bump version 2023-05-23 10:11:43 +02:00
Angus McLeod
4cdfdbf9d5 FIX: ensure element is present before passing on insertText event 2023-05-23 10:10:52 +02:00
Robert
6dbd8f7c4f
Merge pull request #246 from paviliondev/multiple_subscriptions_fix
Fix multiple subscriptions sort
2023-05-19 09:38:02 +01:00
Angus McLeod
49c1848e88 Bump version 2023-05-19 10:30:58 +02:00
Angus McLeod
00ba8425e3 Fix multiple subscriptions sort 2023-05-19 10:29:54 +02:00
Robert
705c84dd02
Merge pull request #221 from paviliondev/subscription_client_update
Complete updates to handle subscription product slugs
2023-05-19 07:47:08 +01:00
Angus McLeod
dc23db7a0c Bump version 2023-05-18 18:45:40 +02:00
Angus McLeod
929edc5d0e
Merge branch 'main' into subscription_client_update 2023-05-18 18:44:08 +02:00
jumagura
594a226576 DEV: Add testing for Step text editor 2023-05-16 01:25:59 -04:00
jumagura
b965afa020 DEV: Fix linting error 2023-05-11 06:33:28 -04:00
jumagura
92461ad9d3 DEV: Add aditional second waiting to avoid global failure 2023-05-11 06:23:35 -04:00
jumagura
a4a18115ee DEV: Change message content condition 2023-05-11 05:57:06 -04:00
jumagura
dd8b4b8e99 DEV: Add waiting the icon to change to default 2023-05-11 05:32:33 -04:00
jumagura
537ffeb883 DEV: Add waiting for inserted element to disappear 2023-05-11 04:57:36 -04:00
jumagura
69dc96562d DEV: Add waiting for the default message 2023-05-11 04:19:05 -04:00
jumagura
c83e514de9 DEV: Add admin manager destroy test 2023-05-11 04:00:46 -04:00
jumagura
887057d0d2 DEV: Add download submissions test 2023-05-11 02:34:23 -04:00
jumagura
64b1c0264e DEV: bump version 2023-05-11 01:48:53 -04:00
jumagura
02a3c426c0 Merge branch 'main' into admin-acceptance-tests 2023-05-11 01:47:58 -04:00
jumagura
9793ef6453 DEV: Add admin submissions modal action tests 2023-05-11 01:44:23 -04:00
jumagura
ed37c13664 DEV: Change title for admin api testing 2023-05-11 01:43:11 -04:00
Angus McLeod
e46d681379
Update README.md
Update issue and documentation links in readme.
2023-05-10 12:20:53 +02:00
Angus McLeod
2103c4d67e
Merge pull request #242 from paviliondev/field_type_subscription_ui
Add wizard-subscription-selector support to field type selection
2023-05-10 11:55:23 +02:00
jumagura
e4b9be9393 DEV: Add update, delete acceptance tests 2023-05-09 10:20:04 -04:00
jumagura
1a84acec21 DEV: Add created and read custom fields tests 2023-05-09 03:17:22 -04:00
jumagura
d0459575e0 DEV: Test available serializer fields for each class 2023-05-09 01:21:47 -04:00
jumagura
0c08b5c044 DEV: Add test for enabled and disabled custom field for unsuscribed plan 2023-05-09 01:19:46 -04:00
jumagura
b3266c6d18 DEV: Add custom fields unsuscribed test 2023-05-09 01:15:21 -04:00
Angus McLeod
7c56b6d4d7
Merge branch 'main' into field_type_subscription_ui 2023-05-08 18:42:14 +02:00
jumagura
af064dc655 DEV: Keep plugin.rb format 2023-05-05 20:43:16 -04:00
jumagura
9ff9844420 Merge branch 'main' into admin-acceptance-tests 2023-05-05 20:38:59 -04:00
jumagura
63d975eba0 DEV: Add admin custom fields acceptance tests 2023-05-05 20:37:58 -04:00
Angus McLeod
6be5511d18
Merge branch 'main' into subscription_client_update 2023-05-04 17:27:07 +02:00
Angus McLeod
44f078caff Fix failing rspec test 2023-05-04 17:25:10 +02:00
Angus McLeod
42517c094e Minor tweaks to subscription loading logic 2023-05-04 17:16:11 +02:00
Angus McLeod
99f2e8bbd9 Rubocop 2023-05-04 15:49:22 +02:00
Angus McLeod
3ea19e1086 Add support for server products PR in isolation 2023-05-04 15:49:04 +02:00
Angus McLeod
92fe9db1e0 Change subscription_url back 2023-05-04 15:18:34 +02:00
Angus McLeod
4c784d98e6 Add not equals support to mapper 2023-05-03 11:01:54 +02:00
Angus McLeod
461e617453
Merge pull request #245 from paviliondev/log_spec_fix 2023-05-02 08:51:27 +02:00
merefield
8b443e0f08 bump patch 2023-05-01 21:52:10 +01:00
merefield
caab850127 FIX: failing log spec 2023-05-01 21:49:44 +01:00
Angus McLeod
32a8dcf19f Add cron schedule to Custom Wizard workflow 2023-04-28 16:15:48 +02:00
jumagura
06c812a720 FIX: Change input value in API endpoint 2023-04-17 12:23:45 -04:00
jumagura
15cc33b8cc DEV: Update admin acceptance test custom-fields, logs, submissions 2023-04-17 12:01:54 -04:00
jumagura
54ad75bafd Merge branch 'main' into admin-acceptance-tests 2023-04-17 11:56:31 -04:00
Robert
cff6796d7c
Change server meta URL temporarily for test scenario 2023-04-17 16:55:15 +01:00
jumagura
fcb6b2a359 DEV: Update standard subscription acceptance test 2023-04-17 11:53:45 -04:00
jumagura
51624ac819 DEV: Update unsubscribed acceptance test 2023-04-17 11:16:13 -04:00
Angus McLeod
2f6492c2ed
Merge pull request #243 from paviliondev/group_user_population_fix 2023-04-11 17:43:57 +08:00
merefield
93b574beb7 fix spelling 2023-04-11 10:00:42 +01:00
merefield
f7cdc77a06 fix spelling 2023-04-11 09:59:22 +01:00
merefield
37cef2ccc2 IMPROVE: warn in logs when at least one user in wizard did not exist 2023-04-11 09:54:37 +01:00
merefield
766cae92ba bump patch 2023-04-06 17:05:06 +01:00
merefield
6b2dd5a443 FIX: users not being added to group as part of create action 2023-04-06 17:04:01 +01:00
Angus McLeod
3d65ad032d Merge branch 'main' into field_type_subscription_ui 2023-04-03 15:08:16 +10:00
Angus McLeod
2423e9afb7 Bump version 2023-04-03 15:08:02 +10:00
Angus McLeod
4c8fd63d6f Bump version 2023-04-03 15:07:44 +10:00
Angus McLeod
f29f300a6f FIX: ensure scrollTop on step route transition 2023-04-03 15:07:25 +10:00
Angus McLeod
b035ab9168 Bump version 2023-04-03 12:39:14 +10:00
Angus McLeod
80405555b0 Merge branch 'main' into field_type_subscription_ui 2023-04-03 12:38:49 +10:00
Angus McLeod
454ed607b4
Merge pull request #241 from paviliondev/handle_admin_template_deprecations
Handle admin template deprecations
2023-04-03 10:38:29 +08:00
Angus McLeod
2114b80185 Add wizard-subscription-selector support to field type selection 2023-04-03 12:37:09 +10:00
Angus McLeod
81372b4d3b Update version 2023-04-03 12:29:45 +10:00
Angus McLeod
61ec6123d7 Handle admin template deprecations 2023-04-03 12:28:06 +10:00
Angus McLeod
4ceffb7d0f FIX: Apply char-counter fix to composer as well 2023-04-03 11:04:28 +10:00
jumagura
0f59c9092f Merge branch 'main' into admin-acceptance-tests 2023-03-30 21:22:44 -04:00
jumagura
0b70806b6b bump version 2023-03-30 21:20:18 -04:00
Angus McLeod
1705a2728f
Merge pull request #240 from paviliondev/field_focus_fix
FIX: autofocus is causing issues on long steps
2023-03-30 15:11:19 +08:00
Angus McLeod
6429bff31a
Merge branch 'main' into field_focus_fix 2023-03-30 12:23:31 +08:00
Angus McLeod
2d8b830962 Bump version 2023-03-30 12:22:20 +08:00
Angus McLeod
889caf3fa5 Bump version 2023-03-30 12:21:23 +08:00
Angus McLeod
d3e4b16610
Merge pull request #239 from paviliondev/character_counter_fix
COMPATIBILITY: Character counter is now a core component
2023-03-30 12:20:00 +08:00
Angus McLeod
5da7030c76 FIX: autofocus is causing issues on long steps 2023-03-30 12:19:00 +08:00
Angus McLeod
fa3e2d0c55 Update wizard-char-counter.js.es6 2023-03-30 12:09:00 +08:00
Angus McLeod
c4e2f2a4a8 Update plugin.rb 2023-03-30 12:02:20 +08:00
Angus McLeod
6bcc24eabc Namespace char-counter helper 2023-03-30 12:02:01 +08:00
Marcos
3fe42c4183
Merge pull request #237 from paviliondev/frontend_updates
Fix deprecations && invalid field handling
2023-03-29 08:32:54 -05:00
Marcos
af62ebb547
bump version 2023-03-29 09:13:28 -04:00
Marcos
978aaf89b0
Merge branch 'main' into frontend_updates 2023-03-29 08:10:51 -05:00
Marcos
82aae6d34a
Merge pull request #238 from paviliondev/incorrect_step_when_steps_are_added
Fix start step when step is added to previously used wizard
2023-03-22 11:51:36 -05:00
Angus McLeod
5ab4147a40 Template linting 2023-03-22 11:39:04 +01:00
Angus McLeod
3f0e1b21f0 Prettier fixes 2023-03-22 11:38:18 +01:00
Angus McLeod
e7e9c0e8f8 Bump version 2023-03-22 11:22:01 +01:00
Angus McLeod
8734cda00b Fix start step when step is added to previously used wizard 2023-03-22 11:20:30 +01:00
Angus McLeod
095cfe1eb6 Bump version 2023-03-22 10:12:19 +01:00
Angus McLeod
392b6f3d58 Fix deprecations && invalid field handling 2023-03-22 10:11:48 +01:00
Angus McLeod
e2797ced64 Bump version 2023-03-21 17:41:49 +01:00
Angus McLeod
8fdd21601b Strings are Objects in ruby 2023-03-21 17:41:05 +01:00
Richard Odekerken
759358e081
Merge pull request #236 from paviliondev/liquid_template_error_handling
Ensure we're not interpolating an object
2023-03-21 17:34:32 +01:00
Angus McLeod
076e1f4966 Bump version 2023-03-21 17:22:15 +01:00
Angus McLeod
a146d57f0e Ensure we're not interpolating an object 2023-03-21 17:20:58 +01:00
Angus McLeod
78f5af87e1
Merge pull request #235 from paviliondev/category_name_output_text_selection
Add output text selection to category name
2023-03-21 15:47:51 +01:00
Angus McLeod
83d3ca8eb3 Add output text selection to category name 2023-03-21 15:34:07 +01:00
jumagura
014219c038 DEV: Use helpers for api creation 2023-03-21 04:56:48 -04:00
jumagura
1254fcfb4e DEV: Add helper for wizard api 2023-03-21 04:48:46 -04:00
jumagura
2c52459f29 DEV: Update api creatipon wizard 2023-03-21 04:48:24 -04:00
jumagura
ebddcb5606 FIX: Update creation of wizard on business tier 2023-03-21 04:47:58 -04:00
jumagura
60d50afc54 FIX: Display no data when no API is selected 2023-03-21 02:19:03 -04:00
jumagura
99c2c2a461 FIX: Display empty API content when no data is selected 2023-03-21 00:53:49 -04:00
jumagura
0a5b7411aa bump version 2023-03-20 17:52:01 -04:00
jumagura
c6c4e31ba9 merge main 2023-03-20 17:50:27 -04:00
Angus McLeod
c6dc80f02c FIX: template guest validation not working with validation conditions 2023-03-17 09:05:53 +01:00
Robert
7d6456667a
Merge pull request #234 from paviliondev/fix_user_in_submissions_two
Ensure each submission wizard has the right user
2023-03-16 17:06:46 +00:00
Angus McLeod
33abececd4 Bump version 2023-03-16 17:44:24 +01:00
Angus McLeod
ef1a8d1457 Ensure each wizard has the right user 2023-03-16 17:44:10 +01:00
Robert
5eca78f172
Merge pull request #229 from paviliondev/fix_user_in_submissions
Ensure submission users are serialized properly
2023-03-16 11:37:11 +00:00
Robert
936efe5aff
Merge branch 'main' into fix_user_in_submissions 2023-03-16 11:28:47 +00:00
jumagura
0e5f0fc86d DEV:Bump version 2023-03-15 21:52:44 -04:00
jumagura
c375c1dcd9 DEV: Merge main 2023-03-15 21:43:32 -04:00
jumagura
9b8a3589bd merge main 2023-03-15 21:43:03 -04:00
Angus McLeod
345885bdbd
Merge pull request #231 from paviliondev/update_workflows
Move to standard plugin workflow
2023-03-15 14:13:37 +01:00
Angus McLeod
e6d7f3d9bc Update plugin.rb 2023-03-15 14:07:25 +01:00
Angus McLeod
59f00d6278 Move to standard plugin workflow 2023-03-15 14:06:55 +01:00
Richard Odekerken
c475ec65cd
Merge pull request #228 from paviliondev/composer_copy_paste
Move to new Uppy handling in discourse/discourse
2023-03-15 14:04:03 +01:00
Angus McLeod
a4e49e7bbc Ensure submission users are serialized properly 2023-03-15 13:33:07 +01:00
Angus McLeod
c0ed596ff9
Merge branch 'main' into composer_copy_paste 2023-03-15 10:48:18 +01:00
Angus McLeod
20e7b492ea FIX: use const instead of let for observedCache 2023-03-15 10:44:56 +01:00
Angus McLeod
52fe5166cd Fix linting 2023-03-15 10:38:26 +01:00
Angus McLeod
24ce4da6f2 Make linters happy 2023-03-15 10:30:24 +01:00
Angus McLeod
e489845daf Bump version 2023-03-15 10:28:51 +01:00
Angus McLeod
6a4063951e Move to new Uppy handling in discourse/discourse 2023-03-15 10:26:46 +01:00
Angus McLeod
0e70a5a221 FIX: add observed cache to undo changes mixin
Prevents observer add / remove race conditions which can cause exceptions.
2023-03-15 09:22:09 +01:00
Angus McLeod
030929a414
Merge pull request #227 from paviliondev/remove_in_wizard_subscription_conditional_logic_check
Remove subscription requirement for template field interpolation
2023-03-14 16:47:45 +01:00
Angus McLeod
3a5430c767 Bump version 2023-03-14 16:35:23 +01:00
Angus McLeod
091362cb00 Remove subscription requirement for field interpolation. 2023-03-14 16:34:58 +01:00
Robert
631b5fe44c
Merge pull request #225 from paviliondev/fix-composer-hyperlink
FIX: Use discourse hyperlink modal in composer instead of custom
2023-03-10 14:59:47 +00:00
Angus McLeod
c2c86b12c2
Merge pull request #226 from paviliondev/guest_permissions_user_access_fix 2023-03-10 15:49:31 +01:00
merefield
b73437299c IMPROVE: separate out new tests 2023-03-10 14:42:42 +00:00
jumagura
a84bf52542 DEV: Add front-end test for hyperlink modal in composer 2023-03-10 10:39:40 -04:00
merefield
148e188490 merge main and bump patch 2023-03-10 12:53:01 +00:00
merefield
a3b665434c Bump patch 2023-03-10 12:50:37 +00:00
merefield
9e59b73ebe Bump patch 2023-03-10 12:49:32 +00:00
merefield
092947f68b FIX: regular users can't access wizard with guest permissions 2023-03-10 12:43:37 +00:00
jumagura
320196b1f0 FIX: Use discourse hyperlink modal in composer instead of custom 2023-03-09 22:34:40 -04:00
Angus McLeod
e422867729 Merge branch 'main' into subscription_client_update 2023-03-09 09:07:59 +01:00
Angus McLeod
9bb01d29ab Fix prettier issue and bump version 2023-03-08 11:10:46 +01:00
Angus McLeod
0fc2c6b850 FIX: Ensure tag_groups is in wizard schema 2023-03-08 09:26:57 +01:00
Angus McLeod
762ddfa16e FIX: Ensure tag_groups is in wizard schema 2023-03-06 10:00:52 +01:00
Angus McLeod
ebea3e666a FIX: Client-side exception fixes 2023-03-02 10:36:06 +01:00
Angus McLeod
71277f8448
Merge branch 'main' into subscription_client_update 2023-02-27 09:27:27 +01:00
Angus McLeod
3e25f43ba0
Merge pull request #222 from xfalcox/main
FIX: (File|Dir).exists? is deprecated
2023-02-24 17:55:39 +01:00
Angus McLeod
7068dfd727 Bump version 2023-02-24 17:35:07 +01:00
Rafael dos Santos Silva
ce914c3f57
FIX: (File|Dir).exists? is deprecated 2023-02-24 12:13:51 -03:00
Angus McLeod
aef9ed24ae Change problematic Dir.exists? 2023-02-24 14:27:08 +01:00
Angus McLeod
da6e75faca Fix admin index 2023-02-24 14:17:00 +01:00
Angus McLeod
bc81ca89aa Update workflow 2023-02-23 21:23:38 +01:00
Angus McLeod
dfc23978ae Bump version 2023-02-23 19:25:52 +01:00
Angus McLeod
9eb5fc6ff6 Complete updates to handle subscription product slugs 2023-02-23 19:24:11 +01:00
Richard Odekerken
643c5ecff0
Merge pull request #219 from paviliondev/tag_group_restriction_fix
Tag group restriction fix
2023-02-10 18:13:22 +01:00
Richard Odekerken
75d429388e
Merge branch 'main' into tag_group_restriction_fix 2023-02-10 18:13:03 +01:00
Robert
f5d265846d
Merge pull request #216 from paviliondev/add_guest_support
Add guest support
2023-02-10 13:51:21 +00:00
Angus McLeod
e5d6a20532 Fix specs 2023-02-09 14:32:01 +01:00
Angus McLeod
e7ee89048a Guest wizards cannot use composer or upload 2023-02-09 14:18:25 +01:00
Angus McLeod
b2b93aad59 Ensure admin can access wizard multiple times 2023-02-09 13:10:55 +01:00
Angus McLeod
7c8f530c86 Update wizard.rb 2023-02-09 12:33:55 +01:00
Angus McLeod
75e262a526 Merge branch 'main' into add_guest_support 2023-02-08 14:00:51 +01:00
Robert
1e6a5c39b1
Merge pull request #220 from paviliondev/css_fix
FIX: compound selectors may no longer be extended
2023-02-08 12:42:31 +00:00
merefield
4171d81528 linting 2023-02-08 12:34:30 +00:00
Angus McLeod
edc94b6ea7 Restrict guest support to standard and business subscriptions
- Support mapped value subscription restrictions
- Restrict permitted guest value to standard and business
2023-02-08 13:32:24 +01:00
merefield
a038e72854 bump version 2023-02-08 12:31:27 +00:00
merefield
202f6ddc06 FIX: compound selectors may no longer be extended 2023-02-08 12:28:30 +00:00
Angus McLeod
e82c158c4a Bump version 2023-02-07 14:44:40 +01:00
Angus McLeod
a931caffc1 Remove request_store and use for_input 2023-02-07 14:43:39 +01:00
Angus McLeod
0cb76659e9 Update custom-wizard-admin.js.es6 2023-02-07 13:55:08 +01:00
Angus McLeod
7657149e6f Update custom-wizard-admin.js.es6 2023-02-07 13:53:20 +01:00
Angus McLeod
1eefd99c6a Minor fixes 2023-02-07 13:17:40 +01:00
Angus McLeod
8f8c6d50c6 move guest toggle to permitted attribute 2023-02-07 12:46:17 +01:00
Angus McLeod
735d43e1ee Add failing test 2023-02-06 17:31:42 +01:00
Angus McLeod
2c84f019bb Update subscription.rb 2023-02-02 14:30:54 +01:00
Angus McLeod
82d2eee414 Fix version 2023-01-26 11:31:04 +01:00
Angus McLeod
ebdc045236
Merge branch 'main' into add_guest_support 2023-01-26 11:29:09 +01:00
Angus McLeod
b712b26896 Update COPYRIGHT.txt 2023-01-26 11:27:40 +01:00
Angus McLeod
1b3551b13d Bump version 2023-01-26 11:27:16 +01:00
Angus McLeod
dfc1540d52 Fix tests and linting 2023-01-26 11:26:24 +01:00
Angus McLeod
7d2e876584 First working version 2023-01-18 19:53:36 +01:00
jumagura
e21c3fa296 DEV: Add a new api entry 2023-01-16 00:46:12 -04:00
jumagura
24a8b95e0b DEV: Add api acceptance test 2022-12-30 17:26:32 -04:00
jumagura
146fd30ab5 DEV: Check if all tabs are displayed according to the subscription plan 2022-12-30 08:49:38 -04:00
jumagura
e88e83dd80 DEV: Unkip test for debugged code 2022-12-29 17:02:19 -04:00
jumagura
57f591e488 DEV: Update tests enabled fields 2022-12-29 14:55:08 -04:00
jumagura
8103a3b9fa DEV: Bump version 2022-12-27 12:33:11 -04:00
jumagura
be3a479270 FIX: Show an empty submission list of no wizard is selected 2022-12-27 12:30:27 -04:00
jumagura
8f42268e88 FIX: Show empty log data when no wizard is selected 2022-12-27 12:28:58 -04:00
jumagura
082139cd97 MERGE: Main branch 2022-12-27 12:25:49 -04:00
Angus McLeod
c1007e78f5 WIP 2022-12-24 09:42:09 +01:00
jumagura
ded6dacd60 DEV: Remove unused admin acceptance tests 2022-12-22 00:21:29 -04:00
jumagura
2557d15a0c DEV: Add helper values for admin unsuscribed acceptance tests 2022-12-22 00:12:29 -04:00
jumagura
f0f27769fd DEV: Add helper values for admin standard acceptance tests 2022-12-22 00:11:57 -04:00
jumagura
828ded7c05 DEV: Add helper values for admin business acceptance tests 2022-12-21 23:59:03 -04:00
jumagura
d6b1655a37 DEV: Add helper values for admin submissions acceptance tests 2022-12-21 23:47:21 -04:00
jumagura
fbf7319c36 DEV: Add helper values for admin manager acceptance tests 2022-12-21 23:44:40 -04:00
jumagura
7c70e8ca75 DEV: Add helper values for admin log acceptance tests 2022-12-21 23:37:51 -04:00
jumagura
ac751b269e DEV: Remove unused import 2022-12-21 12:47:34 -04:00
jumagura
ff8294b8e9 DEV: Remove await settled in admin custom field acceptance tests 2022-12-21 12:47:05 -04:00
jumagura
ced9d768fb DEV: Change embedded response with helper values 2022-12-21 12:24:39 -04:00
jumagura
2a38aabdca DEV: Add helper values for admin acceptance tests 2022-12-21 12:23:52 -04:00
jumagura
28cf4421d4 DEV: Add manager test 2022-12-21 12:11:29 -04:00
jumagura
c866395495 DEV: Skip tests that freezes 2022-12-21 11:32:30 -04:00
jumagura
9a5328a7e9 DEV: Make test run 2022-12-21 11:30:31 -04:00
jumagura
28bb6f2886 DEV: Skip freezing acceptance test 2022-12-21 02:14:45 -04:00
jumagura
e67cf5001f FIX: Add settled to avoid render errors 2022-12-21 01:58:18 -04:00
jumagura
b7953fb882 DEV: Add settled to avoid rendering errors 2022-12-21 01:44:48 -04:00
jumagura
9583851501 DEV: Add settled to prevent rendering errors 2022-12-21 01:30:25 -04:00
jumagura
bd03d62da1 FIX: Add missing / for correct path in pretender server 2022-12-21 00:18:10 -04:00
jumagura
f54025677a DEV: Delete helper file 2022-12-20 23:57:31 -04:00
jumagura
0a03817237 DEV: Bump version 2022-12-20 23:57:04 -04:00
jumagura
039ba8f603 DEV: Create helper for pretender server response 2022-12-20 18:48:28 -04:00
jumagura
b05cbec277 DEV: Remove comments and unused code 2022-12-20 17:56:12 -04:00
jumagura
6026d67b12 DEV: Remove pause 2022-12-20 16:01:56 -04:00
jumagura
a6b6a2c025 DEV: Add admin business subscription acceptance test 2022-12-20 14:57:38 -04:00
jumagura
06366a1574 DEV: Change admin acceptance test 2022-12-20 14:57:15 -04:00
jumagura
8568a1d97f DEV: Remove repeated acceptance test 2022-12-20 13:27:00 -04:00
jumagura
786c5cd6fc DEV: Add subscribed admin test 2022-12-20 12:22:24 -04:00
jumagura
9df0fb97d5 DEV: Modify title for acceptance test 2022-12-20 12:22:01 -04:00
jumagura
0eaf7b7798 DEV: Rename wizard test file 2022-12-20 12:06:13 -04:00
jumagura
fab0095b1f DEV: Add tests to unsuscribed wizard admin 2022-12-20 12:05:27 -04:00
jumagura
953123fbf8 DEV: Add create wizard section in acceptance test 2022-12-20 01:01:32 -04:00
jumagura
23fafeaf05 Merge branch 'main' into admin-acceptance-tests 2022-12-19 11:51:41 -04:00
jumagura
230fe4a51f DEV: Add admin wizards acceptance test 2022-12-19 11:46:52 -04:00
jumagura
27186caafc DEV: Add admin manager acceptance test 2022-12-19 11:46:38 -04:00
jumagura
52d308e7b4 DEV: Add unselecting dropdown element in admin acceptance test 2022-12-13 09:23:21 -04:00
jumagura
09e56499ca DEV: Remove unused code from admin log acceptance test 2022-12-13 09:22:02 -04:00
jumagura
71b6a184ca DEV: Add admin logs acceptance test 2022-12-13 08:58:35 -04:00
jumagura
0f9fa5fe94 DEV: Add admin custom fields acceptance test 2022-12-13 04:27:41 -04:00
jumagura
cc37043195 DEV: Add admin submission acceptance test 2022-12-13 04:19:02 -04:00
197 geänderte Dateien mit 8314 neuen und 2841 gelöschten Zeilen

Datei anzeigen

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

13
.github/workflows/discourse-plugin.yml gevendort Normale Datei
Datei anzeigen

@ -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

Datei anzeigen

@ -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 .

Datei anzeigen

@ -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

Datei anzeigen

@ -1,4 +1,4 @@
All code in this repository is Copyright 2018 by Angus McLeod. All code in this repository is Copyright 2023 by Angus McLeod.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -22,7 +22,12 @@ class CustomWizard::AdminSubmissionsController < CustomWizard::AdminController
end end
def download 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", filename: "#{Discourse.current_hostname}-wizard-submissions-#{@wizard.name}.json",
content_type: "application/json", content_type: "application/json",
disposition: "attachment" disposition: "attachment"

Datei anzeigen

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class CustomWizard::StepsController < ::ApplicationController class CustomWizard::StepsController < ::CustomWizard::WizardClientController
before_action :ensure_logged_in
before_action :ensure_can_update before_action :ensure_can_update
def update def update
@ -22,7 +21,7 @@ class CustomWizard::StepsController < ::ApplicationController
if updater.success? if updater.success?
wizard_id = update_params[:wizard_id] wizard_id = update_params[:wizard_id]
builder = CustomWizard::Builder.new(wizard_id, current_user) builder = CustomWizard::Builder.new(wizard_id, current_user, guest_id)
@wizard = builder.build(force: true) @wizard = builder.build(force: true)
current_step = @wizard.find_step(update[:step_id]) current_step = @wizard.find_step(update[:step_id])
@ -85,7 +84,6 @@ class CustomWizard::StepsController < ::ApplicationController
private private
def ensure_can_update def ensure_can_update
@builder = CustomWizard::Builder.new(update_params[:wizard_id], current_user)
raise Discourse::InvalidParameters.new(:wizard_id) if @builder.template.nil? raise Discourse::InvalidParameters.new(:wizard_id) if @builder.template.nil?
raise Discourse::InvalidAccess.new if !@builder.wizard || !@builder.wizard.can_access? raise Discourse::InvalidAccess.new if !@builder.wizard || !@builder.wizard.can_access?

Datei anzeigen

@ -1,8 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
class CustomWizard::WizardController < ::ApplicationController class CustomWizard::WizardController < ::CustomWizard::WizardClientController
before_action :ensure_plugin_enabled
before_action :ensure_logged_in, only: [:skip]
def show def show
if wizard.present? if wizard.present?
render json: CustomWizard::WizardSerializer.new(wizard, scope: guardian, root: false).as_json, status: 200 render json: CustomWizard::WizardSerializer.new(wizard, scope: guardian, root: false).as_json, status: 200
@ -35,19 +32,8 @@ class CustomWizard::WizardController < ::ApplicationController
def wizard def wizard
@wizard ||= begin @wizard ||= begin
builder = CustomWizard::Builder.new(params[:wizard_id].underscore, current_user) return nil unless @builder.present?
return nil unless builder.present? @builder.build({ reset: params[:reset] }, params)
opts = {}
opts[:reset] = params[:reset]
builder.build(opts, params)
end
end
private
def ensure_plugin_enabled
unless SiteSetting.custom_wizard_enabled
redirect_to path("/")
end end
end end
end end

Datei anzeigen

@ -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

Datei anzeigen

@ -2,12 +2,15 @@
class CustomWizard::SubmissionSerializer < ApplicationSerializer class CustomWizard::SubmissionSerializer < ApplicationSerializer
attributes :id, attributes :id,
:fields, :fields,
:submitted_at :submitted_at,
:user
has_one :user, serializer: ::BasicUserSerializer, embed: :objects
def include_user? def include_user?
object.user.present? object.wizard.user.present?
end
def user
::BasicUserSerializer.new(object.wizard.user, root: false).as_json
end end
def fields def fields

Datei anzeigen

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

Datei anzeigen

@ -12,14 +12,18 @@ import { alias } from "@ember/object/computed";
import Site from "discourse/models/site"; import Site from "discourse/models/site";
import { uploadIcon } from "discourse/lib/uploads"; import { uploadIcon } from "discourse/lib/uploads";
import { dasherize } from "@ember/string"; import { dasherize } from "@ember/string";
import 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({ export default ComposerEditor.extend({
modal: service(),
classNameBindings: ["fieldClass"], classNameBindings: ["fieldClass"],
allowUpload: true, allowUpload: true,
showLink: false, showLink: false,
showHyperlinkBox: false,
topic: null, topic: null,
showToolbar: true, showToolbar: true,
focusTarget: "reply", focusTarget: "reply",
@ -29,6 +33,7 @@ export default ComposerEditor.extend({
draftStatus: "null", draftStatus: "null",
replyPlaceholder: alias("field.translatedPlaceholder"), replyPlaceholder: alias("field.translatedPlaceholder"),
wizardEventFieldId: null, wizardEventFieldId: null,
composerEventPrefix: "wizard-editor",
@on("didInsertElement") @on("didInsertElement")
_composerEditorInit() { _composerEditorInit() {
@ -77,24 +82,13 @@ export default ComposerEditor.extend({
$input.on("scroll", this._throttledSyncEditorAndPreviewScroll); $input.on("scroll", this._throttledSyncEditorAndPreviewScroll);
this._bindUploadTarget(); this._bindUploadTarget();
const wizardEventNames = ["insert-text", "replace-text"]; const field = this.field;
const eventPrefix = this.eventPrefix; this.editorInputClass = `.${dasherize(field.type)}-${dasherize(
this.appEvents.reopen({ field.id
trigger(name, ...args) { )} .d-editor-input`;
let eventParts = name.split(":");
let currentEventPrefix = eventParts[0];
let currentEventName = eventParts[1];
if ( this._uppyInstance.on("file-added", () => {
currentEventPrefix !== "wizard-editor" && this.session.set("wizardEventFieldId", field.id);
wizardEventNames.some((wen) => wen === currentEventName)
) {
let wizardEventName = name.replace(eventPrefix, "wizard-editor");
return this._super(wizardEventName, ...args);
} else {
return this._super(name, ...args);
}
},
}); });
}, },
@ -116,12 +110,6 @@ export default ComposerEditor.extend({
return uploadIcon(false, this.siteSettings); return uploadIcon(false, this.siteSettings);
}, },
click(e) {
if ($(e.target).hasClass("wizard-composer-hyperlink")) {
this.set("showHyperlinkBox", false);
}
},
@bind @bind
_handleImageDeleteButtonClick(event) { _handleImageDeleteButtonClick(event) {
if (!event.target.classList.contains("delete-image-button")) { if (!event.target.classList.contains("delete-image-button")) {
@ -132,9 +120,8 @@ export default ComposerEditor.extend({
event.target.closest(".button-wrapper").dataset.imageIndex, event.target.closest(".button-wrapper").dataset.imageIndex,
10 10
); );
const matchingPlaceholder = this.get("composer.reply").match( const matchingPlaceholder =
IMAGE_MARKDOWN_REGEX this.get("composer.reply").match(IMAGE_MARKDOWN_REGEX);
);
this.session.set("wizardEventFieldId", this.field.id); this.session.set("wizardEventFieldId", this.field.id);
this.appEvents.trigger( this.appEvents.trigger(
@ -165,7 +152,7 @@ export default ComposerEditor.extend({
shortcut: "K", shortcut: "K",
trimLeading: true, trimLeading: true,
unshift: true, unshift: true,
sendAction: () => component.set("showHyperlinkBox", true), sendAction: (event) => component.send("showLinkModal", event),
}); });
if (this.siteSettings.mentionables_enabled) { if (this.siteSettings.mentionables_enabled) {
@ -206,17 +193,16 @@ export default ComposerEditor.extend({
this._super(...arguments); this._super(...arguments);
}, },
addLink(linkName, linkUrl) { showLinkModal(toolbarEvent) {
let link = `[${linkName}](${linkUrl})`; let linkText = "";
this.appEvents.trigger("wizard-editor:insert-text", { this._lastSel = toolbarEvent.selected;
fieldId: this.field.id,
text: link,
});
this.set("showHyperlinkBox", false);
},
hideBox() { if (this._lastSel) {
this.set("showHyperlinkBox", false); linkText = this._lastSel.value;
}
this.modal.show(InsertHyperlink, {
model: { linkText, toolbarEvent },
});
}, },
showUploadModal() { showUploadModal() {

Datei anzeigen

@ -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();
},
},
});

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -4,7 +4,10 @@ export default TagChooser.extend({
searchTags(url, data, callback) { searchTags(url, data, callback) {
if (this.tagGroups) { if (this.tagGroups) {
let tagGroupsString = this.tagGroups.join(","); let tagGroupsString = this.tagGroups.join(",");
data.tag_groups = tagGroupsString; data.filterForInput = {
name: "custom-wizard-tag-chooser",
groups: tagGroupsString,
};
} }
return this._super(url, data, callback); return this._super(url, data, callback);

Datei anzeigen

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

Datei anzeigen

@ -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>

Datei anzeigen

@ -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();
}
}

Datei anzeigen

@ -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>

Datei anzeigen

@ -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;
}
}

Datei anzeigen

@ -15,6 +15,7 @@ import {
import Component from "@ember/component"; import Component from "@ember/component";
import { bind, later } from "@ember/runloop"; import { bind, later } from "@ember/runloop";
import I18n from "I18n"; import I18n from "I18n";
import Subscription from "../mixins/subscription";
const customFieldActionMap = { const customFieldActionMap = {
topic: ["create_topic", "send_message"], topic: ["create_topic", "send_message"],
@ -26,7 +27,7 @@ const customFieldActionMap = {
const values = ["present", "true", "false"]; const values = ["present", "true", "false"];
export default Component.extend({ export default Component.extend(Subscription, {
classNameBindings: [":mapper-selector", "activeType"], classNameBindings: [":mapper-selector", "activeType"],
showText: computed("activeType", function () { showText: computed("activeType", function () {
@ -116,6 +117,9 @@ export default Component.extend({
groupEnabled: computed("options.groupSelection", "inputType", function () { groupEnabled: computed("options.groupSelection", "inputType", function () {
return this.optionEnabled("groupSelection"); return this.optionEnabled("groupSelection");
}), }),
guestGroup: computed("options.guestGroup", "inputType", function () {
return this.optionEnabled("guestGroup");
}),
userEnabled: computed("options.userSelection", "inputType", function () { userEnabled: computed("options.userSelection", "inputType", function () {
return this.optionEnabled("userSelection"); return this.optionEnabled("userSelection");
}), }),
@ -126,7 +130,29 @@ export default Component.extend({
return this.connector === "is"; return this.connector === "is";
}), }),
groups: alias("site.groups"), @discourseComputed("site.groups", "guestGroup", "subscriptionType")
groups(groups, guestGroup, subscriptionType) {
let result = groups;
if (!guestGroup) {
return result;
}
if (["standard", "business"].includes(subscriptionType)) {
let guestIndex;
result.forEach((r, index) => {
if (r.id === 0) {
r.name = I18n.t("admin.wizard.selector.label.users");
guestIndex = index;
}
});
result.splice(guestIndex, 0, {
id: -1,
name: I18n.t("admin.wizard.selector.label.guests"),
});
}
return result;
},
categories: alias("site.categories"), categories: alias("site.categories"),
showComboBox: or( showComboBox: or(
"showWizardField", "showWizardField",

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -1,6 +1,6 @@
import SingleSelectComponent from "select-kit/components/single-select"; import SingleSelectComponent from "select-kit/components/single-select";
import Subscription from "../mixins/subscription"; import Subscription from "../mixins/subscription";
import wizardSchema from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema"; import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
import discourseComputed from "discourse-common/utils/decorators"; import discourseComputed from "discourse-common/utils/decorators";
import I18n from "I18n"; import I18n from "I18n";
@ -40,9 +40,9 @@ export default SingleSelectComponent.extend(Subscription, {
return allowedTypes; return allowedTypes;
}, },
@discourseComputed("feature", "attribute") @discourseComputed("feature", "attribute", "wizard.allowGuests")
content(feature, attribute) { content(feature, attribute) {
return wizardSchema[feature][attribute] return filterValues(this.wizard, feature, attribute)
.map((value) => { .map((value) => {
let allowedSubscriptionTypes = this.allowedSubscriptionTypes( let allowedSubscriptionTypes = this.allowedSubscriptionTypes(
feature, feature,

Datei anzeigen

@ -4,4 +4,4 @@
{{#if wizardErrorNotice}} {{#if wizardErrorNotice}}
{{d-icon "exclaimation-circle"}} {{d-icon "exclaimation-circle"}}
{{/if}} {{/if}}
{{/if}} {{/if}}

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -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")();
},
},
});

Datei anzeigen

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

Datei anzeigen

@ -3,15 +3,18 @@ import {
observes, observes,
} from "discourse-common/utils/decorators"; } from "discourse-common/utils/decorators";
import { notEmpty } from "@ember/object/computed"; 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 { generateId, wizardFieldList } from "../lib/wizard";
import { dasherize } from "@ember/string"; import { dasherize } from "@ember/string";
import { later, scheduleOnce } from "@ember/runloop"; import { later, scheduleOnce } from "@ember/runloop";
import Controller from "@ember/controller"; import Controller from "@ember/controller";
import copyText from "discourse/lib/copy-text"; import copyText from "discourse/lib/copy-text";
import I18n from "I18n"; import I18n from "I18n";
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
export default Controller.extend({ export default Controller.extend({
modal: service(),
hasName: notEmpty("wizard.name"), hasName: notEmpty("wizard.name"),
@observes("currentStep") @observes("currentStep")
@ -59,6 +62,19 @@ export default Controller.extend({
} }
return wizardFieldList(steps); return wizardFieldList(steps);
}, },
@discourseComputed("fieldTypes", "wizard.allowGuests")
filteredFieldTypes(fieldTypes) {
const fieldTypeIds = fieldTypes.map((f) => f.id);
const allowedTypeIds = filterValues(
this.wizard,
"field",
"type",
fieldTypeIds
);
return fieldTypes.filter((f) => allowedTypeIds.includes(f.id));
},
getErrorMessage(result) { getErrorMessage(result) {
if (result.backend_validation_error) { if (result.backend_validation_error) {
return result.backend_validation_error; return result.backend_validation_error;
@ -112,15 +128,13 @@ export default Controller.extend({
}, },
setNextSessionScheduled() { setNextSessionScheduled() {
let controller = showModal("next-session-scheduled", { this.modal.show(NextSessionScheduledModal, {
model: { model: {
dateTime: this.wizard.after_time_scheduled, dateTime: this.wizard.after_time_scheduled,
update: (dateTime) => update: (dateTime) =>
this.set("wizard.after_time_scheduled", dateTime), this.set("wizard.after_time_scheduled", dateTime),
}, },
}); });
controller.setup();
}, },
copyUrl() { copyUrl() {

Datei anzeigen

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

Datei anzeigen

@ -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);
},
},
});

Datei anzeigen

@ -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);
});

Datei anzeigen

@ -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);
}
);

Datei anzeigen

@ -69,7 +69,10 @@ export default {
}, },
_wizardInsertText(text, options) { _wizardInsertText(text, options) {
if (this.session.wizardEventFieldId === this.fieldId && this.element) { if (
this.session.wizardEventFieldId === this.fieldId &&
this.element
) {
this.insertText(text, options); 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;
});
},
});
}); });
}, },
}; };

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -72,6 +72,7 @@ const field = {
required: null, required: null,
type: null, type: null,
condition: null, condition: null,
tag_groups: null,
}, },
types: {}, types: {},
mapped: ["prefill", "content", "condition", "index"], mapped: ["prefill", "content", "condition", "index"],
@ -210,11 +211,42 @@ const action = {
objectArrays: {}, objectArrays: {},
}; };
const filters = {
allow_guests: {
field: {
type: [
"text",
"textarea",
"text_only",
"date",
"time",
"date_time",
"number",
"checkbox",
"url",
"dropdown",
"tag",
"category",
"group",
"user_selector",
],
},
action: {
type: ["route_to", "send_message"],
},
},
};
const custom_field = { const custom_field = {
klass: ["topic", "post", "group", "category"], klass: ["topic", "post", "group", "category"],
type: ["string", "boolean", "integer", "json"], type: ["string", "boolean", "integer", "json"],
}; };
export function buildFieldTypes(types) {
wizardSchema.field.types = types;
wizardSchema.field.type = Object.keys(types);
}
field.type = Object.keys(field.types); field.type = Object.keys(field.types);
action.type = Object.keys(action.types); action.type = Object.keys(action.types);
@ -224,16 +256,29 @@ const wizardSchema = {
field, field,
custom_field, custom_field,
action, action,
filters,
}; };
export function buildFieldTypes(types) {
wizardSchema.field.types = types;
}
export function buildFieldValidations(validations) { export function buildFieldValidations(validations) {
wizardSchema.field.validations = validations; wizardSchema.field.validations = validations;
} }
export function filterValues(currentWizard, feature, attribute, values = null) {
values = values || wizardSchema[feature][attribute];
if (currentWizard && currentWizard.allowGuests) {
const filteredFeature = wizardSchema.filters.allow_guests[feature];
if (filteredFeature) {
const filtered = filteredFeature[attribute];
if (filtered) {
values = values.filter((v) => filtered.includes(v));
}
}
}
return values;
}
const siteSettings = getOwner(this).lookup("service:site-settings"); const siteSettings = getOwner(this).lookup("service:site-settings");
if (siteSettings.wizard_apis_enabled) { if (siteSettings.wizard_apis_enabled) {
wizardSchema.action.types.send_to_api = { wizardSchema.action.types.send_to_api = {

Datei anzeigen

@ -4,6 +4,8 @@ import { get, set } from "@ember/object";
import Mixin from "@ember/object/mixin"; import Mixin from "@ember/object/mixin";
import { deepEqual } from "discourse-common/lib/object"; import { deepEqual } from "discourse-common/lib/object";
const observedCache = [];
export default Mixin.create({ export default Mixin.create({
didInsertElement() { didInsertElement() {
this._super(...arguments); this._super(...arguments);
@ -32,7 +34,13 @@ export default Mixin.create({
}; };
listProperties(componentType, opts).forEach((property) => { listProperties(componentType, opts).forEach((property) => {
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) => { listProperties(componentType, opts).forEach((property) => {
if (observedCache.indexOf(property) === -1) {
observedCache.push(property);
}
obj.addObserver(property, this, this.toggleUndo); obj.addObserver(property, this, this.toggleUndo);
}); });
}, },

Datei anzeigen

@ -5,8 +5,20 @@ import wizardSchema from "../lib/wizard-schema";
import { Promise } from "rsvp"; import { Promise } from "rsvp";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import discourseComputed from "discourse-common/utils/decorators";
const GUEST_GROUP_ID = -1;
const CustomWizardAdmin = EmberObject.extend({ const CustomWizardAdmin = EmberObject.extend({
@discourseComputed("permitted.@each.output")
allowGuests(permitted) {
return (
permitted &&
permitted.filter((p) => p.output && p.output.includes(GUEST_GROUP_ID))
.length
);
},
save(opts) { save(opts) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let wizard = this.buildJson(this, "wizard"); let wizard = this.buildJson(this, "wizard");

Datei anzeigen

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

Datei anzeigen

@ -1,7 +1,10 @@
import CustomWizardApi from "../models/custom-wizard-api"; import CustomWizardApi from "../models/custom-wizard-api";
import DiscourseRoute from "discourse/routes/discourse"; import DiscourseRoute from "discourse/routes/discourse";
import { inject as service } from "@ember/service";
export default DiscourseRoute.extend({ export default DiscourseRoute.extend({
router: service(),
model(params) { model(params) {
if (params.name === "create") { if (params.name === "create") {
return CustomWizardApi.create({ isNew: true }); 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) { setupController(controller, model) {
controller.set("api", model); controller.set("api", model);
}, },

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -1,17 +1,14 @@
import { getCachedWizard } from "../models/custom-wizard"; import { getCachedWizard } from "../models/custom-wizard";
import Route from "@ember/routing/route"; import Route from "@ember/routing/route";
import { inject as service } from "@ember/service";
export default Route.extend({ export default Route.extend({
router: service(),
beforeModel() { beforeModel() {
const wizard = getCachedWizard(); const wizard = getCachedWizard();
if ( if (wizard && wizard.permitted && !wizard.completed && wizard.start) {
wizard && this.router.replaceWith("customWizardStep", wizard.start);
wizard.user &&
wizard.permitted &&
!wizard.completed &&
wizard.start
) {
this.replaceWith("customWizardStep", wizard.start);
} }
}, },
@ -26,7 +23,7 @@ export default Route.extend({
const wizardId = model.get("id"); const wizardId = model.get("id");
const user = model.get("user"); const user = model.get("user");
const name = model.get("name"); const name = model.get("name");
const requiresLogin = !user; const requiresLogin = !user && !permitted;
const notPermitted = !permitted; const notPermitted = !permitted;
const props = { const props = {

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -9,7 +9,8 @@
label="refresh" label="refresh"
icon="sync" icon="sync"
action=(action "refresh") action=(action "refresh")
class="refresh"}} class="refresh"
}}
</div> </div>
</div> </div>
@ -31,7 +32,10 @@
{{#each logs as |log|}} {{#each logs as |log|}}
<tr> <tr>
{{#each-in log as |field value|}} {{#each-in log as |field value|}}
<td class="small">{{wizard-table-field field=field value=value}}</td> <td class="small">{{wizard-table-field
field=field
value=value
}}</td>
{{/each-in}} {{/each-in}}
</tr> </tr>
{{/each}} {{/each}}
@ -42,4 +46,4 @@
{{conditional-loading-spinner condition=refreshing}} {{conditional-loading-spinner condition=refreshing}}
{{/load-more}} {{/load-more}}
</div> </div>
{{/if}} {{/if}}

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -58,4 +58,4 @@
{{conditional-loading-spinner condition=loadingMore}} {{conditional-loading-spinner condition=loadingMore}}
{{/load-more}} {{/load-more}}
</div> </div>
{{/if}} {{/if}}

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -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>

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -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}}
/>

Datei anzeigen

@ -2,4 +2,4 @@
<div class="d-editor-preview"> <div class="d-editor-preview">
{{html-safe field.preview_template}} {{html-safe field.preview_template}}
</div> </div>
</div> </div>

Datei anzeigen

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

Datei anzeigen

@ -2,4 +2,4 @@
date=dateTime date=dateTime
onChange=(action "onChange") onChange=(action "onChange")
tabindex=field.tabindex tabindex=field.tabindex
}} }}

Datei anzeigen

@ -3,4 +3,4 @@
onChange=(action "onChange") onChange=(action "onChange")
tabindex=field.tabindex tabindex=field.tabindex
format=field.format format=field.format
}} }}

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -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}}
/>

Datei anzeigen

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

Datei anzeigen

@ -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}}
/>

Datei anzeigen

@ -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}}
/>

Datei anzeigen

@ -2,4 +2,4 @@
date=time date=time
onChange=(action "onChange") onChange=(action "onChange")
tabindex=field.tabindex tabindex=field.tabindex
}} }}

Datei anzeigen

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

Datei anzeigen

@ -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}}
/>

Datei anzeigen

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

Datei anzeigen

@ -1,29 +1,38 @@
<label for={{field.id}} class="field-label"> <label for={{field.id}} class="field-label">
{{html-safe field.translatedLabel}} {{html-safe field.translatedLabel}}
</label> </label>
{{#if field.image}} {{#if field.image}}
<div class="field-image"><img src={{field.image}}></div> <div class="field-image"><img src={{field.image}} /></div>
{{/if}} {{/if}}
{{#if field.description}} {{#if field.description}}
<div class="field-description">{{cookedDescription}}</div> <div class="field-description">{{cookedDescription}}</div>
{{/if}} {{/if}}
{{#field-validators field=field as |validators|}} {{#field-validators field=field as |validators|}}
{{#if inputComponentName}} {{#if inputComponentName}}
<div class="input-area"> <div class="input-area">
{{component inputComponentName field=field step=step fieldClass=fieldClass wizard=wizard autocomplete=validators.autocomplete}} {{component
</div> inputComponentName
{{/if}} field=field
{{/field-validators}} step=step
fieldClass=fieldClass
{{#if field.char_counter}} wizard=wizard
{{#if textType}} autocomplete=validators.autocomplete
{{char-counter field.value field.max_length}} }}
{{/if}} </div>
{{/if}} {{/if}}
{{/field-validators}}
{{#if field.errorDescription}}
<div class="field-error-description">{{html-safe field.errorDescription}}</div> {{#if field.char_counter}}
{{/if}} {{#if textType}}
{{wizard-char-counter field.value field.max_length}}
{{/if}}
{{/if}}
{{#if field.errorDescription}}
<div class="field-error-description">{{html-safe
field.errorDescription
}}</div>
{{/if}}

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -1,11 +1,11 @@
{{#if showTopics}} {{#if showTopics}}
<ul> <ul>
{{#each topics as |topic|}} {{#each topics as |topic|}}
<li>{{custom-wizard-similar-topic topic=topic}}</li> <li>{{custom-wizard-similar-topic topic=topic}}</li>
{{/each}} {{/each}}
</ul> </ul>
{{else}} {{else}}
<a role="button" class="show-topics" {{action "toggleShowTopics"}}> <a role="button" class="show-topics" {{action "toggleShowTopics"}}>
{{i18n "realtime_validations.similar_topics.show"}} {{i18n "realtime_validations.similar_topics.show"}}
</a> </a>
{{/if}} {{/if}}

Datei anzeigen

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

Datei anzeigen

@ -10,4 +10,4 @@
autoInsertNoneItem=false autoInsertNoneItem=false
translatedFilterPlaceholder="--:--" translatedFilterPlaceholder="--:--"
) )
}} }}

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