1
0
Fork 0

Commits vergleichen

...

1940 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
Marcos
794a8efdec
Merge pull request #215 from paviliondev/add_watch_tags_action
Add watch tags action
2022-12-23 14:16:36 -04:00
Angus McLeod
19ff97f0b4 Bump version 2022-12-23 17:28:29 +01:00
Angus McLeod
34ff9e4136 Add watch_tags action 2022-12-23 17:28: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
Marcos
17fe4d732a
Merge pull request #213 from paviliondev/interpolate_user_avatar
Add avatar interpolation support
2022-12-13 12:05:03 -04:00
Angus McLeod
4fbcc9b849 Update mapper_spec.rb 2022-12-13 15:56:20 +01:00
Angus McLeod
528585db45 Ensure that we're mapping an array 2022-12-13 15:21:56 +01: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
Angus McLeod
621360df58 Update wizard-text-editor.js.es6 2022-12-12 13:24:12 +01:00
Angus McLeod
6a6b44a469 Version bump 2022-12-12 13:21:26 +01:00
Angus McLeod
405a4e3ffa Add avatar interpolation support 2022-12-12 13:19:04 +01:00
Angus McLeod
93ea792972
Update SECURITY.md 2022-12-07 10:55:02 +01:00
Angus McLeod
2828ee9c06
Update SECURITY.md 2022-12-07 10:54:44 +01:00
Angus McLeod
ecbbd5e1ee
Update SECURITY.md 2022-12-07 10:53:01 +01:00
Angus McLeod
d0d2921c17
Create SECURITY.md 2022-12-07 10:52:12 +01:00
Angus McLeod
971b41e15a
Merge pull request #211 from sindbach/fix_preview_url_paths
Patch for wizard URL path to take account of subdirectory base URL.
2022-11-18 16:10:06 +00:00
Wan Bachtiar
5b923f3340 Removed conditional statement that would always be true 2022-11-17 08:59:53 +11:00
Wan Bachtiar
d6ee1501d1 prettier 2022-11-11 20:43:57 +11:00
Wan Bachtiar
d68cd4a9fb Bump version 2022-11-11 16:36:18 +11:00
Wan Bachtiar
9064b2fcbb Patch for wizard URL path to take account of Discourse with subdirectory base URL. 2022-11-11 15:56:07 +11:00
Marcos
6f13f0e4bf
Merge pull request #209 from paviliondev/composer-mobile-upload
Allow upload button in wizard composer when in mobile view
2022-11-08 07:31:42 -04:00
Angus McLeod
e50ce9e5c0 Update plugin.rb 2022-11-07 15:05:13 +01:00
Angus McLeod
28e007536a IMPROVE: Allow upload button on mobile 2022-11-07 15:04:30 +01:00
Angus McLeod
54e6af52e9 Update quit text on first step 2022-11-07 14:43:46 +01:00
Marcos
5e3b0f6d2a
Merge pull request #207 from paviliondev/add_tag_creation_to_tag_field
FEATURE: add can_create_tag
2022-11-04 16:54:04 -04:00
Marcos
e4de96ed03
Merge branch 'main' into add_tag_creation_to_tag_field 2022-11-04 16:18:21 -04:00
Angus McLeod
da7153fe34 Add subscription check for API features 2022-11-01 13:38:56 +01:00
Angus McLeod
f76ae370b0 Update plugin version 2022-10-26 10:08:14 +02:00
Angus McLeod
345bb310e8 FEATURE: add can_create_tag 2022-10-26 10:04:50 +02:00
Angus McLeod
12cd8ac201 FIX: straighten-out wizard-level subscription features 2022-10-26 09:40:02 +02:00
Angus McLeod
b49e878458 Add ruby to gemfile.lock platforms and update gitignore 2022-10-20 09:30:24 +02:00
Angus McLeod
bf711a910d Update plugin.rb 2022-10-19 19:09:33 +02:00
Angus McLeod
1904001098 Add lefthook 2022-10-19 18:13:03 +02:00
Angus McLeod
92b02ed7d9 FIX: link index assignment edge cases 2022-10-19 18:07:19 +02:00
Angus McLeod
02255491d0 FIX: avatar link in wizard submissions was broken 2022-10-14 09:19:02 +02:00
Angus McLeod
4ab7c77257 FIX: fix wizard index creation 2022-10-12 10:57:40 +02:00
Angus McLeod
b2a5558de1 Version bump 2022-10-12 09:30:07 +02:00
Angus McLeod
71acc4577d FIX: indexes should not require a subscription 2022-10-12 09:28:31 +02:00
Angus McLeod
0b4c154456 Version bump 2022-10-10 14:05:08 +02:00
Angus McLeod
1dfe93ee24 Add explicit locations plugin support 2022-10-10 14:04:55 +02:00
Angus McLeod
359b165743 Bump version 2022-10-05 17:35:54 +02:00
Angus McLeod
eaf0b5f7ba Update submission_spec.rb 2022-10-05 17:29:21 +02:00
Angus McLeod
94e1d4988d Fix linting 2022-10-05 17:20:25 +02:00
Angus McLeod
1f077ce22b Bump version 2022-10-05 17:14:50 +02:00
Angus McLeod
c2e759b1c5 FIX: pagination and submitted_at ordering of submissions 2022-10-05 17:14:43 +02:00
Angus McLeod
60abb6981e FIX: re-add logic incorrectly removed submissions logic during merge 2022-09-28 14:26:27 +02:00
Angus McLeod
072a3ea142 FIX: remove incorrectly merged code 2022-09-23 18:09:49 +02:00
Angus McLeod
e38b54351f
Merge pull request #204 from paviliondev/pro-release
Custom Wizard 2.0
2022-09-23 17:47:48 +02:00
Angus McLeod
3bacb09f82 Acknowledge Kailtlin as an author 2022-09-23 17:30:55 +02:00
Angus McLeod
8f7fae0e7c Remove beta tag 2022-09-23 17:27:11 +02:00
Angus McLeod
919ac702af Merge branch 'main' into pro-release 2022-09-23 17:25:34 +02:00
Angus McLeod
61e80779ce
Merge pull request #203 from paviliondev/update_events_integration
Add automatic events plugin integration
2022-09-23 17:22:06 +02:00
Angus McLeod
ebd382cca4 Fix linting 2022-09-23 17:06:16 +02:00
Angus McLeod
12e5bef372 Add spec for action callbacks 2022-09-23 17:00:41 +02:00
Angus McLeod
aa288b19e2 Move action callbacks to action class 2022-09-23 16:52:55 +02:00
Angus McLeod
26749bd055 Add asset requiring for backwards compatibility 2022-09-23 16:23:41 +02:00
Angus McLeod
8083f44389 Bump version 2022-09-23 15:58:39 +02:00
Angus McLeod
a3db405d93 Apply prettier 2022-09-23 15:54:43 +02:00
Angus McLeod
c79dee3d16 Add community subscription as an explicit type 2022-09-23 15:52:05 +02:00
Angus McLeod
785bd5d956 Merge branch 'main' into pro-release 2022-09-22 08:20:44 +02:00
Angus McLeod
0be2b98030 Update plugin documentation domain 2022-09-20 11:16:43 +02:00
Angus McLeod
bfd4e30d36 Add automatic integration 2022-09-19 12:09:34 +02:00
Angus McLeod
b2714b524c Bump version 2022-09-02 10:01:21 +02:00
Angus McLeod
e5904846cf FIX: registered topic field names not being cast properly in actions 2022-09-02 09:45:20 +02:00
Angus McLeod
47a1a3d730 Make prettier happy 2022-08-29 11:58:42 +02:00
Angus McLeod
66808dba08 Update documentation references 2022-08-29 11:38:35 +02:00
Angus McLeod
f8d5e9296d COMPATIBILITY: previewUpdated now receives a DOM node 2022-08-25 09:49:32 +02:00
Angus McLeod
1f67f2ed4f
Merge pull request #179 from paviliondev/translations_main
I18n: Update translations
2022-08-25 08:33:51 +02:00
Keegan George
8af3fde41c New translations server.en.yml (German) 2022-08-24 08:43:03 -07:00
Keegan George
76de5e60c1 New translations client.en.yml (German) 2022-08-24 08:43:02 -07:00
Angus McLeod
b35781927f DEV: remove unused import 2022-08-24 12:02:28 +02:00
Angus McLeod
b11eea3a06 FIX: error handling needs to take account of internal discourse ajax changes 2022-08-24 11:35:17 +02:00
Angus McLeod
78a9c97e43 FIX: Ensure no access skip works for guests 2022-08-24 09:52:08 +02:00
Angus McLeod
b05ed5093e Bump version 2022-08-23 17:04:44 +02:00
Angus McLeod
6c39054853 Add notice about subscriptions to wizard admin panel 2022-08-23 17:04:30 +02:00
Angus McLeod
b3bcaa26f1 DEV: apply prettier to wizard composer editor 2022-08-22 16:10:01 +02:00
Angus McLeod
d6b4954ae3 Bump version 2022-08-22 15:57:38 +02:00
Angus McLeod
9e1dfd9cf9 FIX: simplify wizard composer event handling 2022-08-22 15:56:58 +02:00
Angus McLeod
7386be3ac0 Ensure bootstrap mode notice is hidden in wizard 2022-08-22 14:39:01 +02:00
Angus McLeod
800ec34ed3 Merge branch 'main' of https://github.com/paviliondev/discourse-custom-wizard 2022-08-18 23:04:48 +02:00
Angus McLeod
6e02c138ef Update plugin about 2022-08-18 23:04:42 +02:00
Angus McLeod
4173404bbd
Update README.md 2022-08-18 22:43:13 +02:00
Angus McLeod
0dd54255ef Update README.md 2022-08-18 13:28:43 +02:00
Angus McLeod
ff7185f742 Update README.md 2022-08-18 12:36:05 +02:00
Angus McLeod
f7d074fb05
Merge pull request #201 from paviliondev/file-upload-test
Fix manager fix uploads
2022-08-15 16:35:12 +02:00
Angus McLeod
81680033a7 Apply prettier 2022-08-15 16:16:18 +02:00
Angus McLeod
1f254732da version bump 2022-08-15 15:41:01 +02:00
Angus McLeod
cfe563e515 FIX: use native javascript instead of jquery 2022-08-15 14:36:42 +02:00
Angus McLeod
eae5fbbbb8 FIX: try using new component style 2022-08-15 14:26:36 +02:00
Angus McLeod
e59d12be95 FIX: use input event instead of change event 2022-08-15 14:00:58 +02:00
Angus McLeod
6a1f8c9cb7 DEV: site-settings:main has been replaced with service:site-settings 2022-08-15 13:53:31 +02:00
Angus McLeod
5c6b66e730 Update plugin contact email 2022-08-12 15:48:30 +01:00
Angus McLeod
ef590abce2
Update README.md 2022-08-11 10:58:41 +01:00
Angus McLeod
e75c9de052
Add banner 2022-08-11 10:58:07 +01:00
Angus McLeod
93107236ea Update README.md 2022-08-11 10:33:41 +01:00
Angus McLeod
209bb077e9 Update metadata in preparation from v2.0 2022-08-09 15:20:49 +01:00
Angus McLeod
734cc44f62 Update admin.scss 2022-08-09 15:00:26 +01:00
Angus McLeod
248e785086 Merge branch 'main' into pro-release 2022-08-09 14:56:31 +01:00
Angus McLeod
e5a91aaab5
Merge pull request #200 from paviliondev/fix_orphaned_uploads
Add upload_references for wizard step and field uploads
2022-08-02 14:04:13 +01:00
Angus McLeod
c3c87852b8 Bump version 2022-08-02 13:57:44 +01:00
Angus McLeod
5acff01708 Apply prettier 2022-08-02 13:57:19 +01:00
Angus McLeod
1e8b667e3f Working version contained within template model 2022-08-02 13:54:57 +01:00
Keegan George
c8602c13cc New translations server.en.yml (Chinese Simplified) 2022-08-02 05:01:08 -07:00
Keegan George
5856d95757 New translations client.en.yml (Portuguese) 2022-08-02 05:00:40 -07:00
Keegan George
f76185c73d New translations client.en.yml (Portuguese, Brazilian) 2022-08-02 05:00:24 -07:00
Keegan George
2812cd107f New translations client.en.yml (Chinese Traditional) 2022-08-02 05:00:19 -07:00
Angus McLeod
2cec01ba2c WIP Example 2022-08-02 12:39:56 +01:00
Angus McLeod
d4da391a4d Various rebase fixes 2022-08-01 18:07:16 +01:00
Angus McLeod
1175cbab96 Merge branch 'main' into pro-release 2022-08-01 17:48:04 +01:00
Angus McLeod
38307c565a Fix header content CSS 2022-08-01 17:18:21 +01:00
Angus McLeod
2f21358f10 Merge branch 'main' into pro-release 2022-08-01 16:44:42 +01:00
Keegan George
a6109636dd New translations server.en.yml (Portuguese, Brazilian) 2022-08-01 03:42:20 -07:00
Keegan George
6ca3f9347c New translations server.en.yml (Chinese Traditional) 2022-08-01 03:42:16 -07:00
Keegan George
bcc243ad27 New translations server.en.yml (Portuguese) 2022-08-01 03:42:08 -07:00
Keegan George
7669eb8907 New translations server.en.yml (Chinese Simplified) 2022-08-01 03:41:38 -07:00
Keegan George
bfda41a5ab New translations client.en.yml (Portuguese) 2022-08-01 03:41:02 -07:00
Keegan George
66cb18701f New translations client.en.yml (Chinese Simplified) 2022-08-01 03:40:43 -07:00
Keegan George
af77cdbefc New translations client.en.yml (Chinese Traditional) 2022-08-01 03:40:38 -07:00
Angus McLeod
0d7a220f1d FIX: direct step path error when not logged in && fix acceptance tests 2022-08-01 08:41:11 +01:00
Keegan George
af9c1ebed5 New translations server.en.yml (Chinese Simplified) 2022-07-31 03:39:02 -07:00
Keegan George
36bb8c6b8d New translations client.en.yml (Chinese Simplified) 2022-07-31 03:39:01 -07:00
Keegan George
4967ecef5b New translations client.en.yml (Japanese) 2022-07-31 03:39:00 -07:00
Keegan George
8c8a6c1c9f New translations client.en.yml (French) 2022-07-31 03:38:59 -07:00
Keegan George
37927bf63c New translations client.en.yml (Sindhi) 2022-07-30 03:32:26 -07:00
Keegan George
87acb3ba24 New translations client.en.yml (Croatian) 2022-07-30 03:32:25 -07:00
Keegan George
875429a701 New translations client.en.yml (Kazakh) 2022-07-30 03:32:24 -07:00
Keegan George
797f194c15 New translations client.en.yml (Estonian) 2022-07-30 03:32:23 -07:00
Keegan George
0248cd9469 New translations client.en.yml (Latvian) 2022-07-30 03:32:22 -07:00
Keegan George
97a75c6258 New translations client.en.yml (Azerbaijani) 2022-07-30 03:32:21 -07:00
Keegan George
14f29f5366 New translations client.en.yml (Hindi) 2022-07-30 03:32:20 -07:00
Keegan George
6d1a8dff8f New translations client.en.yml (Malay) 2022-07-30 03:32:19 -07:00
Keegan George
ca5aaf7f92 New translations client.en.yml (Telugu) 2022-07-30 03:32:18 -07:00
Keegan George
65647fc6b7 New translations client.en.yml (Tagalog) 2022-07-30 03:32:17 -07:00
Keegan George
bd66f380b7 New translations client.en.yml (Yiddish) 2022-07-30 03:32:16 -07:00
Keegan George
66fe68e88d New translations client.en.yml (Thai) 2022-07-30 03:32:15 -07:00
Keegan George
083e3cf353 New translations client.en.yml (Welsh) 2022-07-30 03:32:14 -07:00
Keegan George
9349fca152 New translations client.en.yml (Tatar) 2022-07-30 03:32:13 -07:00
Keegan George
4cf90e23b6 New translations client.en.yml (Malayalam) 2022-07-30 03:32:12 -07:00
Keegan George
18c31dd66a New translations client.en.yml (Tibetan) 2022-07-30 03:32:11 -07:00
Keegan George
087af5bfad New translations client.en.yml (Bosnian) 2022-07-30 03:32:10 -07:00
Keegan George
7f9ace13e8 New translations client.en.yml (Kannada) 2022-07-30 03:32:09 -07:00
Keegan George
afd77dc409 New translations client.en.yml (Swahili) 2022-07-30 03:32:08 -07:00
Keegan George
15cb6d67c5 New translations client.en.yml (Nepali) 2022-07-30 03:32:07 -07:00
Keegan George
a592054d1d New translations client.en.yml (Lao) 2022-07-30 03:32:06 -07:00
Keegan George
7b5f39b4b6 New translations client.en.yml (Oromo) 2022-07-30 03:32:05 -07:00
Keegan George
59086fefdd New translations client.en.yml (Esperanto) 2022-07-30 03:32:04 -07:00
Keegan George
b49385774b New translations client.en.yml (Bengali) 2022-07-30 03:32:03 -07:00
Keegan George
e34c058f42 New translations client.en.yml (Tamil) 2022-07-30 03:32:02 -07:00
Keegan George
6ff14cac23 New translations client.en.yml (Macedonian) 2022-07-30 03:32:01 -07:00
Keegan George
306fca6779 New translations client.en.yml (Lithuanian) 2022-07-30 03:32:00 -07:00
Keegan George
abc55c1e78 New translations client.en.yml (Kurdish) 2022-07-30 03:31:59 -07:00
Keegan George
747b36a840 New translations client.en.yml (Korean) 2022-07-30 03:31:58 -07:00
Keegan George
25962ac93d New translations client.en.yml (Georgian) 2022-07-30 03:31:57 -07:00
Keegan George
125a11a2b5 New translations client.en.yml (Japanese) 2022-07-30 03:31:56 -07:00
Keegan George
b9ec915f7f New translations client.en.yml (Italian) 2022-07-30 03:31:55 -07:00
Keegan George
adf5e91e9f New translations client.en.yml (Armenian) 2022-07-30 03:31:54 -07:00
Keegan George
23f3bd2b94 New translations client.en.yml (Hungarian) 2022-07-30 03:31:54 -07:00
Keegan George
a8d5165fe0 New translations client.en.yml (Hebrew) 2022-07-30 03:31:53 -07:00
Keegan George
40e6194143 New translations client.en.yml (Mongolian) 2022-07-30 03:31:52 -07:00
Keegan George
44e6fac586 New translations client.en.yml (Finnish) 2022-07-30 03:31:51 -07:00
Keegan George
52b5fd8eee New translations client.en.yml (Greek) 2022-07-30 03:31:50 -07:00
Keegan George
837f2470d1 New translations client.en.yml (German) 2022-07-30 03:31:49 -07:00
Keegan George
2b1d9c28bb New translations client.en.yml (Danish) 2022-07-30 03:31:48 -07:00
Keegan George
c4f4a7f4d9 New translations client.en.yml (Czech) 2022-07-30 03:31:47 -07:00
Keegan George
1f04cc50ca New translations client.en.yml (Catalan) 2022-07-30 03:31:46 -07:00
Keegan George
dfdf21e03a New translations client.en.yml (Bulgarian) 2022-07-30 03:31:45 -07:00
Keegan George
20cb9f3df7 New translations client.en.yml (Belarusian) 2022-07-30 03:31:44 -07:00
Keegan George
8988b1d722 New translations client.en.yml (Arabic) 2022-07-30 03:31:43 -07:00
Keegan George
f484706d98 New translations client.en.yml (Afrikaans) 2022-07-30 03:31:42 -07:00
Keegan George
967e238f8f New translations client.en.yml (Spanish) 2022-07-30 03:31:41 -07:00
Keegan George
4f84bdb87a New translations client.en.yml (Basque) 2022-07-30 03:31:40 -07:00
Keegan George
39bd40cbe1 New translations client.en.yml (French) 2022-07-30 03:31:39 -07:00
Keegan George
89a29767c5 New translations client.en.yml (Dutch) 2022-07-30 03:31:38 -07:00
Keegan George
7c2ef92672 New translations client.en.yml (Punjabi) 2022-07-30 03:31:37 -07:00
Keegan George
ef9e80263a New translations client.en.yml (Khmer) 2022-07-30 03:31:36 -07:00
Keegan George
5300d03bed New translations client.en.yml (Persian) 2022-07-30 03:31:35 -07:00
Keegan George
ce7200c90f New translations client.en.yml (Indonesian) 2022-07-30 03:31:35 -07:00
Keegan George
7181d1bbf5 New translations client.en.yml (Portuguese, Brazilian) 2022-07-30 03:31:34 -07:00
Keegan George
35cd36d395 New translations client.en.yml (Icelandic) 2022-07-30 03:31:32 -07:00
Keegan George
50a14ffe9c New translations client.en.yml (Galician) 2022-07-30 03:31:31 -07:00
Keegan George
3586079af4 New translations client.en.yml (Vietnamese) 2022-07-30 03:31:30 -07:00
Keegan George
47d150b977 New translations client.en.yml (Urdu (Pakistan)) 2022-07-30 03:31:30 -07:00
Keegan George
cad81a76cc New translations client.en.yml (Zulu) 2022-07-30 03:31:29 -07:00
Keegan George
f53a1d1f22 New translations client.en.yml (Chinese Traditional) 2022-07-30 03:31:28 -07:00
Keegan George
6d3cf642d9 New translations client.en.yml (Norwegian) 2022-07-30 03:31:27 -07:00
Keegan George
3e9edbf8c9 New translations client.en.yml (Chinese Simplified) 2022-07-30 03:31:26 -07:00
Keegan George
9000949a04 New translations client.en.yml (Turkish) 2022-07-30 03:31:25 -07:00
Keegan George
6c98daf644 New translations client.en.yml (Swedish) 2022-07-30 03:31:24 -07:00
Keegan George
090f6700e8 New translations client.en.yml (Serbian (Cyrillic)) 2022-07-30 03:31:23 -07:00
Keegan George
26c24815c5 New translations client.en.yml (Albanian) 2022-07-30 03:31:22 -07:00
Keegan George
6508e99efb New translations client.en.yml (Slovenian) 2022-07-30 03:31:21 -07:00
Keegan George
7e878a19f1 New translations client.en.yml (Slovak) 2022-07-30 03:31:20 -07:00
Keegan George
280c01d149 New translations client.en.yml (Russian) 2022-07-30 03:31:19 -07:00
Keegan George
051aaf4d0e New translations client.en.yml (Portuguese) 2022-07-30 03:31:18 -07:00
Keegan George
d36e8223b7 New translations client.en.yml (Polish) 2022-07-30 03:31:17 -07:00
Keegan George
39b9124c84 New translations client.en.yml (Ukrainian) 2022-07-30 03:31:16 -07:00
Keegan George
65812b7b4e New translations client.en.yml (Romanian) 2022-07-30 03:31:15 -07:00
Angus McLeod
556a32aa5c wizard_js locales are only loaded on the new /wizard route for non-staff 2022-07-30 11:23:12 +01:00
Angus McLeod
3fec341e97
Merge pull request #199 from OsamaSayegh/dev/replace-deprecated-component
DEV: Replace `{{user-selector}}` with `{{email-group-user-chooser}}`
2022-07-29 17:28:48 +01:00
Angus McLeod
e3efc68dc9 Bump version 2022-07-29 17:13:44 +01:00
OsamaSayegh
5d55c154c1
DEV: Replace {{user-selector}} with {{email-group-user-chooser}} 2022-07-29 18:51:58 +03:00
Angus McLeod
d9407b5d7d Hide top-notices-outlet in the wizard route 2022-07-29 16:36:06 +01:00
Angus McLeod
2414146fab FIX: step model name update 2022-07-29 16:32:41 +01:00
Keegan George
458f2b896f New translations client.en.yml (Sindhi) 2022-07-28 13:04:42 -07:00
Keegan George
3b270638bf New translations client.en.yml (Croatian) 2022-07-28 13:04:41 -07:00
Keegan George
9263a847af New translations client.en.yml (Kazakh) 2022-07-28 13:04:40 -07:00
Keegan George
e9d78f64a3 New translations client.en.yml (Estonian) 2022-07-28 13:04:39 -07:00
Keegan George
796d4c52db New translations client.en.yml (Latvian) 2022-07-28 13:04:38 -07:00
Keegan George
1354301f3c New translations client.en.yml (Azerbaijani) 2022-07-28 13:04:37 -07:00
Keegan George
292f47f58b New translations client.en.yml (Hindi) 2022-07-28 13:04:36 -07:00
Keegan George
6a0d684d50 New translations client.en.yml (Malay) 2022-07-28 13:04:35 -07:00
Keegan George
315aded76d New translations client.en.yml (Telugu) 2022-07-28 13:04:34 -07:00
Keegan George
3b8b00c712 New translations client.en.yml (Tagalog) 2022-07-28 13:04:33 -07:00
Keegan George
415fdba9fe New translations client.en.yml (Yiddish) 2022-07-28 13:04:32 -07:00
Keegan George
1182c191a0 New translations client.en.yml (Thai) 2022-07-28 13:04:31 -07:00
Keegan George
dfd7e1ad56 New translations client.en.yml (Welsh) 2022-07-28 13:04:30 -07:00
Keegan George
b9b3edd565 New translations client.en.yml (Tatar) 2022-07-28 13:04:29 -07:00
Keegan George
1f73807376 New translations client.en.yml (Malayalam) 2022-07-28 13:04:27 -07:00
Keegan George
7239404b41 New translations client.en.yml (Tibetan) 2022-07-28 13:04:26 -07:00
Keegan George
5cfd322416 New translations client.en.yml (Bosnian) 2022-07-28 13:04:25 -07:00
Keegan George
0e390e0bd6 New translations client.en.yml (Kannada) 2022-07-28 13:04:23 -07:00
Keegan George
bef18c0433 New translations client.en.yml (Swahili) 2022-07-28 13:04:22 -07:00
Keegan George
d78ecbb419 New translations client.en.yml (Nepali) 2022-07-28 13:04:21 -07:00
Keegan George
96fbdee147 New translations client.en.yml (Lao) 2022-07-28 13:04:20 -07:00
Keegan George
f2f6ebb6e7 New translations client.en.yml (Oromo) 2022-07-28 13:04:19 -07:00
Keegan George
2ad58ef79f New translations client.en.yml (Esperanto) 2022-07-28 13:04:18 -07:00
Keegan George
5aa47e1c43 New translations client.en.yml (Bengali) 2022-07-28 13:04:16 -07:00
Keegan George
da91b6df02 New translations client.en.yml (Tamil) 2022-07-28 13:04:15 -07:00
Keegan George
f057fe8339 New translations client.en.yml (Macedonian) 2022-07-28 13:04:14 -07:00
Keegan George
d46899a5df New translations client.en.yml (Lithuanian) 2022-07-28 13:04:13 -07:00
Keegan George
2b447962d1 New translations client.en.yml (Kurdish) 2022-07-28 13:04:12 -07:00
Keegan George
9f491d2541 New translations client.en.yml (Korean) 2022-07-28 13:04:11 -07:00
Keegan George
5a58607bd7 New translations client.en.yml (Georgian) 2022-07-28 13:04:10 -07:00
Keegan George
e94b0dea0e New translations client.en.yml (Japanese) 2022-07-28 13:04:09 -07:00
Keegan George
66b2d414e0 New translations client.en.yml (Italian) 2022-07-28 13:04:08 -07:00
Keegan George
cf0b847194 New translations client.en.yml (Armenian) 2022-07-28 13:04:07 -07:00
Keegan George
4fa8c92241 New translations client.en.yml (Hungarian) 2022-07-28 13:04:06 -07:00
Keegan George
ba2f892eb7 New translations client.en.yml (Hebrew) 2022-07-28 13:04:05 -07:00
Keegan George
3ef92b7859 New translations client.en.yml (Mongolian) 2022-07-28 13:04:04 -07:00
Keegan George
aa5b364e21 New translations client.en.yml (Finnish) 2022-07-28 13:04:03 -07:00
Keegan George
e6a934927c New translations client.en.yml (Greek) 2022-07-28 13:04:02 -07:00
Keegan George
f9b0895b9e New translations client.en.yml (German) 2022-07-28 13:04:00 -07:00
Keegan George
f1529294dd New translations client.en.yml (Danish) 2022-07-28 13:03:59 -07:00
Keegan George
0eafe1249d New translations client.en.yml (Czech) 2022-07-28 13:03:58 -07:00
Keegan George
c28eec978e New translations client.en.yml (Catalan) 2022-07-28 13:03:57 -07:00
Keegan George
ba9d618df0 New translations client.en.yml (Bulgarian) 2022-07-28 13:03:56 -07:00
Keegan George
8efaa58749 New translations client.en.yml (Belarusian) 2022-07-28 13:03:55 -07:00
Keegan George
2747611d5a New translations client.en.yml (Arabic) 2022-07-28 13:03:54 -07:00
Keegan George
ebd826cc9b New translations client.en.yml (Afrikaans) 2022-07-28 13:03:53 -07:00
Keegan George
01bfbc24d4 New translations client.en.yml (Spanish) 2022-07-28 13:03:52 -07:00
Keegan George
048271b136 New translations client.en.yml (Basque) 2022-07-28 13:03:51 -07:00
Keegan George
f9c4de04c4 New translations client.en.yml (French) 2022-07-28 13:03:50 -07:00
Keegan George
96b0fa47b6 New translations client.en.yml (Dutch) 2022-07-28 13:03:48 -07:00
Keegan George
f2cadf9fc2 New translations client.en.yml (Punjabi) 2022-07-28 13:03:47 -07:00
Keegan George
29d01227eb New translations client.en.yml (Khmer) 2022-07-28 13:03:46 -07:00
Keegan George
4f4a8ed8f3 New translations client.en.yml (Persian) 2022-07-28 13:03:45 -07:00
Keegan George
f36884f2dd New translations client.en.yml (Indonesian) 2022-07-28 13:03:44 -07:00
Keegan George
41807aec53 New translations client.en.yml (Portuguese, Brazilian) 2022-07-28 13:03:43 -07:00
Keegan George
6801e2885f New translations client.en.yml (Icelandic) 2022-07-28 13:03:42 -07:00
Keegan George
d88c1cf2ff New translations client.en.yml (Galician) 2022-07-28 13:03:41 -07:00
Keegan George
706c8e0413 New translations client.en.yml (Vietnamese) 2022-07-28 13:03:40 -07:00
Keegan George
b23952a0d2 New translations client.en.yml (Urdu (Pakistan)) 2022-07-28 13:03:39 -07:00
Keegan George
f2822c7520 New translations client.en.yml (Zulu) 2022-07-28 13:03:38 -07:00
Keegan George
f816073405 New translations client.en.yml (Chinese Traditional) 2022-07-28 13:03:38 -07:00
Keegan George
cc504baba6 New translations client.en.yml (Norwegian) 2022-07-28 13:03:36 -07:00
Keegan George
7c3ee8a0e1 New translations client.en.yml (Chinese Simplified) 2022-07-28 13:03:35 -07:00
Keegan George
0105be82b8 New translations client.en.yml (Turkish) 2022-07-28 13:03:34 -07:00
Keegan George
b933d41dbe New translations client.en.yml (Swedish) 2022-07-28 13:03:33 -07:00
Keegan George
a4db15adab New translations client.en.yml (Serbian (Cyrillic)) 2022-07-28 13:03:32 -07:00
Keegan George
09d40951da New translations client.en.yml (Albanian) 2022-07-28 13:03:31 -07:00
Keegan George
5aeabdd648 New translations client.en.yml (Slovenian) 2022-07-28 13:03:30 -07:00
Keegan George
83b985ac02 New translations client.en.yml (Slovak) 2022-07-28 13:03:29 -07:00
Keegan George
7268050cf7 New translations client.en.yml (Russian) 2022-07-28 13:03:28 -07:00
Keegan George
42b7264fc2 New translations client.en.yml (Portuguese) 2022-07-28 13:03:27 -07:00
Keegan George
6fce834244 New translations client.en.yml (Polish) 2022-07-28 13:03:26 -07:00
Keegan George
8b2e3e4c20 New translations client.en.yml (Ukrainian) 2022-07-28 13:03:24 -07:00
Keegan George
1cab61b373 New translations client.en.yml (Romanian) 2022-07-28 13:03:23 -07:00
Angus McLeod
72a1f9f2c2
Merge pull request #198 from paviliondev/move_custom_wizard_into_main_app
Move custom wizard into main app
2022-07-28 21:02:23 +01:00
Angus McLeod
dd74989562 Remove out of date specs 2022-07-28 20:37:10 +01:00
Angus McLeod
12e1d802a3 Remove unused build_type 2022-07-28 20:29:01 +01:00
Angus McLeod
1e56477253 Minor style fixes and deprecation handling 2022-07-28 20:26:35 +01:00
Angus McLeod
b078b9c8f4 Use custom-wizard-step-form 2022-07-28 20:12:36 +01:00
Angus McLeod
ea177b790d Update plugin-tests.yml 2022-07-27 15:55:14 +01:00
Angus McLeod
6792cfb000 Use plugin's prettier 2022-07-27 15:36:22 +01:00
Angus McLeod
039e478f47 Update admin-wizards-api-show.js.es6 2022-07-27 15:33:58 +01:00
Angus McLeod
7f233f178c Apply prettier and eslint 2022-07-27 15:30:45 +01:00
Angus McLeod
f3aed50927 Update plugin-linting workflow 2022-07-27 15:21:02 +01:00
Angus McLeod
cbc76e4810 Update plugin-linting.yml 2022-07-27 15:14:41 +01:00
Angus McLeod
b38f2b947f Update plugin-linting.yml 2022-07-27 14:52:29 +01:00
Angus McLeod
72fc36dd67 Apply prettier 2022-07-27 14:50:49 +01:00
Angus McLeod
d416cbb20e CSS Tweak 2022-07-27 14:47:51 +01:00
Angus McLeod
c6d5778d12 Update metadata 2022-07-27 14:42:08 +01:00
Angus McLeod
c3bec5a3e9 Fix linting 2022-07-27 14:40:48 +01:00
Angus McLeod
150afb29e0 Namespace CSS and remove uneccessary site attributes 2022-07-27 14:40:05 +01:00
Angus McLeod
60823cd87a First release candidate 2022-07-27 11:47:50 +01:00
Angus McLeod
11ff38ae90 Move wizard into core app first step: move the files 2022-07-26 15:18:09 +01:00
Angus McLeod
4b21566673 Merge branch 'main' into pro-release 2022-07-18 08:53:49 +01:00
Angus McLeod
ac279e4a67 Version bump 2022-07-18 07:41:46 +01:00
Angus McLeod
f373e2ad81 COMPATIBILITY: remove overly-active keyPress 2022-07-18 07:41:28 +01:00
Angus McLeod
c7097d5775 COMPATIBILITY: Add new common library 2022-07-18 07:37:10 +01:00
Angus McLeod
d7271b7288 Version bump 2022-07-15 16:41:04 +01:00
Angus McLeod
c107ee2375 Merge branch 'main' into pro-release 2022-07-15 15:14:57 +01:00
Angus McLeod
0b3c71c621 FIX: adopt a simplified with_resolved_locale to ensure user's locale is always loaded 2022-07-15 13:23:32 +01:00
Angus McLeod
8f53d25114 Merge branch 'main' into pro-release 2022-07-13 16:29:24 +01:00
Angus McLeod
d64b6b50dd COMPATIBILITY: The ember resolver has been "modernized"..
fc36ac6cde
2022-07-09 10:24:27 +02:00
Angus McLeod
e761276ed5 COMPATIBILITY: plugin-outlet no longer works as a helper. 2022-07-05 09:06:09 +02:00
Angus McLeod
5d445ecd86 COMPATIBILITY: Move all remaining vendor assets into legacy support 2022-07-05 08:45:31 +02:00
Angus McLeod
180fc0b3ea Create bootstrap-modal.js 2022-07-05 08:40:55 +02:00
Angus McLeod
d2c1a30410 Update linting workflow 2022-06-29 09:55:21 +02:00
Angus McLeod
85c9629da6 COMPATIBILITY: XSS lib has also been moved to a node module
d1d6868325
2022-06-27 11:36:00 +02:00
Angus McLeod
6a5198041b Bump version
Plugin supports all recent asset pipeline changes in Discourse.
2022-06-22 12:56:41 +02:00
Angus McLeod
44f5d39e0a Skip more vendor modules and tweak uppy 2022-06-22 12:45:35 +02:00
Angus McLeod
7dcc6ea61f Add ember_jquery to precompilation pipeline 2022-06-22 12:29:54 +02:00
Angus McLeod
b7d332e0e5 COMPATIBILITY: everything is transpiled by default now.
624c684d51
2022-06-22 12:19:50 +02:00
Angus McLeod
b8329f0fa0 wizard-vendor needs to be precompiled 2022-06-22 10:37:02 +02:00
Angus McLeod
8496e15728 Remove qunit entirely for now
Re-add when migration to ember-cli is made
2022-06-22 10:22:20 +02:00
Angus McLeod
f09ab628df Temporarily disable qunit until we get it working with ember cli 2022-06-22 10:07:20 +02:00
Angus McLeod
ed25847dd8 namespace env in qunit loader 2022-06-22 09:34:43 +02:00
Angus McLeod
ce3d2ced55 COMPATIBILITY: Various core file changes
The completion of the move to ember-cli in core requires a move to an independent asset pipeline. The wizard app itself will be upgraded to ember-cli when I have time. See further:
- fcb4e5a1a1
- 1b4692039e
- a69b914710
2022-06-22 09:14:55 +02:00
Angus McLeod
70329f209a COMPATIBILITY: The core wizard is now an ember addon 2022-06-17 16:00:22 +02:00
Angus McLeod
aea2df9b06 Bump version 2022-06-15 09:59:40 +02:00
Angus McLeod
7cf99f2391 Final cherry pick fixes 2022-06-15 09:57:20 +02:00
Angus McLeod
3136b779b4 More fixes from the cherry picks 2022-06-15 09:14:42 +02:00
Angus McLeod
47eed48ad5 Update wizard-i18n.js.es6 2022-06-15 09:10:33 +02:00
Angus McLeod
af93a67bb1 Fixes from the cherry picks 2022-06-15 09:08:28 +02:00
Angus McLeod
f3c5eeb371 Fix linting 2022-06-15 08:59:09 +02:00
Angus McLeod
3abb65294c re-add qunit bootstrap conditional 2022-06-15 08:37:31 +02:00
Angus McLeod
576d96b2ba FIX: we're no longer extending the application controller 2022-06-15 08:36:40 +02:00
Angus McLeod
41cfdfb135 Fix tests 2022-06-15 08:14:26 +02:00
Angus McLeod
8fd07322d0 Minor config updates 2022-06-15 08:12:58 +02:00
Angus McLeod
39defec897 Remove duplicated functions 2022-06-15 08:10:41 +02:00
Angus McLeod
a2106bf592 Update workflow to add frontend tests && handle deprecations 2022-06-15 08:09:45 +02:00
Angus McLeod
a19a1fa3b1 Refactor wizard client and add tests 2022-06-15 08:03:38 +02:00
Angus McLeod
969fff1a3c COMPATIBILITY: Support tag-group-chooser interface && add base CSS to wizard app 2022-06-13 09:25:34 +02:00
Angus McLeod
e88fff7e25 Tweak preview toggle text 2022-06-02 18:05:17 +02:00
Angus McLeod
717aedb607 Tweak checkbox field description css 2022-06-02 18:00:01 +02:00
Angus McLeod
d000bc7665 Merge branch 'main' into pro-release 2022-06-02 17:51:32 +02:00
Angus McLeod
dec670ac43 FIX: ensure we have the right upload ID when navigating between steps 2022-06-02 17:49:16 +02:00
Angus McLeod
cf33fb9792 Style and other fixes for API features 2022-06-02 16:45:20 +02:00
Angus McLeod
eb8b289b50 Fix create api action 2022-05-31 13:37:34 +02:00
Angus McLeod
1d7d9d1119 Fix failing specs 2022-05-31 13:16:28 +02:00
Angus McLeod
8fd5ae7169 Ensure wizard asset paths are included 2022-05-31 13:04:35 +02:00
Angus McLeod
1c9d52bcfc Fix linting 2022-05-13 12:06:38 +02:00
Angus McLeod
45f52d56c0 Sort actions by subscription type 2022-05-13 12:04:53 +02:00
Angus McLeod
45ab9b1b80 Remove unconnected action 2022-05-13 11:52:11 +02:00
Angus McLeod
3e2faaa264 Merge branch 'main' into pro-release 2022-05-13 11:42:50 +02:00
Angus McLeod
294c35cf9b COMPATIBILITY: three custom fields were dropped in core
991b62b6f1
2022-05-13 11:40:08 +02:00
Angus McLeod
2c7addb9ae FIX: css grid causes issues for admin editor in safari 2022-05-12 18:14:38 +02:00
Angus McLeod
449b81a93e COMPATIBILITY: new editor helper fn signatures
See 94207e27d1
2022-04-22 15:46:32 +03:00
Keegan George
883dacf347 New translations server.en.yml (Portuguese, Brazilian) 2022-04-21 23:47:21 -07:00
Keegan George
4ff50b191b New translations client.en.yml (Portuguese, Brazilian) 2022-04-21 23:47:20 -07:00
Keegan George
8dcdc9c196 New translations server.en.yml (German) 2022-04-20 23:43:06 -07:00
Keegan George
04e78c102f New translations client.en.yml (German) 2022-04-20 23:43:05 -07:00
Keegan George
5325be0308 New translations client.en.yml (German) 2022-04-19 23:46:04 -07:00
Angus McLeod
0970b49db8 Remove unnecessary extensions 2022-04-11 15:24:10 +02:00
Angus McLeod
1f320aac93 Fix tests 2022-04-11 15:16:29 +02:00
Angus McLeod
0313e1be95 Add backslash to qunit path 2022-04-11 14:56:19 +02:00
Angus McLeod
7904bb5b3a Add more env variables 2022-04-11 14:37:04 +02:00
Angus McLeod
4348a4ee68 Add more logs 2022-04-11 14:36:04 +02:00
Angus McLeod
15c0245edf Test config 2022-04-11 14:00:12 +02:00
Angus McLeod
86b0df89d1 Test config 2022-04-11 13:42:32 +02:00
Angus McLeod
0783cac9e0 Add LOAD_PLUGINS to env in action workflow 2022-04-11 12:42:26 +02:00
Angus McLeod
a87dc19eb3 Add qunit CSP extension 2022-04-11 12:21:38 +02:00
Angus McLeod
9b96c02d0f re-add qunit bootstrap conditional 2022-04-11 12:17:11 +02:00
Angus McLeod
cebc63b6d8 Try removing conditional from bootstrap 2022-04-11 11:47:33 +02:00
Angus McLeod
3c0d256e4e Update plugin.rb 2022-04-11 11:35:00 +02:00
Angus McLeod
b0ea1081a2 Update plugin-tests.yml 2022-04-11 11:31:11 +02:00
Angus McLeod
1f899935a0 Update plugin-tests.yml 2022-04-11 11:28:51 +02:00
Angus McLeod
7d941eaf5e Update bootstrap.js.es6 2022-04-11 11:10:00 +02:00
Angus McLeod
8b5b9624d7 Update wizard-qunit.js 2022-04-11 11:08:07 +02:00
Angus McLeod
305f94e9d9 Minor config updates 2022-04-11 11:02:21 +02:00
Angus McLeod
84d21f78e5 Udpate version 2022-04-11 10:01:28 +02:00
Angus McLeod
b57bf8e0fe tweak qunit format 2022-04-11 09:51:01 +02:00
Angus McLeod
9e8878e174 Move to new workflow approach (based on updated Discourse approach) 2022-04-08 16:50:49 +02:00
Angus McLeod
ef22c1d33d Increase qunit timeout 2022-04-08 16:35:40 +02:00
Angus McLeod
2d6581c60c FIX: createWizard is a route action 2022-04-04 15:07:17 +02:00
Angus McLeod
0b6ba868ce FIX: Ensure we always progress index 2022-04-04 12:15:13 +02:00
Angus McLeod
cd43cdd29b Revert "Update admin-wizards-wizard-show.hbs"
This reverts commit 13f5aeda98.
2022-04-04 12:14:05 +02:00
Angus McLeod
61ad74e07b Revert "Update action usage"
This reverts commit 37685ea8cf.
2022-04-04 12:14:00 +02:00
Angus McLeod
13f5aeda98 Update admin-wizards-wizard-show.hbs 2022-04-04 12:02:42 +02:00
Angus McLeod
37685ea8cf Update action usage 2022-04-04 12:01:36 +02:00
Angus McLeod
26b0fcffb0 Update plugin-tests.yml 2022-03-30 11:25:09 +02:00
Angus McLeod
15b72155c5 Update admin-wizards-wizard-show.hbs 2022-03-30 11:01:36 +02:00
Angus McLeod
1296d3bff8 Update action usage 2022-03-29 21:15:09 +02:00
Angus McLeod
466c7a7a49 Explicitly load asset paths for tests 2022-03-29 20:17:59 +02:00
Angus McLeod
a053440466 Update plugin.rb 2022-03-29 18:09:12 +02:00
Angus McLeod
c56e5dcbf8
Merge pull request #192 from paviliondev/remove_subs_and_notices
Remove subs and notices
2022-03-29 16:49:21 +02:00
Angus McLeod
04f0d34ef3 Fix specs 2022-03-25 17:08:24 +01:00
Angus McLeod
92219ace2f Apply linting 2022-03-25 12:22:27 +01:00
Angus McLeod
f607863510 Remove more subscription related things and integrate with subscription client 2022-03-25 12:18:54 +01:00
Angus McLeod
5edfb4c41e Remove subs and notices files 2022-03-16 15:49:25 +01:00
Angus McLeod
c0b93fc166
Merge pull request #191 from paviliondev/add_acceptance_tests
Add acceptance tests
2022-03-16 15:11:09 +01:00
Angus McLeod
591274d38f Skip core qunit 2022-03-16 15:07:49 +01:00
Angus McLeod
01d972f6ba Try using bundle exec 2022-03-16 14:39:39 +01:00
Angus McLeod
7e295dfb14 Update plugin-tests.yml 2022-03-16 14:22:18 +01:00
Angus McLeod
6cd6b111bd Bump minor version 2022-03-16 14:13:45 +01:00
Angus McLeod
61928ce436 Apply rubocop 2022-03-16 14:12:13 +01:00
Angus McLeod
ea52b2779b Remove duplicated functions 2022-03-16 14:10:54 +01:00
Angus McLeod
e7755b106f Update workflow to add frontend tests && handle deprecations 2022-03-16 14:09:23 +01:00
Angus McLeod
0c48435672 Merge branch 'pro-release' into add_acceptance_tests 2022-03-16 12:51:15 +01:00
Angus McLeod
835600c054 Fix linting 2022-03-16 12:46:16 +01:00
Angus McLeod
8893e6caf1 Refactor wizard client and add tests 2022-03-16 12:33:34 +01:00
Angus McLeod
d57f260def Cleanup after merge 2022-03-12 15:20:54 +01:00
Angus McLeod
69fd3d451d merge main 2022-03-12 15:08:56 +01:00
Angus McLeod
cb7bb4e12f Move to proper folder structure 2022-03-12 14:49:41 +01:00
Angus McLeod
72e16ad9c3
Merge pull request #190 from paviliondev/update_simplecov
Move to new coverage approach
2022-03-12 14:40:14 +01:00
Angus McLeod
684a2a3801 Update plugin-tests.yml 2022-03-12 14:26:27 +01:00
Angus McLeod
7a56b9d390 Rubocop 2022-03-12 14:02:11 +01:00
Angus McLeod
8cac2a5960 Update plugin.rb 2022-03-12 14:01:39 +01:00
Angus McLeod
46c86cda58 Move to new coverage approach 2022-03-12 14:00:07 +01:00
Angus McLeod
f9b35a2541 COMPATIBILITY: Remove lodash 2022-03-07 09:02:39 +01:00
Angus McLeod
035e997e35
Merge pull request #186 from paviliondev/bugfix_dropdown
FIX: dropdown content assignment should be allowed to be set to "text"
2022-03-03 21:19:12 +01:00
Angus McLeod
caf2333326 Bump coverage 2022-03-03 21:02:44 +01:00
Angus McLeod
cb1054bcd6 FIX: output text for dropdown should not be possible 2022-03-03 20:47:30 +01:00
Angus McLeod
71af94c80b Version bump 2022-03-03 20:40:29 +01:00
Angus McLeod
3169c0803e BUGFIX: assignment does not need mapping 2022-03-03 20:38:49 +01:00
Angus McLeod
1a2f8f1b76
Merge pull request #185 from Fma965/main
Fix issue with dropdown not working
2022-02-28 20:24:02 +01:00
Scott
c5da68823e
Update plugin.rb 2022-02-28 12:43:10 +00:00
Scott
dbd7251073
Update wizard_field_serializer.rb 2022-02-28 12:34:48 +00:00
Angus McLeod
b20b8ce333 WIP 2 2022-02-17 17:08:14 +11:00
Faizaan Gagan
038604e284
FIX: checkout correct branches of plugin and discourse (#182)
* FIX: checkout correct branches of plugin and discourse

* add condition to check correct discourse branch

* FIX: use updated redis version

* bump patch version
2022-02-16 19:44:56 +05:30
Angus McLeod
b62aee8a48 WIP 2022-02-15 17:16:21 +11:00
Faizaan Gagan
dcefd7c39e FIX: add pretty-text-bundle 2022-02-11 19:20:48 +05:30
Faizaan Gagan
6201530606 FIX: add required dependency 2022-02-11 00:01:43 +05:30
Faizaan Gagan
3b7b0e1a54 cleanup 2022-02-09 12:31:18 +05:30
Angus McLeod
dd067768fd FIX: use request_store properly 2022-02-09 10:30:46 +11:00
Angus McLeod
ba7e8d7cd2 Update plugin.rb 2022-02-09 09:54:55 +11:00
Keegan George
363ce6a83f New translations client.en.yml (Sindhi) 2022-02-06 21:49:23 -08:00
Keegan George
294878d376 New translations client.en.yml (Croatian) 2022-02-06 21:49:22 -08:00
Keegan George
be684274a3 New translations client.en.yml (Kazakh) 2022-02-06 21:49:21 -08:00
Keegan George
4c0e95bddb New translations client.en.yml (Estonian) 2022-02-06 21:49:20 -08:00
Keegan George
3ccfeced5d New translations client.en.yml (Latvian) 2022-02-06 21:49:19 -08:00
Keegan George
a6a87b8471 New translations client.en.yml (Azerbaijani) 2022-02-06 21:49:18 -08:00
Keegan George
c1b4971bd9 New translations client.en.yml (Hindi) 2022-02-06 21:49:17 -08:00
Keegan George
d71808048d New translations client.en.yml (Malay) 2022-02-06 21:49:16 -08:00
Keegan George
57e3bc7421 New translations client.en.yml (Telugu) 2022-02-06 21:49:15 -08:00
Keegan George
61e2817503 New translations client.en.yml (Tagalog) 2022-02-06 21:49:14 -08:00
Keegan George
bf5ce61ede New translations client.en.yml (Yiddish) 2022-02-06 21:49:13 -08:00
Keegan George
f1007b1483 New translations client.en.yml (Thai) 2022-02-06 21:49:12 -08:00
Keegan George
649f014466 New translations client.en.yml (Welsh) 2022-02-06 21:49:11 -08:00
Keegan George
6c1d2df7e1 New translations client.en.yml (Tatar) 2022-02-06 21:49:10 -08:00
Keegan George
90a7512a33 New translations client.en.yml (Malayalam) 2022-02-06 21:49:09 -08:00
Keegan George
18bba7a92b New translations client.en.yml (Tibetan) 2022-02-06 21:49:08 -08:00
Keegan George
01a4469af5 New translations client.en.yml (Bosnian) 2022-02-06 21:49:07 -08:00
Keegan George
fe56e3beff New translations client.en.yml (Kannada) 2022-02-06 21:49:06 -08:00
Keegan George
ccc5103e21 New translations client.en.yml (Swahili) 2022-02-06 21:49:05 -08:00
Keegan George
ba235bac67 New translations client.en.yml (Nepali) 2022-02-06 21:49:04 -08:00
Keegan George
9aefb688a9 New translations client.en.yml (Lao) 2022-02-06 21:49:03 -08:00
Keegan George
2f2072509d New translations client.en.yml (Oromo) 2022-02-06 21:49:02 -08:00
Keegan George
56b795af5d New translations client.en.yml (Esperanto) 2022-02-06 21:49:01 -08:00
Keegan George
3ee4aaf083 New translations client.en.yml (Bengali) 2022-02-06 21:48:59 -08:00
Keegan George
7563608b45 New translations client.en.yml (Tamil) 2022-02-06 21:48:58 -08:00
Keegan George
9f25125510 New translations client.en.yml (Macedonian) 2022-02-06 21:48:57 -08:00
Keegan George
b5022cc07b New translations client.en.yml (Lithuanian) 2022-02-06 21:48:56 -08:00
Keegan George
15a653ddd9 New translations client.en.yml (Kurdish) 2022-02-06 21:48:55 -08:00
Keegan George
56af532903 New translations client.en.yml (Korean) 2022-02-06 21:48:54 -08:00
Keegan George
24752365f7 New translations client.en.yml (Georgian) 2022-02-06 21:48:53 -08:00
Keegan George
eb3c190649 New translations client.en.yml (Japanese) 2022-02-06 21:48:52 -08:00
Keegan George
14f79bd4c8 New translations client.en.yml (Italian) 2022-02-06 21:48:51 -08:00
Keegan George
462b8fef72 New translations client.en.yml (Armenian) 2022-02-06 21:48:50 -08:00
Keegan George
0dc9cdd86a New translations client.en.yml (Hungarian) 2022-02-06 21:48:49 -08:00
Keegan George
9d95ec8811 New translations client.en.yml (Hebrew) 2022-02-06 21:48:48 -08:00
Keegan George
12c37bd733 New translations client.en.yml (Mongolian) 2022-02-06 21:48:47 -08:00
Keegan George
a57d1b5043 New translations client.en.yml (Finnish) 2022-02-06 21:48:46 -08:00
Keegan George
c07337de2e New translations client.en.yml (Greek) 2022-02-06 21:48:45 -08:00
Keegan George
3f56dc9134 New translations client.en.yml (German) 2022-02-06 21:48:44 -08:00
Keegan George
18b28f5b80 New translations client.en.yml (Danish) 2022-02-06 21:48:43 -08:00
Keegan George
421e64ac46 New translations client.en.yml (Czech) 2022-02-06 21:48:42 -08:00
Keegan George
76bf5631e1 New translations client.en.yml (Catalan) 2022-02-06 21:48:41 -08:00
Keegan George
eb9c443484 New translations client.en.yml (Bulgarian) 2022-02-06 21:48:40 -08:00
Keegan George
df9494e461 New translations client.en.yml (Belarusian) 2022-02-06 21:48:39 -08:00
Keegan George
c57c551129 New translations client.en.yml (Arabic) 2022-02-06 21:48:38 -08:00
Keegan George
22b9698f2b New translations client.en.yml (Afrikaans) 2022-02-06 21:48:37 -08:00
Keegan George
1c4422d7e2 New translations client.en.yml (Spanish) 2022-02-06 21:48:36 -08:00
Keegan George
15539eb0c3 New translations client.en.yml (Basque) 2022-02-06 21:48:35 -08:00
Keegan George
681ba4e5b4 New translations client.en.yml (French) 2022-02-06 21:48:34 -08:00
Keegan George
0f58fe5aab New translations client.en.yml (Dutch) 2022-02-06 21:48:33 -08:00
Keegan George
27396538ad New translations client.en.yml (Punjabi) 2022-02-06 21:48:32 -08:00
Keegan George
24be61e593 New translations client.en.yml (Khmer) 2022-02-06 21:48:31 -08:00
Keegan George
f967f792d2 New translations client.en.yml (Persian) 2022-02-06 21:48:30 -08:00
Keegan George
7bea8c1c12 New translations client.en.yml (Indonesian) 2022-02-06 21:48:29 -08:00
Keegan George
a75fc1f2d4 New translations client.en.yml (Icelandic) 2022-02-06 21:48:28 -08:00
Keegan George
1b69c1919a New translations client.en.yml (Galician) 2022-02-06 21:48:26 -08:00
Keegan George
3a922f7a93 New translations client.en.yml (Vietnamese) 2022-02-06 21:48:25 -08:00
Keegan George
a0688b81a2 New translations client.en.yml (Urdu (Pakistan)) 2022-02-06 21:48:24 -08:00
Keegan George
8dc59745e6 New translations client.en.yml (Zulu) 2022-02-06 21:48:23 -08:00
Keegan George
1d1ac820f5 New translations client.en.yml (Chinese Traditional) 2022-02-06 21:48:22 -08:00
Keegan George
69942a8a58 New translations client.en.yml (Norwegian) 2022-02-06 21:48:22 -08:00
Keegan George
a5fd54a3ee New translations client.en.yml (Chinese Simplified) 2022-02-06 21:48:21 -08:00
Keegan George
5e231c3e7b New translations client.en.yml (Turkish) 2022-02-06 21:48:19 -08:00
Keegan George
3df6fcbf0c New translations client.en.yml (Swedish) 2022-02-06 21:48:18 -08:00
Keegan George
ec650a1f67 New translations client.en.yml (Serbian (Cyrillic)) 2022-02-06 21:48:18 -08:00
Keegan George
bed0483e64 New translations client.en.yml (Albanian) 2022-02-06 21:48:16 -08:00
Keegan George
5b3550bdde New translations client.en.yml (Slovenian) 2022-02-06 21:48:15 -08:00
Keegan George
b1d5c888c4 New translations client.en.yml (Slovak) 2022-02-06 21:48:14 -08:00
Keegan George
91c9644fb1 New translations client.en.yml (Russian) 2022-02-06 21:48:13 -08:00
Keegan George
71c101290c New translations client.en.yml (Portuguese) 2022-02-06 21:48:12 -08:00
Keegan George
87f7b22103 New translations client.en.yml (Polish) 2022-02-06 21:48:11 -08:00
Keegan George
47df65292c New translations client.en.yml (Ukrainian) 2022-02-06 21:48:10 -08:00
Keegan George
f0f16ce4dc New translations client.en.yml (Romanian) 2022-02-06 21:48:09 -08:00
Faizaan Gagan
f0580d2bba
FEATURE: allow tags from tag field to be confined to a tag group (#175)
* FEATURE: allow tag field to be confined to a tag group

* fixed linting

* bump minor version

* moved monkeypatch to a separate module

* use snake case for variable names

* added specs
2022-02-07 11:10:52 +05:30
Keegan George
676d538da2
i18n: Update Translations (#173)
* New translations client.en.yml (Romanian)

* New translations client.en.yml (Ukrainian)

* New translations client.en.yml (Polish)

* New translations client.en.yml (Portuguese)

* New translations client.en.yml (Russian)

* New translations client.en.yml (Slovak)

* New translations client.en.yml (Slovenian)

* New translations client.en.yml (Albanian)

* New translations client.en.yml (Serbian (Cyrillic))

* New translations client.en.yml (Swedish)

* New translations client.en.yml (Turkish)

* New translations client.en.yml (Chinese Simplified)

* New translations client.en.yml (Norwegian)

* New translations client.en.yml (Chinese Traditional)

* New translations client.en.yml (Zulu)

* New translations client.en.yml (Urdu (Pakistan))

* New translations client.en.yml (Vietnamese)

* New translations client.en.yml (Galician)

* New translations client.en.yml (Icelandic)

* New translations client.en.yml (Indonesian)

* New translations client.en.yml (Persian)

* New translations client.en.yml (Khmer)

* New translations client.en.yml (Punjabi)

* New translations client.en.yml (Dutch)

* New translations client.en.yml (French)

* New translations client.en.yml (Basque)

* New translations client.en.yml (Spanish)

* New translations client.en.yml (Afrikaans)

* New translations client.en.yml (Arabic)

* New translations client.en.yml (Belarusian)

* New translations client.en.yml (Bulgarian)

* New translations client.en.yml (Catalan)

* New translations client.en.yml (Czech)

* New translations client.en.yml (Danish)

* New translations client.en.yml (German)

* New translations client.en.yml (Greek)

* New translations client.en.yml (Finnish)

* New translations client.en.yml (Mongolian)

* New translations client.en.yml (Hebrew)

* New translations client.en.yml (Hungarian)

* New translations client.en.yml (Armenian)

* New translations client.en.yml (Italian)

* New translations client.en.yml (Japanese)

* New translations client.en.yml (Georgian)

* New translations client.en.yml (Korean)

* New translations client.en.yml (Kurdish)

* New translations client.en.yml (Lithuanian)

* New translations client.en.yml (Macedonian)

* New translations client.en.yml (Tamil)

* New translations client.en.yml (Bengali)

* New translations server.en.yml (Finnish)

* New translations server.en.yml (Arabic)

* New translations server.en.yml (Belarusian)

* New translations server.en.yml (Bulgarian)

* New translations server.en.yml (Catalan)

* New translations server.en.yml (Czech)

* New translations server.en.yml (Danish)

* New translations server.en.yml (German)

* New translations server.en.yml (Greek)

* New translations server.en.yml (Basque)

* New translations server.en.yml (Hebrew)

* New translations server.en.yml (Spanish)

* New translations server.en.yml (Hungarian)

* New translations server.en.yml (Armenian)

* New translations server.en.yml (Italian)

* New translations server.en.yml (Japanese)

* New translations server.en.yml (Georgian)

* New translations server.en.yml (Korean)

* New translations server.en.yml (Kurdish)

* New translations server.en.yml (Lithuanian)

* New translations server.en.yml (Macedonian)

* New translations server.en.yml (Mongolian)

* New translations server.en.yml (Afrikaans)

* New translations server.en.yml (French)

* New translations client.en.yml (Thai)

* New translations client.en.yml (Welsh)

* New translations client.en.yml (Croatian)

* New translations client.en.yml (Kazakh)

* New translations client.en.yml (Estonian)

* New translations client.en.yml (Latvian)

* New translations client.en.yml (Azerbaijani)

* New translations client.en.yml (Hindi)

* New translations client.en.yml (Malay)

* New translations client.en.yml (Telugu)

* New translations client.en.yml (Tagalog)

* New translations client.en.yml (Yiddish)

* New translations client.en.yml (Esperanto)

* New translations server.en.yml (Romanian)

* New translations client.en.yml (Tatar)

* New translations client.en.yml (Malayalam)

* New translations client.en.yml (Tibetan)

* New translations client.en.yml (Bosnian)

* New translations client.en.yml (Kannada)

* New translations client.en.yml (Swahili)

* New translations client.en.yml (Nepali)

* New translations client.en.yml (Lao)

* New translations client.en.yml (Oromo)

* New translations client.en.yml (Sindhi)

* New translations server.en.yml (Dutch)

* New translations server.en.yml (Norwegian)

* New translations server.en.yml (Welsh)

* New translations server.en.yml (Kazakh)

* New translations server.en.yml (Estonian)

* New translations server.en.yml (Latvian)

* New translations server.en.yml (Azerbaijani)

* New translations server.en.yml (Hindi)

* New translations server.en.yml (Malay)

* New translations server.en.yml (Telugu)

* New translations server.en.yml (Tagalog)

* New translations server.en.yml (Yiddish)

* New translations server.en.yml (Esperanto)

* New translations server.en.yml (Thai)

* New translations server.en.yml (Tatar)

* New translations server.en.yml (Malayalam)

* New translations server.en.yml (Tibetan)

* New translations server.en.yml (Bosnian)

* New translations server.en.yml (Kannada)

* New translations server.en.yml (Swahili)

* New translations server.en.yml (Nepali)

* New translations server.en.yml (Lao)

* New translations server.en.yml (Oromo)

* New translations server.en.yml (Croatian)

* New translations server.en.yml (Bengali)

* New translations server.en.yml (Punjabi)

* New translations server.en.yml (Ukrainian)

* New translations server.en.yml (Polish)

* New translations server.en.yml (Portuguese)

* New translations server.en.yml (Russian)

* New translations server.en.yml (Slovak)

* New translations server.en.yml (Slovenian)

* New translations server.en.yml (Albanian)

* New translations server.en.yml (Serbian (Cyrillic))

* New translations server.en.yml (Swedish)

* New translations server.en.yml (Turkish)

* New translations server.en.yml (Chinese Simplified)

* New translations server.en.yml (Tamil)

* New translations server.en.yml (Chinese Traditional)

* New translations server.en.yml (Zulu)

* New translations server.en.yml (Urdu (Pakistan))

* New translations server.en.yml (Vietnamese)

* New translations server.en.yml (Galician)

* New translations server.en.yml (Icelandic)

* New translations server.en.yml (Indonesian)

* New translations server.en.yml (Persian)

* New translations server.en.yml (Khmer)

* New translations server.en.yml (Sindhi)

* New translations client.en.yml (Serbian (Cyrillic))

* New translations client.en.yml (Chinese Simplified)

* New translations client.en.yml (Chinese Traditional)

* New translations server.en.yml (Serbian (Cyrillic))

* New translations server.en.yml (Chinese Simplified)

* New translations server.en.yml (Chinese Traditional)

* bump version

* New translations server.en.yml (Romanian)

* New translations server.en.yml (Ukrainian)

* New translations server.en.yml (Polish)

* New translations server.en.yml (Portuguese)

* New translations server.en.yml (Russian)

* New translations server.en.yml (Slovak)

* New translations server.en.yml (Slovenian)

* New translations server.en.yml (Albanian)

* New translations server.en.yml (Serbian (Cyrillic))

* New translations server.en.yml (Swedish)

* New translations server.en.yml (Turkish)

* New translations server.en.yml (Chinese Simplified)

* New translations server.en.yml (Norwegian)

* New translations server.en.yml (Chinese Traditional)

* New translations server.en.yml (Zulu)

* New translations server.en.yml (Urdu (Pakistan))

* New translations server.en.yml (Vietnamese)

* New translations server.en.yml (Galician)

* New translations server.en.yml (Icelandic)

* New translations server.en.yml (Indonesian)

* New translations server.en.yml (Persian)

* New translations server.en.yml (Khmer)

* New translations server.en.yml (Punjabi)

* New translations server.en.yml (Dutch)

* New translations server.en.yml (French)

* New translations server.en.yml (Basque)

* New translations server.en.yml (Spanish)

* New translations server.en.yml (Afrikaans)

* New translations server.en.yml (Arabic)

* New translations server.en.yml (Belarusian)

* New translations server.en.yml (Bulgarian)

* New translations server.en.yml (Catalan)

* New translations server.en.yml (Czech)

* New translations server.en.yml (Danish)

* New translations server.en.yml (German)

* New translations server.en.yml (Greek)

* New translations server.en.yml (Finnish)

* New translations server.en.yml (Mongolian)

* New translations server.en.yml (Hebrew)

* New translations server.en.yml (Hungarian)

* New translations server.en.yml (Armenian)

* New translations server.en.yml (Italian)

* New translations server.en.yml (Japanese)

* New translations server.en.yml (Georgian)

* New translations server.en.yml (Korean)

* New translations server.en.yml (Kurdish)

* New translations server.en.yml (Lithuanian)

* New translations server.en.yml (Macedonian)

* New translations server.en.yml (Tamil)

* New translations server.en.yml (Bengali)

* New translations server.en.yml (Esperanto)

* New translations server.en.yml (Oromo)

* New translations server.en.yml (Lao)

* New translations server.en.yml (Nepali)

* New translations server.en.yml (Swahili)

* New translations server.en.yml (Kannada)

* New translations server.en.yml (Bosnian)

* New translations server.en.yml (Tibetan)

* New translations server.en.yml (Malayalam)

* New translations server.en.yml (Tatar)

* New translations server.en.yml (Welsh)

* New translations server.en.yml (Thai)

* New translations server.en.yml (Yiddish)

* New translations server.en.yml (Tagalog)

* New translations server.en.yml (Telugu)

* New translations server.en.yml (Malay)

* New translations server.en.yml (Hindi)

* New translations server.en.yml (Azerbaijani)

* New translations server.en.yml (Latvian)

* New translations server.en.yml (Estonian)

* New translations server.en.yml (Kazakh)

* New translations server.en.yml (Croatian)

* New translations server.en.yml (Sindhi)

Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
2022-02-01 12:20:18 +05:30
Faizaan Gagan
8d2dbd565e
FIX: increase width to accomodate long category names (#178)
* FIX: increase width to accomodate long category names

* version bump
2022-01-31 16:21:23 +05:30
Angus McLeod
f92c2cd574
FIX: Wizard id increment fix (#177)
* increment object ids based on last object id

* Bump version

* Apply prettier
2022-01-31 15:12:26 +05:30
Faizaan Gagan
51553bc71d
FEATURE: validate liquid templates on wizard save (#156)
* DEV: validate liquid templates on wizard save

* minor fix

* code improvements and spec

* version bump

* fixed failing specs

* FIX: handle displaying backend validation errors on frontend

* fixed linting

* improved error display

* validate raw description for steps

* refactor conditional

* Identify attribute with liquid template error and pass syntax error

Co-authored-by: angusmcleod <angus@mcleod.org.au>
Co-authored-by: Angus McLeod <angusmcleod@users.noreply.github.com>
2022-01-31 15:11:14 +05:30
Angus McLeod
5e5b5e67ee
FIX: Cache valid directs and only allow one type in a template (#176)
* Cache valid directs and only allow one type in a template

* Add spec

* Bump version

* Bump version

* Exclude current wizard from other_after_signup
2022-01-31 14:48:04 +05:30
Angus McLeod
5bbb36e213
Merge pull request #151 from paviliondev/wizard-permissions
FIX: grant reply/edit permissions to topic author
2022-01-31 16:04:38 +08:00
Faizaan Gagan
f5a35baa1b simplified logic 2022-01-31 12:50:20 +05:30
Faizaan Gagan
5d882d69a2 merged 'main' and resolved conflicts 2022-01-31 09:47:12 +05:30
angusmcleod
4605b23585 Merge branch 'main' into pro-release 2022-01-27 17:51:24 +08:00
Keegan George
c9e243f3d8
DEV: Add PR title for translations 2022-01-26 09:37:31 -08:00
Keegan George
9f0b08a37e Update Crowdin configuration file 2022-01-26 06:20:50 -08:00
angusmcleod
02e931ae08 Update plugin-linting.yml 2021-12-22 16:49:24 +08:00
angusmcleod
43c4a1e0d6 COMPATIBILITY: composer editor compatibility updates 2021-12-22 16:41:38 +08:00
angusmcleod
41b5ba4f31 FIX: cleanup mixin requires 2021-12-22 12:35:47 +08:00
Angus McLeod
3ffb0a9c2a
Merge pull request #169 from martin-brennan/issue/replace-image-uploader-with-uppy-image-uploader
FIX: Use uppy-image-uploader instead of image-uploader
2021-12-22 12:14:51 +08:00
angusmcleod
b74dfcc3f8 Increment patch version 2021-12-22 12:12:48 +08:00
Martin Brennan
7f065d91a1
FIX: Use uppy-image-uploader instead of image-uploader
The image-uploader component is deprecated and will
be removed shortly in Discourse core. The new component
is functionally equivalent.
2021-12-21 15:15:11 +10:00
Angus McLeod
517da30a4c
DEV: Use uppy in upload field (#167)
* Move from jquery uploads to uppy.js

* Apply prettier and update version
2021-12-16 13:56:44 +05:30
angusmcleod
b37f7dbdd5 DEV: preview template style improvements 2021-12-14 09:11:23 +08:00
Angus McLeod
1c31097078
Merge pull request #155 from paviliondev/create_topic_button_override
FEATURE: allow 'New Topic' button to redirect to a wizard
2021-12-09 10:09:29 +08:00
angusmcleod
70c3f19334 Update settings text and file naming 2021-12-09 09:53:10 +08:00
Faizaan Gagan
21b0d52b1b cleanup 2021-12-08 12:56:14 +05:30
Faizaan Gagan
9c98887437 optional chaining to prevent errors 2021-12-08 12:50:57 +05:30
Faizaan Gagan
1a08c9b0c0 merged 'main' and resolved conflicts 2021-12-08 12:30:37 +05:30
Faizaan Gagan
00682fb4c2
FIX: field validation was not working in backend (#165)
* FIX: field validation was not working in backend

* added tests
2021-12-07 14:20:34 +05:30
Faizaan Gagan
460d4e397a fixed linting 2021-12-07 14:01:39 +05:30
Tim Santos
757b382345
Update .discourse-compatibility (#161) 2021-12-06 11:49:09 +05:30
Angus McLeod
b95639b315
Merge pull request #163 from paviliondev/uploader_compatibility_fixes
COMPATIBILITY: support new uploader
2021-12-01 16:38:07 +08:00
angusmcleod
1ad9691e49 COMPATIBILITY: support new uploader 2021-12-01 15:19:14 +08:00
angusmcleod
7af77533ba Add https to notice requests 2021-11-25 14:38:16 +08:00
Angus McLeod
ce0335b679
Merge pull request #159 from paviliondev/fix_date_time_display
FIX: pass a fallback format to date picker
2021-11-22 09:24:25 +08:00
Faizaan Gagan
c271612fa9 minor formatting 2021-11-22 01:40:50 +05:30
Faizaan Gagan
3cb7e1fffb set a fallback if no date format is passed 2021-11-22 01:23:12 +05:30
Faizaan Gagan
342fe53a4d remove unused import 2021-11-22 00:38:43 +05:30
Faizaan Gagan
acd27cd380 FIX: don't pass format to date picker 2021-11-22 00:30:29 +05:30
Faizaan Gagan
ac944dbb3e FIX: Discourse.BaseUrl no longer works 2021-11-21 11:22:36 +05:30
Faizaan Gagan
80d470b25d FIX: add import, fix deprication 2021-11-21 10:41:44 +05:30
angusmcleod
fac8d821cf publish notice count at the end of the update cycle 2021-11-18 17:07:15 +08:00
angusmcleod
e1a746ca28 Add pluginId and console.logs 2021-11-18 16:32:23 +08:00
angusmcleod
559d3f4f19 Use iso times for the notice timestamps 2021-11-18 16:05:32 +08:00
Faizaan Gagan
cdafffea2b use proper structure for preloading category custom fields 2021-11-17 20:15:48 +05:30
Angus McLeod
75d881de06
Merge pull request #157 from paviliondev/add_notice_inbox
Add notice inbox
2021-11-17 21:04:52 +08:00
angusmcleod
49538d554d Linting 2021-11-17 20:48:11 +08:00
angusmcleod
853634be27 Fix failing specs 2021-11-17 20:26:44 +08:00
angusmcleod
98061c14e8 Fix spec (mostly) 2021-11-17 20:26:44 +08:00
angusmcleod
81bb7e56c2 WIP 2021-11-17 20:26:44 +08:00
Angus McLeod
bbd1253891
Merge pull request #147 from paviliondev/pro-release-api
Pro release api
2021-11-17 20:18:54 +08:00
Faizaan Gagan
892914d649 fixed formatting 2021-11-11 17:38:53 +05:30
Faizaan Gagan
f044ad6101 bump version 2021-11-11 17:22:54 +05:30
Faizaan Gagan
564985e46e FEATURE: allow 'New Topic' button to redirect to a wizard 2021-11-11 17:20:42 +05:30
angusmcleod
457463f7c7 Add blankspace 2021-11-10 22:25:42 +08:00
merefield
e37b2a6e85 Remove semi colon! 2021-11-09 15:04:04 +00:00
merefield
584ee6d24e remove redundant returns 2021-11-09 15:01:17 +00:00
merefield
c6b8e08e38 Add subscription level logic to back-end validation 2021-11-09 14:57:33 +00:00
angusmcleod
9ab441f888 Update plugin metadata 2021-11-09 20:38:53 +08:00
merefield
14a337e00c template lint 2021-11-02 09:11:30 +00:00
merefield
3add43e81b eslint 2021-11-02 09:09:06 +00:00
merefield
8cbc8745b9 prettier 2021-11-02 09:06:00 +00:00
merefield
bd5edaffe9 custom field input: further make generic, fix serializers dropdown 2021-11-02 08:58:15 +00:00
Faizaan Gagan
51dbf7ac40
FIX: handle non-logged in user trying to skip wizard (#154)
* FIX: handle non-logged in user trying to skip wizard

* update version, fixed formatting

* make sure skipping user is logged in
2021-11-02 13:41:46 +05:30
Faizaan Gagan
4b0008ee52 version bump 2021-10-30 16:09:38 +05:30
Faizaan Gagan
b7575a3295 use standard naming for custom fields 2021-10-30 16:07:16 +05:30
Faizaan Gagan
dec5f5b5ce added more specs and fixed formatting 2021-10-30 16:03:30 +05:30
Faizaan Gagan
c1481e2ad4 Merge branch 'main' into wizard-permissions 2021-10-30 14:29:32 +05:30
angusmcleod
b9b80ecc63 FIX: use object property shorthand to make linter happy 2021-10-28 09:55:50 +08:00
Angus McLeod
c2864b9790
Merge pull request #153 from paviliondev/conditionality_fix
Conditionality Fix
2021-10-28 09:46:14 +08:00
merefield
a3d59caee8 yet more linting fixes 2021-10-27 15:05:09 +01:00
merefield
203876e927 linting fixes 2021-10-27 15:01:29 +01:00
merefield
60388b7dab fix more linting errors 2021-10-27 14:52:22 +01:00
merefield
31b4663b3f Fix linting errors 2021-10-27 14:41:49 +01:00
merefield
0c9acb9b20 Update subscription titles 2021-10-27 14:31:24 +01:00
merefield
0752f8068a fix subscription spec 2021-10-27 14:09:34 +01:00
merefield
791eab6c47 Fix action spec example 2021-10-27 14:02:21 +01:00
merefield
36257fbdfe fix excon call 2021-10-27 13:59:50 +01:00
merefield
9350db5424 REFACTOR: abstract subscription logic to reduce code 2021-10-25 18:55:28 +01:00
merefield
7b129debac partial generalisation of subscription logic 2021-10-25 15:31:44 +01:00
merefield
a806e14c64 Admin custom fields subscription differentiation 2021-10-23 13:06:12 +01:00
merefield
5334d12f10 format code 2021-10-22 19:57:16 +01:00
merefield
fbab8d89a5 Update action dropdown behaviour to show sub level 2021-10-22 19:56:00 +01:00
merefield
41e0f13b25 update subscription types 2021-10-22 19:24:28 +01:00
merefield
50176b400d more rubocop 2021-10-22 19:07:45 +01:00
merefield
0b8fced879 rubocop changes 2021-10-22 19:04:37 +01:00
merefield
30fe73570a remove triple curlies 2021-10-22 15:38:38 +01:00
angusmcleod
a9af086252 bump version: patch
@fzngagan I don't think this qualifies as a new feature, as it's a bugfix plus a related UI update to make the UX of an existing feature clearer
2021-10-20 22:03:42 +08:00
angusmcleod
ede6752619 Apply prettier 2021-10-20 22:00:30 +08:00
angusmcleod
5abc0f4a4c IMPROVE: Add value type to mapper selector 2021-10-20 21:56:34 +08:00
angusmcleod
f908e5ec9d Add spec for fix 2021-10-20 21:19:21 +08:00
angusmcleod
805e934fdf FIX: cast both key and value as boolean if operator is `is:[true|false]` 2021-10-20 20:48:38 +08:00
merefield
b4f463778d fix linting issues 2021-10-19 13:49:06 +01:00
merefield
b616adaf71 fix linting 2021-10-19 13:13:32 +01:00
merefield
487ad3c46d Fix test 2021-10-19 13:09:11 +01:00
angusmcleod
231051d8ea Update status domains 2021-10-19 16:08:03 +08:00
angusmcleod
774cf70efc IMPROVE: remove custom paragraph line-height 2021-10-19 15:16:54 +08:00
Angus McLeod
69153a7379
IMPROVE: Add plugin metadata workflow with version check (#149)
* IMPROVE: Add plugin metadata workflow with version check

* Update error message

* Fix workflow keys

* Update plugin-metadata.yml

* Update plugin-metadata.yml

* Update plugin-metadata.yml

* bump version

* Update plugin-metadata.yml

* Update plugin-metadata.yml

* Use npm semver to compare versions

* Fix syntax

* Add semver to package.json

* Update npm usage

* Update plugin-metadata.yml

* Update plugin-metadata.yml

* purposefully fail test

* Pass test
2021-10-19 09:11:16 +05:30
Faizaan Gagan
687c3530b3 WIP 2021-10-19 09:05:55 +05:30
Faizaan Gagan
d9d4c7d8fa WIP 2021-10-14 18:27:18 +05:30
merefield
deb4460d2c modify dropdown sub text slightly 2021-10-14 13:53:58 +01:00
merefield
a42e23d352 Show but differentiate unsubbed action options 2021-10-14 13:41:24 +01:00
Robert Barrow
a13096c8f1 merge in pro-release branch 2021-10-13 14:22:33 +01:00
angusmcleod
450f7bfc25 Update notice.rb 2021-10-13 19:32:49 +08:00
Robert Barrow
e5fbc408f5 Add failing API call test 2021-10-12 14:49:09 +01:00
Robert Barrow
3e2907abc2 show api for complete sub 2021-10-12 14:37:36 +01:00
Robert Barrow
d4e489456e rename functional levels 2021-10-12 13:01:39 +01:00
Robert Barrow
67cfeb6ed9 Distinguish actions which require additional subscription 2021-10-12 12:51:38 +01:00
Robert Barrow
14e7e9c0db improve api section switch 2021-10-12 09:54:52 +01:00
angusmcleod
702ccc868c Update connection_error.rb 2021-10-12 09:45:50 +08:00
angusmcleod
b475e39ee9 Fix specs 2021-10-07 21:19:19 +08:00
Angus McLeod
538d618ff3
FEATURE: Add mentionables integration (#148)
* Add mentionables integration

* fix linting issues

* bump version

* FIX: Use wizard site model

* FIX: apply prettier
2021-10-06 17:25:50 +05:30
angusmcleod
925c8c009a DEV: Add notice specs and UI updates 2021-10-05 20:54:06 +08:00
merefield
1f939c1ca0 API: only show API menu on business sub 2021-10-05 10:20:36 +01:00
merefield
31e275668c API: remove byebug 2021-10-05 10:19:47 +01:00
merefield
5a424e8e3d API: add mocked request spec 2021-10-05 10:07:20 +01:00
merefield
6056351b7c API: fix request call 2021-10-05 10:06:15 +01:00
angusmcleod
d4c25d406b DEV: add stable to github workflows 2021-10-05 14:33:27 +08:00
angusmcleod
1edfcca78b DEV: remove group log settings change from create_group action 2021-10-05 10:23:48 +08:00
merefield
a2ebd5c463 API: don't present an API menu entry if not subscribed 2021-10-04 18:51:47 +01:00
merefield
c9453a0bdd API: remove GET method from API options 2021-10-04 14:40:17 +01:00
angusmcleod
084c6f4a7a wip 2021-09-24 17:58:42 +08:00
Faizaan Gagan
2678ee153d
FEATURE: add resume wizard popup (#146)
* FEATURE: add resume wizard popup

* code cleanup, copy edits

* FIX: address functionality, setting and copy issues

@fzngagan a few issues fixed

1. The resume button wasn't working (old reference to ``resumeDialog`` remained in callback.
2. This needs a wizard setting
3. It's not necessary to serialize the first step separately. We have all the steps in ``steps`` and steps have indexes.
4. Button copy

* Fix linting

* Ensure aa submission exists

* Apply prettier

Co-authored-by: angusmcleod <angus@mcleod.org.au>
2021-09-22 13:52:05 +05:30
angusmcleod
270d3bccf5 IMPROVE: translation feature 2021-09-14 11:33:16 +08:00
Faizaan Gagan
11192182e7
DEV: bump version according to latest calculation (#141)
* bump version according to latest calculation

* bumped version for the current PR
2021-09-09 19:06:01 +05:30
angusmcleod
15668d37dc COMPATIBILITY: add new click-trap vendor 2021-09-09 15:13:02 +08:00
angusmcleod
10fb3ee176 Merge branch 'master' into pro-release 2021-09-09 14:39:49 +08:00
angusmcleod
2cd02a15fe COMPATIBILITY: remove removed vendor 2021-09-09 14:39:36 +08:00
angusmcleod
7b57e7fcab Apply new table style to wizard logs view 2021-09-09 14:07:12 +08:00
angusmcleod
a8e81150f1 Remove additional sentence from submissions.viewing 2021-09-08 18:25:30 +08:00
Angus McLeod
13304f5b6d
Merge pull request #144 from paviliondev/pro-features
Pro features
2021-09-07 21:58:14 +08:00
angusmcleod
4a0d176f1a Fix locale file 2021-09-07 20:55:46 +08:00
angusmcleod
18c43f499e Apply template lint 2021-09-07 20:53:45 +08:00
angusmcleod
ba897abf8e Apply eslint 2021-09-07 20:15:04 +08:00
angusmcleod
33824de1d1 Merge branch 'pro-features' of https://github.com/angusmcleod/discourse-custom-wizard into pro-features 2021-09-07 20:13:13 +08:00
angusmcleod
0313c773e8 Apply prettier 2021-09-07 20:13:01 +08:00
angusmcleod
7c9a0ef862 Apply rubocop 2021-09-07 20:11:50 +08:00
Angus McLeod
f4d419cac2
Merge branch 'pro-release' into pro-features 2021-09-07 20:10:12 +08:00
angusmcleod
23c4b45195 Add pro feature specs 2021-09-07 20:06:13 +08:00
angusmcleod
61f7cf64af COMPATIBILITY: add new vendor require 2021-09-07 11:11:59 +08:00
angusmcleod
208cb1229a FIX: Minor bugfixes in manager and create_group action 2021-09-07 11:11:29 +08:00
Angus McLeod
3383aec37f
Merge pull request #142 from paviliondev/ui_conventions
UX: Update Submissions Admin UI
2021-09-06 22:51:52 +08:00
angusmcleod
5063e3eaeb Merge branch 'ui_conventions' of https://github.com/paviliondev/discourse-custom-wizard into pr/142 2021-09-06 17:26:34 +08:00
angusmcleod
31b9e48c8f Apply rubocop 2021-09-06 17:26:22 +08:00
angusmcleod
f6c3c98d71 Add submission serializer spec 2021-09-06 17:25:08 +08:00
angusmcleod
8ddff9873d Merge branch 'master' of https://github.com/angusmcleod/discourse-custom-wizard 2021-09-06 10:57:44 +08:00
angusmcleod
1d70232952 COMPATIBILITY: update stable commit after rebase 2021-09-06 10:53:53 +08:00
angusmcleod
4b20542251 COMPATIBILITY: pin current stable prior to tests-passed compatibility changes 2021-09-06 10:52:32 +08:00
angusmcleod
a5b0cf95ba COMPATIBILITY: Add new textarea-text-manipulation mixin 2021-09-06 10:52:32 +08:00
angusmcleod
9db8ce908a COMPATIBILITY: Add new composer-upload mixin 2021-09-06 10:52:32 +08:00
angusmcleod
e07a57e398 IMPROVE: by default every tag should be available in admin tag selector 2021-09-06 10:52:32 +08:00
angusmcleod
2362478c9c IMPROVE: by default every tag should be available in tag field 2021-09-06 10:52:32 +08:00
angusmcleod
481e9e668c IMPROVE: by default every tag should be available in admin tag selector 2021-09-06 10:45:41 +08:00
angusmcleod
8911862320 COMPATIBILITY: pin current stable prior to tests-passed compatibility changes 2021-09-06 10:30:04 +08:00
angusmcleod
8dbb3990e4 Remove test change 2021-09-03 16:46:43 +08:00
angusmcleod
6ef333a657 Complete pro-feature functionality 2021-09-03 16:46:32 +08:00
angusmcleod
65e269c71f IMPROVE: by default every tag should be available in tag field 2021-09-03 09:41:11 +08:00
Keegan George
c60d1e3338 DEV: Run Prettier 💄 2021-09-02 15:46:49 -07:00
Keegan George
4abe30464c DEV: Run Prettier💄 2021-09-02 15:43:34 -07:00
Keegan George
1e38001942 DEV: Run Prettier 💄 2021-09-02 15:41:55 -07:00
Keegan George
9fc2092951 DEV: Run prettier 💄 2021-09-02 15:38:30 -07:00
Angus McLeod
450a94e38d
Merge pull request #143 from paviliondev/split_log_messages
DEV: split log messages
2021-09-02 14:48:49 +08:00
Keegan George
7b13605c7b FIX: Resolve linting issues 2021-09-01 12:46:39 -07:00
Keegan George
622ab1b2ce Merge branch 'pro-release' of https://github.com/paviliondev/discourse-custom-wizard into ui_conventions 2021-09-01 12:38:09 -07:00
angusmcleod
d5f8c46f2c COMPATIBILITY: Add new textarea-text-manipulation mixin 2021-09-01 19:49:44 +08:00
KC Maddever
e34f2b5076 Merge branch 'pro-release' into split_log_messages 2021-09-01 16:51:28 +08:00
angusmcleod
403f063b0f Fix failing specs 2021-09-01 11:10:49 +08:00
angusmcleod
0e5fc756df Fix merge issues 2021-09-01 10:46:52 +08:00
angusmcleod
001d116298 Merge branch 'master' into pro-release 2021-09-01 10:37:50 +08:00
angusmcleod
6b1e7568c1 Improve PRO feature approach 2021-09-01 10:19:00 +08:00
Keegan George
280d2ffe54 IMPROVE: Make edit columns adjust submissions as well 2021-08-31 13:29:30 -07:00
KC Maddever
399cc9c220 DEV: rubocop 2021-08-31 14:43:21 +08:00
KC Maddever
c394656ed8 DEV: update tests for split log fields 2021-08-31 14:34:47 +08:00
KC Maddever
35ff172967 DEV: specify which fields to split in log data migration 2021-08-31 14:33:16 +08:00
KC Maddever
b79039c2e2 DEV: save logs with split fields 2021-08-31 14:33:16 +08:00
KC Maddever
aa928c319e DEV: add data migration to split out log fields 2021-08-31 14:33:16 +08:00
angusmcleod
8eced70f60 COMPATIBILITY: Add new composer-upload mixin 2021-08-31 11:25:06 +08:00
Keegan George
0bc151fc7b WIP: Edit Columns modal functionality
Currently modal and edit columns works but removes only field and not corresponding submission.
2021-08-30 16:33:48 -07:00
Keegan George
d74d3d25be UX: Display submission fields unique to each type 2021-08-30 16:23:33 -07:00
Keegan George
466229af0b Merge branch 'ui_conventions' of https://github.com/paviliondev/discourse-custom-wizard into ui_conventions 2021-08-30 11:58:19 -07:00
angusmcleod
03fb7b7ada WIP: update field data handling to support column toggling 2021-08-25 09:59:24 +08:00
Angus McLeod
e865516f48
Merge pull request #138 from paviliondev/maybe_later_bug
FIX: clear submission if skipped by user
2021-08-23 14:12:48 +08:00
Faizaan Gagan
0b20c6ff81 removed redundant method 2021-08-23 10:38:02 +05:30
Faizaan Gagan
1916335fa9 FIX: use class method as alias for instance method 2021-08-23 03:00:14 +05:30
angusmcleod
a810155f91 Clean up pro constants 2021-08-18 14:59:43 +08:00
angusmcleod
eadc40bdae Add CustomWizard class protections and pro feature restrictions 2021-08-18 14:11:00 +08:00
angusmcleod
eff1d2c7d2 Merge branch 'master' into pro-features 2021-08-17 19:35:10 +08:00
Faizaan Gagan
e260241dea group specs related to skip functionality in a context 2021-08-13 18:58:41 +05:30
Faizaan Gagan
3c70b712bf remove redundant reset method 2021-08-13 18:57:20 +05:30
Faizaan Gagan
4578cb0a24 use existing method to reset user's progress 2021-08-13 18:56:38 +05:30
Faizaan Gagan
61c92ec768 FIX: reset user's progress on wizard skip 2021-08-13 17:49:31 +05:30
Faizaan Gagan
bfa190e98b Revert "FIX: reset step progress on wizard skip"
This reverts commit 0d2f3d1cb5.
2021-08-13 02:55:25 +05:30
Faizaan Gagan
0d2f3d1cb5 FIX: reset step progress on wizard skip 2021-08-12 20:02:04 +05:30
Faizaan Gagan
249cda4de6 Merge branch 'master' into maybe_later_bug 2021-08-12 19:57:38 +05:30
Faizaan Gagan
973cffee26
FIX: disable string caching in Oj gem while running specs (#139) 2021-08-12 19:56:17 +05:30
Faizaan Gagan
89f733ae32 added spec to verify functionality 2021-08-12 17:11:58 +05:30
angusmcleod
e81b773512 Move pro conditions out of advanced section 2021-08-10 17:18:49 +08:00
Faizaan Gagan
dee3691cd0 fix formatting 2021-08-10 14:35:56 +05:30
Faizaan Gagan
c1fc2fd0e4 FIX: clear submission if skipped by user 2021-08-10 14:31:59 +05:30
angusmcleod
f49f516403 Add pro restriction 2021-08-10 17:00:42 +08:00
angusmcleod
a7904a28af Update pro admin title attributes 2021-08-10 15:32:21 +08:00
angusmcleod
a27c222dc6 Update authentication and subscription handling 2021-08-10 14:45:23 +08:00
Keegan George
ae271ce647
UX: Add support button to admin-nav (#118)
* Add support button to admin-nav

* FIX: Security vulnerabilities with _blank anchor link

* Update pro support url

* UX: Create pro button custom styling

* UX: Merge support button focus styling with hover

* DEV: Move pro support url to setting

* UX: Change support button name to Pro Support

* DEV: Format stylesheet code

* DEV: Use variables and change selector specificity for pro button

* DEV: Hardcode pro-support url in button

* DEV: Remove support url localization

* DEV: Undo formatting fixes and add pro support button strings

* DEV: Undo formatting fixes auto applied

* DEV: Add space between selectors

* DEV: Convert scss variables to CSS Custom properties

* DEV: Fix linting

* FIX: Use SCSS variables for color manipulation functions

* DEV: Fix space before i18n

* DEV: Add new line at end of file

* DEV: Add new line at end of file

* DEV: Remove name attribute in localizations

* DEV: Remove padding from new line
2021-08-09 14:44:44 -07:00
Faizaan Gagan
f00d01c50f
FIX: ensure single incomplete submission existence (#136)
* created method to fetch incomplete submissions

* added new field 'updated_at' to submission schema

* Revert "created method to fetch incomplete submissions"

This reverts commit 15c65236e7.

* added logic to cleanup redundant incomplete submissions

* logic improvements and spec

* simplified the cleanup logic

* simplified the logic further

* early return to improve performance

* consolidated cleanup logic

* perform cleanup in wizard.update

* fixed issue

* minor fix

* use consistent naming
2021-08-02 13:01:49 +05:30
Faizaan Gagan
998757f857
FIX: apply text length validations for non-empty fields only (#137)
* apply text length validations for non-empty fields only

* consolidated logic

* fixed formatting

* fix formatting

* calculate length only for string type values

* fix assignment

* added specs
2021-07-30 16:03:48 +05:30
Faizaan Gagan
ee9e9a1d94 FIX: skip_guardian option is removed from discourse core 2021-07-28 19:01:09 +05:30
Keegan George
51038ade8a FIX: Update help text in wizard message bar 2021-07-26 10:44:08 -07:00
angusmcleod
55b92f4256 IMPROVE: Add additional data to submission serialiser 2021-07-21 11:31:03 +08:00
Angus McLeod
911a47db28
IMPROVE: Remove sortable and add manual step and field sorting (#135)
* IMPROVE: Remove sortable and add manual step and field sorting

* Apply eslint

* Apply prettier
2021-07-20 13:02:18 +05:30
Keegan George
543b676f53 Merge branch 'pro-release' of https://github.com/paviliondev/discourse-custom-wizard into ui_conventions 2021-07-19 09:30:48 -07:00
Keegan George
5f5adf93e4
Merge pull request #134 from paviliondev/admin-ui-support
IMPROVE: Admin UI support
2021-07-19 09:18:28 -07:00
Keegan George
bdc4044581 Merge branch 'pro-release' of https://github.com/paviliondev/discourse-custom-wizard into ui_conventions 2021-07-19 07:11:47 -07:00
Faizaan Gagan
247f7ca466 IMPROVE: reduce field placeholder setting textarea width 2021-07-14 13:32:19 +05:30
angusmcleod
1a78b44d35 Apply rubocop 2021-07-14 14:06:54 +08:00
angusmcleod
56a1463413 Apply prettier 2021-07-14 14:05:13 +08:00
angusmcleod
34fee3729c Add pagination to submissions 2021-07-14 14:04:19 +08:00
angusmcleod
7375c63403 Version bump 2021-07-13 12:03:11 +08:00
Angus McLeod
5aef8972ff
Merge pull request #125 from paviliondev/submission_improvements
Abstract and improve submission handling
2021-07-12 22:43:13 +08:00
Faizaan Gagan
ca10ae797a
FEATURE: new field type Composer Preview (#130)
* WIP

* composer preview field working

* remove redundant variable

* fix linting issues

* fix rubocop

* remove unnecessary entry

* consolidate preview generation code

* add styles for onebox

* add css for @ mentions

* fixed eslint issues

* FIX: ensure oneboxes load every time

* remove unused import

* fix prettier issues

* removed unused code

* remove unused imports

* fixed prettier issue

* improve css structure

* add csrf header in all cases
2021-07-12 17:05:05 +05:30
angusmcleod
d602281a6a Fix failing test 2021-07-12 16:39:37 +08:00
angusmcleod
dfd382cd8a Apply prettier 2021-07-12 16:01:52 +08:00
angusmcleod
56f58414b3 Remove meta keys from fields attribute and update submissions ui to handle new submission structure 2021-07-12 15:53:58 +08:00
angusmcleod
20c8ec1202 Merge branch 'master' into pr/125 2021-07-12 14:05:02 +08:00
Faizaan Gagan
d88d2b7d97
converted placeholder input to a textarea (#133) 2021-07-10 11:33:00 +05:30
Faizaan Gagan
e4df646022
FIX: clear site model cache to prevent spec failure (#132) 2021-07-08 13:04:03 +05:30
Faizaan Gagan
c9f90fb8ce FIX: text length validation bug 2021-07-07 11:50:56 +05:30
Angus McLeod
9293aaeabc
Merge pull request #131 from paviliondev/text-placeholder
FEATURE: placeholder setting for text type fields
2021-07-05 16:44:09 +10:00
Faizaan Gagan
d47950733d enabled interpolation and templating 2021-07-05 11:52:29 +05:30
Faizaan Gagan
21ac87cdda FEATURE: placeholder setting for text type fields 2021-07-03 15:41:49 +05:30
Faizaan Gagan
c2e51cba3a FIX: hide placeholder on field focus 2021-07-03 13:23:33 +05:30
Faizaan Gagan
e235a66b01 FIX: avoid translating pre-translated placeholder 2021-07-03 13:06:06 +05:30
Faizaan Gagan
d8f6f00e60
FIX: add csrf token to all wizard ajax requests in dev (#129)
* FIX: add csrf token to all wizard ajax requests in dev

* fix formatting

* simplified code

* Update field.rb
2021-07-01 11:25:31 +05:30
Faizaan Gagan
dc19b508ab Merge branch 'master' into submission_improvements 2021-06-29 16:19:23 +05:30
Penar Musaraj
0bd4dbd08b
DEV: Switch to CSS custom properties for colors (#127) 2021-06-29 13:19:28 +05:30
Faizaan Gagan
6d1958d772 Merge branch 'master' into submission_improvements 2021-06-28 13:54:03 +05:30
Angus McLeod
262f2d5628
Merge pull request #128 from paviliondev/fix-theme-lookup
DEV: fix compatibility with core theme architecture changes
2021-06-28 17:18:27 +10:00
Angus McLeod
8a9f3e1a3d
Merge pull request #114 from paviliondev/sprockets-fix
DEV: add new sprockets directive to require discourse folders
2021-06-28 12:17:47 +10:00
Faizaan Gagan
13faa849d8 minor formatting 2021-06-27 17:02:19 +05:30
Faizaan Gagan
9ec2da5a9f DEV: fix compatibility with core theme arch changes 2021-06-27 16:58:26 +05:30
Faizaan Gagan
be86c77a77
IMPROVE: cron schedule and use step output (#126)
* use step output for populating repo name

* schedule cron every 12 hours
2021-06-26 19:07:08 +05:30
Faizaan Gagan
28400ee24e Merge branch 'master' into sprockets-fix 2021-06-26 13:30:37 +05:30
Angus McLeod
f80f40d6b3
Apply consistent date validation on the server (using v8) (#124)
* Apply consistent date validation on the server (using v8)

* Variable fix

* added specs to verify date/time field validation

* minor text change

Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
2021-06-26 13:15:33 +05:30
Angus McLeod
7bfa0aff70
Apply format to new picker in wizard-date-input (#123) 2021-06-26 13:15:19 +05:30
angusmcleod
5a6856fcff COMPATIBILITY: categories are being loaded differently on Site model
See 0e4b8c5318
2021-06-25 11:45:22 +10:00
angusmcleod
3d9f6aac98 Ensure data is not nil 2021-06-23 17:02:21 +10:00
angusmcleod
39ee61b422 Update coverage 2021-06-23 16:17:18 +10:00
angusmcleod
098e8418fb Apply rubocop 2021-06-23 16:15:17 +10:00
angusmcleod
e441588aa3 Fix specs and tighten conditional handling 2021-06-23 16:13:58 +10:00
Keegan George
d8a24eb940 Merge https://github.com/paviliondev/discourse-custom-wizard into ui_conventions 2021-06-18 12:04:17 -07:00
Keegan George
dd8513a563 UX: Add wizard-message component to logs pane 2021-06-18 11:47:24 -07:00
Keegan George
582b9d82aa FIX: Missing refresh button icon in logs pane 2021-06-18 11:36:18 -07:00
Keegan George
10c7c8bcc0 UX: Change info message when selecting a wizard in the submissions pane 2021-06-18 11:25:51 -07:00
Keegan George
c490da3145 UX: Add wizard message component to submissions page 2021-06-18 10:25:01 -07:00
angusmcleod
d3c6733e59 Abstract and improve submission handling 2021-06-17 17:50:22 +10:00
Faizaan Gagan
7b9a54590b Merge branch 'master' into sprockets-fix 2021-06-16 14:28:55 +05:30
Angus McLeod
cc0b5fcf9f
Merge pull request #122 from paviliondev/final_step_single_submission_issue
Force second step build to overcome can_access? check
2021-06-16 16:42:35 +10:00
angusmcleod
dc7e43b6d7 Force second step build to overcome can_access? check
The can_access? check will fail if the wizard does not allow multiple submissions. This means that on the second build of the wizard on the final step of a single submission wizard, the wizard instance will have no steps, and an error will be thrown when logic assumes it does.
2021-06-16 16:21:24 +10:00
Angus McLeod
85bb23e70f
Merge pull request #120 from paviliondev/fix-paste-event
Ensure our custom paste logic is running
2021-06-16 15:01:31 +10:00
Angus McLeod
b2ed2c1dc7
Merge pull request #121 from paviliondev/cant_access_skip_bugfix
Cant access skip bugfix
2021-06-16 14:41:49 +10:00
angusmcleod
46bb28bb07 Fix linting 2021-06-16 14:26:28 +10:00
angusmcleod
33df6f9fbc Add test for skip when cant access 2021-06-16 14:24:07 +10:00
angusmcleod
9452907f0a Don't attempt to save submissions if the user can't access the wizard 2021-06-16 14:13:12 +10:00
angusmcleod
f742626786 Ensure our custom paste logic is running 2021-06-16 13:55:10 +10:00
Angus McLeod
58b3bc13c9
FIX: Ensure user_email and user_option attributes are handled properly (#119) 2021-06-15 11:48:17 +05:30
Angus McLeod
af3e61fe75
Add custom field improvements (#115)
* Add custom field improvements

This PR does a few things to improve our support of custom fields
1. Adds custom fields added by other plugins to the list in admin/wizards/custom-fields and the custom field list in the mapper selector
2. Adds support for json custom fields in the wizard actions

* Make eslint happy

* Make prettier happy

* Make rubocop happy

* Make ember template lint happy

* Don't assume we have the context in the selector

* Ensure custom fields don't require optional attributes (with tests)
2021-06-08 17:09:49 +05:30
Angus McLeod
f1f13065c8
Merge pull request #117 from paviliondev/ci-impr
FIX: populate repository name from global object and enable cron
2021-06-08 21:29:50 +10:00
Faizaan Gagan
48fbb61dcc FIX: populate repository name from global object 2021-06-08 16:10:00 +05:30
Angus McLeod
522d4e9489
IMPROVE: ensure redirect_to_wizard is cleaned up even if sidekiq is not working (#116)
* Add test of redirect_to_wizard when wizard is removed

* Make clear_user_wizard_redirect a synchronous operation
2021-06-07 18:45:41 +05:30
Angus McLeod
31a27cbb00
Merge pull request #113 from paviliondev/fix-locales
FIX: changed wizard id resolution logic
2021-05-31 08:45:09 +12:00
Faizaan Gagan
61ff018244 added spec 2021-05-30 18:30:51 +05:30
Faizaan Gagan
db72617b61 FIX: changed wizard id resolution logic 2021-05-18 16:10:43 +05:30
Faizaan Gagan
04f008575f
combine rspec run with coverage report (#101) 2021-05-17 14:00:23 +05:30
angusmcleod
c574ad7c32 Update package.json 2021-05-17 19:57:13 +12:00
angusmcleod
0c4eb02038 Exclude gems from simplecov 2021-05-17 19:57:09 +12:00
Angus McLeod
6cb5d62a7a
Merge pull request #109 from paviliondev/conditional-submission
FIX: filter conditionally excluded fields from wizard submission
2021-05-14 08:44:48 +12:00
Faizaan Gagan
ff14570d64 FIX: exclude conditional fields while saving step submission 2021-05-12 18:15:55 +05:30
Faizaan Gagan
a1e8070062 FIX: move sprockets customization to monkeypatch 2021-05-12 06:33:19 +05:30
Faizaan Gagan
eb5e2fe604 move sprockets logic outside after_initialize 2021-05-12 06:17:01 +05:30
Faizaan Gagan
a4adeecf5f Revert "Revert "DEV: add new sprockets directive to require discourse folders" (#111)"
This reverts commit ca125a2a8a.
2021-05-12 06:14:09 +05:30
Faizaan Gagan
8c61b9b1f3 Merge branch 'master' into conditional-submission 2021-05-12 03:11:40 +05:30
Faizaan Gagan
ca125a2a8a
Revert "DEV: add new sprockets directive to require discourse folders" (#111) 2021-05-12 02:58:12 +05:30
Angus McLeod
edbba891f6
Merge pull request #86 from paviliondev/sprockets-fix
DEV: add new sprockets directive to require discourse folders
2021-05-10 19:07:32 +12:00
Angus McLeod
580cc55445
Merge pull request #108 from paviliondev/upload-prettytext
FIX: set correct options while initializing PrettyText
2021-05-10 19:05:49 +12:00
Faizaan Gagan
4cacd84967 code formatting 2021-05-08 23:38:26 +05:30
Faizaan Gagan
3a3d23a317 added missing file 2021-05-08 23:18:58 +05:30
Faizaan Gagan
5f24882ef6 DEV: raise plugin specific errors on failure 2021-05-08 23:15:06 +05:30
Faizaan Gagan
c254a0c6b8 convert key to string 2021-05-07 04:02:56 +05:30
Faizaan Gagan
56268823c5 confine exclusion to wizard fields 2021-05-07 03:28:16 +05:30
Faizaan Gagan
957a32cf5a FIX: filter conditionally excluded fields from wizard submission 2021-05-05 13:13:03 +05:30
Faizaan Gagan
743af8edc5
FIX: breakage due to core changes (#107) 2021-05-05 11:35:53 +05:30
Faizaan Gagan
40c0c12719 FIX: set correct options while initializing PrettyText 2021-05-05 02:36:01 +05:30
Angus McLeod
aca0fab74e
Merge pull request #103 from paviliondev/checkbox-def
DEV: checkbox value should default to false
2021-05-03 17:55:33 +12:00
Faizaan Gagan
cdb9ec6c3e remove the directory after spec run 2021-05-03 04:19:27 +05:30
Faizaan Gagan
77dd879f80 minor formatting 2021-05-03 03:43:47 +05:30
Faizaan Gagan
13eabe0695 added specs 2021-05-03 03:42:26 +05:30
Faizaan Gagan
4a4c1934a0 revert client side change 2021-04-30 23:02:13 +05:30
Faizaan Gagan
887de25833 FIX: set checkbox field default value as false 2021-04-30 22:59:06 +05:30
Faizaan Gagan
848874ea1f
FIX: clicking Maybe Later was causing 500 error (#105) 2021-04-30 21:56:00 +05:30
Faizaan Gagan
c463e8b541 fix formatting 2021-04-29 12:18:09 +05:30
Faizaan Gagan
8aafb257fd DEV: checkbox value should default to false 2021-04-29 11:02:51 +05:30
Faizaan Gagan
f05d859007
Enable templating (#102)
* enabled templating for create topic action

* enabled templating for step and field descriptions

* FIX: don't run pretty text on step description

* FIX: step description should be cooked post template parsing
2021-04-23 17:21:41 +05:30
Angus McLeod
7d38337c84
Merge pull request #100 from paviliondev/step-conditionality-multiple
FIX: allow setting multiple conditions for entering a step
2021-04-23 17:08:55 +10:00
Faizaan Gagan
eb93169f86 use option multiple and aggregate the result 2021-04-23 12:22:04 +05:30
Faizaan Gagan
be1eab6092 minor formatting 2021-04-22 23:52:38 +05:30
Faizaan Gagan
2a8a4367d8 added specs 2021-04-22 23:50:54 +05:30
Faizaan Gagan
911140fde3 improved the logic to accomodate multiple conditions using 'or' 2021-04-22 23:50:26 +05:30
Faizaan Gagan
fb8cdab0fd merged master 2021-04-21 03:32:31 +05:30
Angus McLeod
ceef3f4bc9
Step and field conditionality (#87)
* Re structure builder logic to allow for step conditionality

Concerns
- Performance. Look at whether the additional build in the steps controller can be reduced
- Does not work if applied to the last step.
- Certain conditions will not work with the first step(?)
- How should this be scoped to known functionality?

* Add indexes and conditions to steps and fields

* Complete and add spec

* Complete backend

* Complete step conditionality and field indexing

* Fix failing spec

* Update coverage

* Apply rubocop

* Apply prettier

* Apply prettier to wizard js

* Fix schema issues created in merge

* Remove setting label for force_final

* Improve client wizard cache naming

* Improve steps controller and spec conditionality

* Improve final step attribute naming

* Fix failing spec

* Linting

* Add one more final step test

* Linting

* Fix eslint issues

* Apply prettier

* Linting, syntax, merge and copy cleanups

* Update wizard-admin.scss

* Fix template linting

* Rubocop fixes
2021-04-20 23:28:19 +05:30
Angus McLeod
ec21c8e274
Merge pull request #98 from paviliondev/pm-multiple-targets
FEATURE: allow targetting multiple users/groups when sending a privat…
2021-04-19 17:41:50 +10:00
Faizaan Gagan
9ded3602eb Merge branch 'master' into pm-multiple-targets 2021-04-19 11:04:47 +05:30
Faizaan Gagan
772392efae
FIX: checkbox description alignment (#99) 2021-04-18 17:27:16 +05:30
Faizaan Gagan
b71548427d
Added files used by github actions workflows (#78)
* Added files used by github actions workflows

* added simplecov report for tests workflow

* removed trailing space

* Rubocop fixes

* Update plugin-linting.yml

* Create Gemfile.lock

* Update Gemfile.lock

* Re-add bundler

* Update gitignore

* Limit yarn install to dev

* Update rubocop config and gemfile.lock

* allow strings to be mutated

* Update invites_controller_spec.rb

Co-authored-by: angusmcleod <angus@mcleod.org.au>
2021-04-16 13:37:32 +05:30
Angus McLeod
d7542d58c7
Merge pull request #96 from paviliondev/hbs-lint
fixed linting for all the hbs files
2021-04-16 16:01:23 +10:00
Faizaan Gagan
ce222c0c04 modified spec to confirm working for multiple users and groups 2021-04-15 02:15:20 +05:30
Faizaan Gagan
bb08f50042 fixed wrongly introduced variable name changes 2021-04-14 09:09:41 +05:30
Faizaan Gagan
f443840358 FEATURE: allow targetting multiple users/groups when sending a private message 2021-04-14 08:59:12 +05:30
Faizaan Gagan
a76cda0c02 fixed linting for all the hbs files 2021-04-12 19:49:53 +05:30
Faizaan Gagan
2788e8026e
ran prettier on stylesheets and global wizard javascripts (#95) 2021-04-12 12:05:15 +05:30
Faizaan Gagan
0205d8ccb5
fixed linting issues for javascripts/wizard folder (#94)
* ran eslint and fixes linting issues for javascripts/wizard folder

* ran prettier
2021-04-12 11:56:22 +05:30
angusmcleod
54c00f1784 Apply prettier to recent changes 2021-04-12 16:12:20 +10:00
Angus McLeod
c02ae44a82
Merge pull request #93 from paviliondev/es-lint
Apply es-lint to javascripts/discourse
2021-04-12 15:58:07 +10:00
angusmcleod
8171fc730c Apply es-lint to javascripts/discourse 2021-04-12 15:44:47 +10:00
angusmcleod
9c17957b43 Apply to javascripts/discourse 2021-04-12 15:10:02 +10:00
Angus McLeod
cb930a27bb
Merge pull request #92 from paviliondev/jquery-timepicker-2
Remove jquery timepicker from wizard client
2021-04-12 15:05:22 +10:00
angusmcleod
0a23172fa9 Remove jquery timepicker from wizard client 2021-04-12 15:05:04 +10:00
Angus McLeod
f26176b7ab
Merge pull request #91 from paviliondev/move_vendor_assets
Remove jquery timepicker
2021-04-12 14:57:23 +10:00
angusmcleod
88a0846842 Remove jquery timepicker 2021-04-12 14:56:48 +10:00
Faizaan Gagan
9289439cbd
added gems folder to gitignore (#90) 2021-04-12 10:19:37 +05:30
Faizaan Gagan
105fc46774
FEATURE: added liquid based templating (#83)
* FEATURE: added liquid based templating

* templating should be false by default

* added rspec tests for mapper templating

* wrapped templating tests in a context block

* added a custom liquid filter and tests

* ran rubocop on changed files

* DEV: minor variable and naming changes

* minor code formatting

* improved overall structure and tightened spec for custom filter

* added a spec template: false

* define method at the top of spec file

* naming convention

* removed extra space
2021-04-09 11:04:42 +05:30
Faizaan Gagan
dadac11c1e
FIX: use wizard-i18n helper to support theme translation overrides (#88) 2021-04-07 10:49:48 +05:30
Faizaan Gagan
1bc55c6099 code formatting 2021-04-05 22:04:17 +05:30
Faizaan Gagan
ae918976a3 DEV: add sprockets directive to require discourse folders 2021-04-05 21:53:34 +05:30
Faizaan Gagan
2fe3aa53b1
disable autocomplete when similar-topics validation is enabled (#85) 2021-04-02 19:21:33 +05:30
Faizaan Gagan
369ceb8584 FIX: set similarTopics to null when searching 2021-03-31 11:54:29 +05:30
Angus McLeod
d3e34a5be2
Merge pull request #84 from paviliondev/fix-theme-i18n
FIX: explicitly lookup for translation overrides in wizard theme
2021-03-30 22:03:16 +11:00
Faizaan Gagan
e79458f6ce FIX: explicitly lookup for translation overrides in wizard theme 2021-03-30 13:04:52 +05:30
Angus McLeod
cf50a7deb3
Apply prettier 💄 (#80)
* Apply prettier

* applied prettier for similar-topics-validator

Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
2021-03-28 14:36:49 +05:30
Faizaan Gagan
94a02157af
FIX: hide similar topics if the field becomes empty (#82) 2021-03-25 16:31:26 +05:30
Angus McLeod
87675c1bfa
Merge pull request #81 from paviliondev/similar-topics-impr
IMPR: added a state for insufficient characters
2021-03-25 19:11:55 +11:00
Faizaan Gagan
9d0a061099 removed unused computed property 2021-03-25 11:38:53 +05:30
Faizaan Gagan
873b30ac65 improved code structure 2021-03-25 11:33:12 +05:30
Faizaan Gagan
ee613d74c8 minor fix 2021-03-25 11:30:57 +05:30
Faizaan Gagan
c62f1ac96f IMPR: added a state for insufficient characters 2021-03-25 11:18:33 +05:30
Faizaan Gagan
04b2b87ea2
FIX: lookup for assets in the wizard specified theme (#79) 2021-03-19 01:14:57 +05:30
Penar Musaraj
fa73a18363
Ensure SCSS compilation compatibility with core (#77)
* WIP: Fix for new Discourse

* Ensure SCSS compilation compatibility with core

Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
2021-03-13 13:27:18 +05:30
angus
3bb244be79 Add .jpeg to list of default upload extensions 2021-03-12 21:12:26 +11:00
angus
e7a1472a1c Handle when permitted is set as "everyone" 2021-03-12 21:02:42 +11:00
angus
6a469b2e50 Remove user fields that can't be interpolated 2021-03-12 19:50:03 +11:00
angus
2d93313aab Make start check boolean 2021-03-12 18:38:50 +11:00
angus
1396314660 BUGFIX: Wizard serializer guest protections logic issue 2021-03-12 18:29:09 +11:00
angus
ac15ed8983 COMPATIBILITY: core autofocus does not work with custom wizard DOM structure 2021-03-12 18:02:50 +11:00
Angus McLeod
4edb40e526
Apply rubcop and get tests pass (#76) 2021-03-11 12:00:15 +05:30
Angus McLeod
065bc17929
Update plugin_helper.rb (#75) 2021-03-11 11:08:12 +05:30
angus
a86942df2e Add contact email to plugin metadata 2021-03-10 20:45:45 +11:00
Angus McLeod
3758fa3324
Merge pull request #74 from paviliondev/similar-topics-setting
IMPR: implemented a relative time based filtering for similar topics
2021-02-26 15:29:18 +11:00
Faizaan Gagan
cced7a8d25 minor formatting 2021-02-26 09:53:39 +05:30
Faizaan Gagan
33e457a5c9 simplified the conditional 2021-02-26 09:46:23 +05:30
Faizaan Gagan
6754d744f0 renamed setting's copy to Max Topic Age 2021-02-25 17:10:02 +05:30
Faizaan Gagan
bc2cc85804 rename n_value to time_n_value 2021-02-25 15:59:42 +05:30
Faizaan Gagan
c54273b94a implemented a relative time based filtering for similar topics 2021-02-25 15:36:43 +05:30
angusmcleod
c01055bf04 Update README.md 2021-02-24 16:07:50 +11:00
Faizaan Gagan
3d9a564d63
IMPR: simplified similar topics template (#73)
* IMPR: simplified similar topics template

* renamed label to key

* minor formatting

* added dasherize logic for classnames
2021-02-22 16:25:47 +05:30
Faizaan Gagan
19cc7a7365
FIX: prevent error if no categories are passed (#72) 2021-02-22 14:41:18 +05:30
angusmcleod
fed1beb4ed Update knowledgebase url 2021-02-20 18:19:05 +11:00
angusmcleod
4e7b13ffe3 Version bump 2021-02-20 18:18:27 +11:00
angusmcleod
5794349244 Ensure url field validates properly and accepts empty inputs 2021-02-20 17:59:41 +11:00
angus
2bca82a159 Fix admin style issues 2021-02-19 17:18:30 +11:00
angus
1a175b4d2b Ensure prompt completion works as intended
- Users who have completed should never see prompt
- Add rspec test for this case
2021-02-19 17:10:59 +11:00
Faizaan Gagan
38a68c07e2
FIX: table styles for wizard composer preview (#70)
* copied over markdown table styles from discourse

* added a description comment
2021-02-18 18:20:40 +05:30
angusmcleod
b8a21eefe2 Position loading spinner in bottom right of composer 2021-02-18 14:57:16 +11:00
angusmcleod
13525261ad Fix out of date open composer spec 2021-02-18 14:44:14 +11:00
angusmcleod
5e09d067bc Display category badge if similar topics is scoped to category 2021-02-18 14:40:59 +11:00
Angus McLeod
7f021791f5
Merge pull request #69 from paviliondev/realtime-validation
FEATURE: Implemented realtime validation framework
2021-02-17 15:50:39 +11:00
angusmcleod
41be645c17 Improve show/hide of similar topics results 2021-02-17 15:49:20 +11:00
angusmcleod
db17a7d1ca Fix z-index issue 2021-02-17 14:57:42 +11:00
angusmcleod
9587dfd488 Update .last_run.json 2021-02-17 14:42:02 +11:00
angusmcleod
8d72aee4fc Fix failing test (not RV related) 2021-02-17 14:40:04 +11:00
angusmcleod
4036313e75 Fix relative path 2021-02-17 14:36:54 +11:00
Faizaan Gagan
d68967c63f added plugin helper 2021-02-17 00:15:48 +05:30
Faizaan Gagan
c1b04eaaec added tests for required_params 2021-02-16 23:43:16 +05:30
Faizaan Gagan
40a2380775 added specs for CustomWizard::RealtimeValidationsController 2021-02-16 21:54:42 +05:30
Faizaan Gagan
47019664b1 removed context block 2021-02-16 20:06:05 +05:30
Faizaan Gagan
c5ad11c0a4 added tests for CustomWizard::RealtimeValidation::SimilarTopics class 2021-02-16 19:59:23 +05:30
Faizaan Gagan
c196c4fee7 added tests for CustomWizard::RealtimeValidation class 2021-02-16 19:58:43 +05:30
angusmcleod
c45e51fcb6 Various fixes
* Code formatting
* Both "type" and "name" are used to refer to the validation type. Changed all to "type".
* Added proper abstraction of realtime validation classes on server
* UI improvements in admin and wizard
2021-02-16 11:43:00 +11:00
Faizaan Gagan
8a6b240b46 removed extra newline 2021-02-15 19:03:01 +05:30
Faizaan Gagan
7ef7b4b8e0 fixed formatting 2021-02-15 19:02:11 +05:30
Faizaan Gagan
69ce09bdf7 moved serialization logic to the controller 2021-02-15 18:12:32 +05:30
Faizaan Gagan
20c8d8493e fixed code formatting for realtime_validation class 2021-02-15 17:57:15 +05:30
Faizaan Gagan
aeadef9aa5 improved wizard settings UX 2021-02-15 17:21:59 +05:30
Faizaan Gagan
3f4b8afb55 fixed code formatting 2021-02-15 13:58:27 +05:30
Faizaan Gagan
eb29193d8b fixed formatting for main validator component 2021-02-15 13:49:14 +05:30
Faizaan Gagan
4e12e872be removed unused code 2021-02-15 13:47:37 +05:30
Faizaan Gagan
afbc4e1f57 fixed similar topics validator formatting 2021-02-15 13:46:19 +05:30
Faizaan Gagan
70cc20a919 remove unused keys 2021-02-15 13:44:46 +05:30
Faizaan Gagan
3de3ea44d0 fixed formatting for field-validators component 2021-02-15 13:41:58 +05:30
Faizaan Gagan
b74526ae4f fixed formatting 2021-02-15 13:39:37 +05:30
angusmcleod
4ca82b9f4d Style updates (WIP)
See further comments on thepavilion.io
2021-02-13 12:51:37 +11:00
angusmcleod
b8671cef74 Remove redundant use of "settings" 2021-02-13 11:58:38 +11:00
Faizaan Gagan
17ba3f9d77 removed the widgets framework 2021-02-11 22:38:22 +05:30
Faizaan Gagan
4883d85d56 renamed the validator 2021-02-11 22:35:04 +05:30
Faizaan Gagan
d47770de88 implemented similar topics UI via ember components 2021-02-11 22:23:13 +05:30
Faizaan Gagan
194389c9be settings are now prefixed with 'Enable' 2021-02-11 19:55:23 +05:30
Faizaan Gagan
cfb65245ea renamed endpoint to realtime-validations 2021-02-11 19:53:54 +05:30
Faizaan Gagan
176cd7489a improved admin side settings UI 2021-02-11 19:22:09 +05:30
Faizaan Gagan
800795047a added wizard- prefix to component name 2021-02-11 12:45:54 +05:30
angusmcleod
d339130c34 Switch to using category_id instead of slug for open_composer
See further https://thepavilion.io/t/category-is-not-working-in-open-composer-action/3979/2
2021-02-08 21:06:28 +11:00
angusmcleod
6849c368f0 Support discourse client theme color schemes
This allows for color scheme switching via theme switching (e.g. for user selected dark modes). See further https://thepavilion.io/t/allow-wizard-themes-to-support-default-dark-mode-variables/3710
2021-02-08 13:07:21 +11:00
Faizaan Gagan
77ca946745 completed categories and date after filters 2021-02-05 18:29:30 +05:30
Faizaan Gagan
ffd2101a30 added backend validation mechanism and refined code 2021-02-01 19:28:37 +05:30
Faizaan Gagan
fa57bb8a5b Merge branch 'master' into realtime-validation 2021-01-30 23:18:43 +05:30
Faizaan Gagan
79e2368b57 validation framework code working 2021-01-30 23:16:04 +05:30
Faizaan Gagan
2681fe21ad
FIX: wizard composer size should be consistent accross broswers (#68) 2021-01-27 11:43:09 +05:30
Faizaan Gagan
e7635b632c
added dynamic attributes that can be targetted via css (#67) 2021-01-27 10:48:22 +05:30
Faizaan Gagan
5d749fe426 some changes 2021-01-27 10:38:26 +05:30
Faizaan Gagan
3cc45fa714 frontend validator apis 2021-01-26 13:35:10 +05:30
Angus McLeod
505043922e
Merge pull request #65 from paviliondev/text-counter
FEATURE: text length counter for text type fields
2021-01-20 19:59:04 +11:00
Faizaan Gagan
7bc7c4013e simplified pluralization logic 2021-01-20 14:22:52 +05:30
Angus McLeod
d85ee726d4 Update wizard-date-input.hbs 2021-01-20 19:34:51 +11:00
Faizaan Gagan
cdfd699491 resolved conflicts with latest code 2021-01-20 13:07:44 +05:30
Angus McLeod
b5a6d15c9d Add wizard field tabindex relative to field order 2021-01-19 18:50:37 +11:00
Faizaan Gagan
36094d70d6 fixed formatting for composer field type 2021-01-19 12:21:37 +05:30
Faizaan Gagan
5f121215d5 serialize max length attribute for wizard fields 2021-01-19 12:17:54 +05:30
Faizaan Gagan
f27ca60d24 updated char counter logic 2021-01-19 12:17:07 +05:30
Faizaan Gagan
4f70aea729 character count should be regular text 2021-01-16 17:34:37 +05:30
Faizaan Gagan
b2cdc1c29e REFACTOR: used new syntax for computed property 2021-01-16 17:27:38 +05:30
Angus McLeod
94456fd797 Merge branch 'master' into text-counter 2021-01-14 16:52:48 +11:00
Angus McLeod
0960dda2d3 Add theme "Header" html support 2021-01-14 16:41:08 +11:00
Angus McLeod
69f35e2e7d Revert "Remove out of date require"
This reverts commit ffc0d0e8bf.
2021-01-12 21:52:42 +11:00
Faizaan Gagan
57b51c2972 Added a wizard setting to toggle displaying character counter 2021-01-12 16:16:24 +05:30
Faizaan Gagan
ba029c7973 Renamed computed property 2021-01-12 13:03:20 +05:30
Faizaan Gagan
54acbc18d1 Merge branch 'master' into text-counter 2021-01-12 13:02:12 +05:30
Angus McLeod
ffc0d0e8bf Remove out of date require 2021-01-12 15:16:06 +11:00
Faizaan Gagan
25021edd82 added a computed property 2021-01-08 12:42:58 +05:30
Faizaan Gagan
ea5b420253 code formatting 2021-01-08 12:24:51 +05:30
Faizaan Gagan
10f80709c2 FEATURE: text length counter for text type fields 2021-01-08 12:20:57 +05:30
Angus McLeod
7389afe239
Merge pull request #64 from romanrizzi/debounce_wrapper
Use the new discourseDebounce function wrapper.
2021-01-04 14:24:08 +08:00
Angus McLeod
78dad97dc8 Use ember debounce until discourseDebounce hits stable 2021-01-04 14:22:43 +08:00
romanrizzi
11ff364cbe
Use the new discourseDebounce function wrapper.
We recently merged a Discourse core's PR to replace usages of Ember's debounce and discourseDebounce with a new debounce wrapper. The new wrapper works exactly like Ember's debounce but internally calls "run" when called in test mode.

This PR replaces all usages of other debounce functions with the new wrapper and fallbacks to Ember's debounce for backward-compatibility.
2020-12-22 11:06:13 -03:00
Angus McLeod
909f82095f Encode each query param seperately using Addressable 2020-12-19 10:16:12 +11:00
Angus McLeod
1962388501 Fix missing banner import 2020-12-18 19:25:04 +11:00
Angus McLeod
2177f8e837
Merge pull request #63 from paviliondev/max-length
FEATURE: added max length setting for text type fields
2020-12-14 21:47:45 +11:00
Angus McLeod
4aa040474f Update coverage 2020-12-14 21:40:14 +11:00
Faizaan Gagan
efaa0c5915 FIX: broke down the max length test into different cases 2020-12-14 12:16:32 +05:30
Faizaan Gagan
9c6f6d0db2 Reverted a formatting change 2020-12-08 13:41:45 +05:30
Faizaan Gagan
e12faad1f5 added positive test for max length check 2020-12-08 13:29:36 +05:30
Faizaan Gagan
49f82b4014 fixed formatting 2020-12-08 13:19:31 +05:30
Faizaan Gagan
3c3e67684f fixed html code formatting 2020-12-08 12:49:08 +05:30
Faizaan Gagan
4f7d18d193 FEATURE: added max length setting for text type fields 2020-12-08 12:44:37 +05:30
Angus McLeod
cb3821c7d8 Update locale spec to reflect new non_access handling 2020-12-08 13:30:44 +11:00
Angus McLeod
6dfd9e36c2 FIX: no access locale and svg icon 2020-12-08 13:27:19 +11:00
Angus McLeod
be204c1cb6 Clean up tests 2020-12-04 18:06:33 +11:00
Angus McLeod
d453d97df3 Add custom-wizard-specific caching system
Initially for use with registered custom fields
2020-12-04 18:05:56 +11:00
Angus McLeod
8a2a143ea8 Invalidate cache before checking enabled? 2020-12-04 09:45:28 +11:00
Angus McLeod
61dfa9b2aa Update url encoding in actions to handle deprecation 2020-12-04 09:38:01 +11:00
Angus McLeod
39ce7248a8 Add enabled? wrapper for CustomField extensions 2020-12-01 18:20:02 +11:00
Angus McLeod
f6f77547d7 Use explicit file loading for tests coverage 2020-12-01 08:20:10 +11:00
Angus McLeod
8274884505 Remove step_template from field validator arguments 2020-11-30 11:05:52 +11:00
Angus McLeod
96ac100602 version bump 2020-11-26 18:52:33 +11:00
Angus McLeod
3bff13492f Allow wizard i18n to be overridden by wizard theme i18n 2020-11-26 16:45:30 +11:00
Angus McLeod
f31054f75d Isolate and specify template and update validation 2020-11-26 14:05:50 +11:00
Angus McLeod
4be7349d99 Improve input error styles
- Use outline instead of border
- Remove unecessary padding and margin
2020-11-25 12:58:20 +11:00
Angus McLeod
80080e0cf1 Use dynamic time in after_time tests 2020-11-23 11:40:46 +11:00
Angus McLeod
63a3115dda Return wizard locales according to wizard permissions 2020-11-23 11:11:13 +11:00
Angus McLeod
e066ee4b00 Revert "Remove unused ExtraLocaleController extension"
This reverts commit 37c18ff324.
2020-11-23 10:11:45 +11:00
Angus McLeod
542195a0e0
Merge pull request #60 from OrbitalOwen/bug-fix/min-length-composer
Add composer to valid text fields for min length option
2020-11-13 13:02:03 +11:00
Angus McLeod
4b3efb2e1b Merge branch 'master' of https://github.com/angusmcleod/discourse-custom-wizard 2020-11-13 11:44:28 +11:00
Angus McLeod
b4d956a99c Don't allow minLength input for url field 2020-11-13 11:44:19 +11:00
Angus McLeod
5a7d8ea355 Add spec to ensure min_length applied to all text fields 2020-11-13 11:39:59 +11:00
Angus McLeod
26b3797159
Merge pull request #59 from paviliondev/composer-drop
FIX: confine the wizard composer's dropZone
2020-11-13 11:22:13 +11:00
OrbitalOwen
1f1c911439 Add composer to valid text fields for min length option 2020-11-12 13:09:23 +00:00
Faizaan Gagan
295eaf2b21 prettified the file 2020-11-11 17:07:30 +05:30
Faizaan Gagan
f096f7d05f FIX: confine the wizard composer's dropZone 2020-11-11 16:58:28 +05:30
Angus McLeod
f2ef53cff7 Minor custom field fixes 2020-11-10 12:03:33 +11:00
Angus McLeod
b383538a6b Move to individual custom field saving 2020-11-10 11:56:11 +11:00
Angus McLeod
155eabd377 Isolated custom field removal 2020-11-09 21:44:32 +11:00
Angus McLeod
848a0dc0ca Custom field list is already cached
Attempt to fix failing CI test that's working locally
2020-11-09 18:48:55 +11:00
Angus McLeod
097af63090 Add preloading to custom field implementation 2020-11-09 17:50:17 +11:00
Angus McLeod
3e2a471d7d Update plugin url 2020-11-09 15:14:45 +11:00
Angus McLeod
56eefe0849 Update manager nav label 2020-11-09 14:35:03 +11:00
Angus McLeod
0a542af7c6 Bump version 2020-11-09 14:33:46 +11:00
Angus McLeod
174145249e Update plugin tests coverage 2020-11-09 14:33:15 +11:00
Angus McLeod
066eef4ef8 FEATURE: Wizard Manager
The "Transfer" UI has been upgraded into a full wizard manager, adding additional import/export features and bulk-delete functionality
2020-11-09 14:32:36 +11:00
Angus McLeod
37c18ff324 Remove unused ExtraLocaleController extension 2020-11-08 14:27:13 +11:00
Angus McLeod
e99d5a86a2 Update coverage 2020-11-08 14:25:37 +11:00
Angus McLeod
3da4d546b2 Add custom field spec and improve custom field structure 2020-11-08 14:24:20 +11:00
Angus McLeod
1f1f2c5726 Don't require fields on a step update 2020-11-06 16:39:26 +11:00
Angus McLeod
b201289358 Version bump 2020-11-03 14:01:28 +11:00
Angus McLeod
4b85e7b086 Add coverage report to repo 2020-11-03 13:56:34 +11:00
Angus McLeod
017ac37743
Merge pull request #58 from paviliondev/tests_improvements
Rspec Suite
2020-11-03 12:10:24 +11:00
Angus McLeod
f419d1c20c Update .travis.yml 2020-11-03 12:04:26 +11:00
Angus McLeod
74cba10a10 Merge branch 'master' into tests_improvements 2020-11-03 11:28:45 +11:00
Angus McLeod
fc7c5b9b34 Complete tests 2020-11-03 11:24:20 +11:00
Angus McLeod
b726d40a0c working builder and action specs 2020-10-31 18:05:50 +11:00
Angus McLeod
9d260635ca Move to more reliable custom field metaprogramming 2020-10-23 11:53:39 +11:00
Angus McLeod
54d244c1d8 Make custom field metaprogramming dynamic 2020-10-20 20:02:13 +11:00
Angus McLeod
4e094edc7b Add integer data type to custom field feature 2020-10-20 18:24:27 +11:00
Angus McLeod
cf8b06bbd0 Don't require serializer for custom field 2020-10-20 17:40:10 +11:00
Angus McLeod
0094be8352 Custom field management locale and style updates 2020-10-20 17:07:59 +11:00
Angus McLeod
07672ab707
Merge pull request #57 from paviliondev/custom_field_management
FEATURE: Custom field management
2020-10-20 16:43:26 +11:00
Angus McLeod
b14d334829 Complete custom field management 2020-10-20 16:40:23 +11:00
Angus McLeod
9e0cf29b7c Merge branch 'master' into custom_field_management 2020-10-20 11:42:58 +11:00
Angus McLeod
3e86d0ffa6 FEATURE: suppress notifications setting for post actions 2020-10-20 11:42:10 +11:00
Angus McLeod
8fdd263d8e wip 2020-10-20 10:15:03 +11:00
Angus McLeod
d221d65d77 init 2020-10-17 12:31:07 +11:00
Angus McLeod
94c56ef550 Make uploadIcon responsive to authorized extensions 2020-10-06 21:05:24 +11:00
Angus McLeod
6297ddaa03 Update composer style and text usage to match the standard composer 2020-10-06 20:47:40 +11:00
Angus McLeod
55d7059469 Add missing isComposer computed property 2020-10-06 20:33:19 +11:00
Angus McLeod
96e85bb2b3 Add authorized_extensions support to wizard composer 2020-10-06 20:30:24 +11:00
Angus McLeod
fc5279cd0a Add full support for groups in the private message action 2020-10-05 13:41:18 +11:00
Angus McLeod
1087facb54 Wrap import in wizard check 2020-10-05 13:40:51 +11:00
Angus McLeod
545dc615c2 Add missing model import 2020-10-05 13:08:15 +11:00
Angus McLeod
245cb35330 Wizard composer style tweak 2020-10-05 12:32:14 +11:00
Angus McLeod
dc7249cfd2 Update wizard-raw-templates.js.erb 2020-10-02 19:32:18 +10:00
Angus McLeod
66dc55ef10 Use correct precompilation path 2020-10-02 18:07:16 +10:00
Angus McLeod
d7cb20cb3a Merge branch 'master' of https://github.com/angusmcleod/discourse-custom-wizard 2020-10-02 15:30:55 +10:00
Angus McLeod
6aad50202a Update asset pre-compilation 2020-10-02 15:03:26 +10:00
Angus McLeod
4970b5b72c
Merge pull request #56 from paviliondev/rich-comp
Rich composer
2020-10-02 14:42:00 +10:00
Angus McLeod
039262ce2c FIXES: Improve wizard initialization && more upload improvements 2020-10-02 14:40:10 +10:00
Angus McLeod
20ddba2afd Cleanup composer autocomplete 2020-10-02 11:41:39 +10:00
Angus McLeod
05f96beac1 Update raw templating handling to new asset pipeline 2020-10-02 11:38:32 +10:00
Angus McLeod
39790bf11e Add missing conditional 2020-10-02 10:33:17 +10:00
Angus McLeod
aa7d5df77b CLEANUP #1: Upload progress and link modal 2020-10-02 10:33:01 +10:00
Angus McLeod
8a0dc999b3 Merge branch 'master' into rich-comp 2020-10-02 07:42:38 +10:00
fzngagan
3bd1129acf FEATURE: Insert hyperlink on wizard composer 2020-10-01 19:18:20 +05:30
Angus McLeod
fce7b77a91 Add share-url import 2020-10-01 20:23:39 +10:00
fzngagan
67d87f74c1 Upload files, drag and drop files, syntax highlighting working 2020-10-01 11:13:29 +05:30
Angus McLeod
5c65a8d9f8
Merge pull request #55 from jbrw/master
REFACTOR - remove _.debounce and _.isEqual
2020-10-01 08:03:45 +10:00
jbrw
866926501f
REFACTOR - remove _.debounce and _.isEqual
Lodash is being removed from core Discourse.
2020-09-29 12:57:32 -04:00
fzngagan
3fd3900cea Added message bus to wizard side 2020-09-24 17:34:32 +05:30
Angus McLeod
662c7432ef Remove uncessary guardian checks 2020-09-24 17:47:07 +10:00
Angus McLeod
e34a24c495 Handle incorrect use of inputs
If the user mis-configures the wizard, e.g. using "is" instead of "=" it will produce an exception here in certain circumstances. This prevents that.
2020-09-21 15:50:46 +10:00
Angus McLeod
fd0dfeae32 Remove wizard composer static id
This causes an issue if multiple composers are used in a single step
2020-09-21 15:36:11 +10:00
Angus McLeod
1f8f24804b Add missing imports 2020-09-19 11:41:32 +10:00
Angus McLeod
8f3d1796eb Ensure after_signup runs for oauth singups 2020-09-16 23:35:07 +10:00
Angus McLeod
ad7b2944f0 Go further back for latest stable 2020-09-10 15:14:11 +10:00
Angus McLeod
37e609430b Remove unused precompilation file 2020-09-10 13:21:58 +10:00
Angus McLeod
ec64ae83f4 Remove beta compatibility 2020-09-01 23:22:55 +10:00
Angus McLeod
d80d182d44 Testing out one more .discourse-compatibility configuration 2020-09-01 22:59:45 +10:00
Angus McLeod
65ab0cf66a Fix compatability (again) 2020-09-01 22:35:34 +10:00
Angus McLeod
b57a06ceff Asset pipeline can't handle es6 2020-09-01 21:40:12 +10:00
Angus McLeod
73cdd2bc4d Select-kit directory now needs to be manually injected 2020-09-01 21:28:14 +10:00
Angus McLeod
0940eb8aa0 Remove beta pin 2020-09-01 16:32:39 +10:00
Angus McLeod
31a755a400 Update compatibility to account for stable and beta updates 2020-09-01 11:25:57 +10:00
Angus McLeod
48e3c385dc Require and setup the new Discourse initialization objects 2020-09-01 11:01:46 +10:00
Angus McLeod
dc66bbe936 Import lib/cookie 2020-09-01 08:48:23 +10:00
Angus McLeod
4daae1bfe4 Bootbox is now imported 2020-08-28 09:46:29 +10:00
Angus McLeod
003bf08f85 Remove unecessary css declarations 2020-08-20 23:27:00 +10:00
Angus McLeod
4417c96953 Wizard scss cannot be precompiled by rails anymore 2020-08-20 22:36:32 +10:00
Angus McLeod
a0f48e5a28
Merge pull request #53 from paviliondev/style_upgrade
Integrate custom wizard styles into the Discourse asset pipeline
2020-08-19 18:53:57 +10:00
Angus McLeod
5588180dcd Clean up: variable usage and style registration 2020-08-19 14:41:20 +10:00
Angus McLeod
b855417adb Helper context usage has changed
See 41fd7a8b72
2020-08-19 13:23:10 +10:00
Angus McLeod
18f0356d15 Integrate custom wizard css into discourse asset pipeline 2020-08-19 13:14:28 +10:00
Angus McLeod
76ab7aece8 Remove redundant param key 2020-08-12 09:43:45 +10:00
fzngagan
53fefec6bb Added topic-fancy-title import 2020-08-10 11:57:53 +05:30
Angus McLeod
6410ac7133
Merge pull request #51 from paviliondev/add-helper-context
FIX: discourse now uses helperContext to fetch siteSettings on frontend
2020-08-03 10:38:19 +10:00
fzngagan
63f8faea36 FIX: discourse now uses helperContext to fetch siteSettings on frontend 2020-07-31 19:26:51 +05:30
Angus McLeod
f70170abf7
Merge pull request #49 from paviliondev/add_date_time_inputs
Add date time inputs
2020-07-22 11:40:52 +10:00
Angus McLeod
91a30178bf Add protection to data recursion 2020-07-22 11:39:30 +10:00
Angus McLeod
888072f196 Merge branch 'master' into add_date_time_inputs 2020-07-22 11:30:40 +10:00
Angus McLeod
fe707f31e5 Add date-time style 2020-07-22 11:30:22 +10:00
Angus McLeod
a9a1409e66 Add event styles 2020-07-22 11:14:41 +10:00
Angus McLeod
a0f2d85eff Add visible to create_topic action 2020-07-20 14:26:11 +10:00
Angus McLeod
c4eb3e6cff
Merge pull request #48 from paviliondev/set_watch_category_users
Set watch category users
2020-07-20 13:58:05 +10:00
Angus McLeod
382ee50f13 Cast watch_category array to integer 2020-07-20 13:51:11 +10:00
Angus McLeod
36c0281b2f Add watch category users and migration 2020-07-20 13:06:36 +10:00
Angus McLeod
290bacc4bd Add wizard actions and fix field listings 2020-07-17 17:02:48 +10:00
Angus McLeod
2e6c6ff4d6 Expose custom field support for create group and create category 2020-07-17 12:10:59 +10:00
Angus McLeod
783af5b5f7
Merge pull request #47 from paviliondev/create_category_and_create_group_actions
Create category and create group actions
2020-07-17 11:09:14 +10:00
Angus McLeod
978dc7c235 Use name input for full_name if blank 2020-07-17 11:08:25 +10:00
Angus McLeod
c019bbc86b Pin to stable version. Beta version is still being updated. 2020-07-17 09:59:24 +10:00
Angus McLeod
1e4348b67a Complete new group category actions 2020-07-16 17:50:09 +10:00
Angus McLeod
aa380e2d6c Merge branch 'master' into create_category_and_create_group_actions 2020-07-16 15:25:18 +10:00
Angus McLeod
8fb44749f5 Add create_group 2020-07-16 15:25:06 +10:00
Angus McLeod
8d9179665b Working date, time and dateTime inputs 2020-07-16 13:26:56 +10:00
Angus McLeod
06c3605974 No 'v' in .discourse-compatibility versions 2020-07-15 10:58:09 +10:00
Angus McLeod
271e270dca Handle new category and tag hashtags 2020-07-15 10:19:04 +10:00
Angus McLeod
bb85b3a0d2 Update raw template global in erb 2020-07-09 13:15:23 +10:00
Angus McLeod
11bf892bcc Add Create Category action and Create Group serverside 2020-07-09 12:19:36 +10:00
Angus McLeod
f0edc18804
Merge pull request #44 from discoursehosting/master
Add email_messages_level and email_digests as updatable user fields
2020-07-07 10:49:56 +10:00
Angus McLeod
6218f6b9ad
Merge pull request #45 from thamerkhatib/master
Translations for Brazilian Portuguese
2020-07-07 10:40:47 +10:00
Angus McLeod
b41775efe1
Merge pull request #46 from eviltrout/get-url-deprecation
FIX: get-url deprecation
2020-07-07 10:38:43 +10:00
Angus McLeod
58d0fda5af Merge branch 'master' into pr/46 2020-07-07 10:31:27 +10:00
Robin Ward
15c24b6098 FIX: get-url deprecation 2020-07-06 15:05:15 -04:00
Thamer Khatib
76b0866bda
Little text correction
In select_one: "Please select atleast one wizard", changed to select_one: "Please select at least one wizard"
2020-07-05 00:04:38 -03:00
Thamer Khatib
441843256c
create server.pt_br.yml 2020-07-05 00:03:27 -03:00
Thamer Khatib
9362cc0acd
Update client.pt_br.yml 2020-07-04 23:55:58 -03:00
Thamer Khatib
150dfdcf2c
Update pt_BR 2020-07-04 23:55:31 -03:00
Thamer Khatib
4f36c7ddd2
Final Update
Finished translation to pt_BR
2020-07-04 23:54:56 -03:00
Thamer Khatib
ea640ccafd
commit 1 2020-07-04 19:32:54 -03:00
Richard
224903b025 Add email_messages_level and email_digests as updatable user fields 2020-07-02 09:33:58 +00:00
Angus McLeod
1f7f17ee30 Add date field 2020-07-02 15:25:17 +10:00
Angus McLeod
fb06c0def2 Handle case of custom-field-only update 2020-07-02 10:02:40 +10:00
Angus McLeod
7841ee8101 Add email_level as updatable user field 2020-07-02 09:59:14 +10:00
Angus McLeod
e0a2525cb0 Explicitly import d-textarea 2020-06-26 20:28:13 +10:00
Angus McLeod
802d74bab2 Add text selection and conditional input type to dropdown content options 2020-06-22 20:47:42 +10:00
Angus McLeod
841923b79c Create CW-version of site singleton 2020-06-22 10:13:10 +10:00
Angus McLeod
454872edc8 Add more checks for edgecases (e.g. when user_field is removed) 2020-06-10 19:52:28 +10:00
Robert
5f07814f0e
Merge pull request #42 from merefield/api_fix
FIX: add missing api actions meta
2020-05-30 20:26:56 +01:00
Robert Barrow
72f81c4c4c FIX: add missing api actions meta 2020-05-30 20:26:14 +01:00
Angus McLeod
57aa93d9db raw-templates have been moved 2020-05-28 13:06:24 +10:00
Angus McLeod
0c7d6f97fc Import I18n 2020-05-28 13:06:06 +10:00
Angus McLeod
afb543e0de Migrate from namespace to import 2020-05-28 11:26:39 +10:00
Robert
050a0da61c
Merge pull request #40 from merefield/watch_action
FEATURE: added ability for user to select watched categories in wizard
2020-05-26 11:56:13 +01:00
Robert Barrow
99f9907b1b fixed spurious line 2020-05-26 11:52:25 +01:00
Robert Barrow
33b2003827 improved layout so that mapped field settings have more room 2020-05-26 11:47:15 +01:00
Robert Barrow
1f0f7ff5f9 Added categorySelection on the output 2020-05-26 11:16:06 +01:00
Robert Barrow
518a4f3dce added some checks on data in action to reduce runtime issues 2020-05-26 10:59:11 +01:00
Robert Barrow
92f626196d remove commented out code 2020-05-26 09:53:01 +01:00
Robert Barrow
c4471fa15f Added notification level dropdown to allow admin to specify which level of tracking will be chosen during action 2020-05-25 14:59:31 +01:00
Robert Barrow
355d1abc54 simplify naming 2020-05-24 11:23:17 +01:00
Robert Barrow
2458525206 utilise wizard mapper to retrieve values 2020-05-24 11:20:15 +01:00
Robert Barrow
f13c04043b remove unused constant 2020-05-24 09:07:47 +01:00
Robert Barrow
9097e3cad2 Remove unnecessary selection options 2020-05-24 09:03:34 +01:00
Robert Barrow
5fc5ce113e Update schema against PR feedback 2020-05-24 08:56:27 +01:00
Robert Barrow
beed6a93fc revert deletions of redundant spaces continued#3 2020-05-24 08:38:54 +01:00
Robert Barrow
d3e7fceb56 revert deletions of redundant spaces continued 2020-05-24 08:36:56 +01:00
Robert Barrow
ca3bad6664 revert deletions of redundant spaces to improve clarity of PR 2020-05-24 08:35:17 +01:00
Robert Barrow
f4a9cf86f2 FEATURE: added ability for user to selected watched categories in wizard 2020-05-22 23:42:26 +01:00
Angus McLeod
b196acf151 Update after-time modal to use new date time inputs 2020-05-15 12:06:21 +10:00
Angus McLeod
b9ad37c38f Locale loading update 2020-05-15 09:31:39 +10:00
Angus McLeod
f19cc33af4 Precompile wizard-preload 2020-05-14 15:00:23 +10:00
Angus McLeod
e28576ba5b Update wizard-preload.js.es6 2020-05-14 14:46:41 +10:00
Angus McLeod
14bb8be66e Update after_time feature to new wizard api 2020-05-14 13:42:38 +10:00
Angus McLeod
f28bde5206 I18n is now imported 2020-05-14 13:42:11 +10:00
Angus McLeod
34a556e0bf
Merge pull request #39 from eviltrout/discourse-route
DEV: Discourse.Route has been deprecated
2020-05-13 09:00:28 +10:00
Robin Ward
155493ce3b DEV: Discourse.Route has been deprecated 2020-05-12 14:01:26 -04:00
Angus McLeod
c5ccd638f7 Preload store has moved 2020-05-07 20:29:18 +10:00
Angus McLeod
b83469b776 New RAW_TEMPLATES handling 2020-05-06 11:31:45 +10:00
Angus McLeod
9383695c5b Add trigger post jobs when post is created 2020-05-04 19:02:49 +10:00
Angus McLeod
dd3875840b Lightbox doesn't work in custom wizard 2020-05-04 18:09:18 +10:00
Angus McLeod
d3eaceefe1 Convert boolean to is 2020-05-01 19:12:58 +10:00
Angus McLeod
379e839b71 FIX: make invite topic redirects work and allow them to be used in conditional route_tos 2020-05-01 18:16:58 +10:00
Angus McLeod
e257d60c86 rm byebug 2020-04-30 19:37:57 +10:00
Angus McLeod
a8e8a1ecec Revert "Add underline to wizard titles"
This reverts commit da6d7a788b.
2020-04-30 19:35:12 +10:00
Angus McLeod
da6d7a788b Add underline to wizard titles 2020-04-30 19:34:12 +10:00
Angus McLeod
305ad2632a Reduce font-weight of checkbox labels 2020-04-30 19:31:48 +10:00
Angus McLeod
90ea524382 Remove unecssary && 2020-04-30 19:17:53 +10:00
Angus McLeod
5b5bbd0e1a Add boolean connector 2020-04-30 19:17:37 +10:00
Angus McLeod
7cc84e4a25 Remove enabled? check from extension prepension 2020-04-30 10:54:30 +10:00
Angus McLeod
d8b9f5acac Discourse common is now an addon 2020-04-30 10:09:26 +10:00
Angus McLeod
489e615773 Ensure typeObject exists 2020-04-29 15:24:33 +10:00
Angus McLeod
ef611f3b19 Move wizard extensions to new extension handling 2020-04-29 12:36:44 +10:00
Angus McLeod
1f10a9e4f3 Property extend wizard field class 2020-04-29 12:28:57 +10:00
Angus McLeod
857a159d0c Add conditionality to route_to url 2020-04-29 11:47:08 +10:00
Angus McLeod
2844a75f30 Handle changes via callbacks instead of observers 2020-04-29 11:42:39 +10:00
Angus McLeod
e2b1c9e69f Discourse client path change 2020-04-24 20:26:46 +10:00
Angus McLeod
07d0cbb0b4 Pair validation should be cumulative 2020-04-23 12:52:25 +10:00
Angus McLeod
082be35199 Selector active type fixes 2020-04-23 12:28:31 +10:00
Angus McLeod
428cccd643 Update wizard-admin.scss 2020-04-22 23:10:27 +10:00
Angus McLeod
77923b443d Handle case when action id does not have number at end 2020-04-22 23:08:04 +10:00
Angus McLeod
e06f543720 Move api to v0.2 2020-04-22 23:03:18 +10:00
Angus McLeod
8327b7fad0 Put-cursor-at-end is now a seperate lib 2020-04-21 07:24:57 +10:00
Angus McLeod
b74a46a89f Fix: new items may not have type on creation 2020-04-21 07:21:44 +10:00
Angus McLeod
de8b4f9b2e Minor fixes 2020-04-20 22:26:34 +10:00
Angus McLeod
36069dab3b Update profile text update 2020-04-20 22:11:24 +10:00
Angus McLeod
8cd8c3aeaa Add field and action messages 2020-04-20 21:40:32 +10:00
Angus McLeod
7cffacafd2 Stub onUpdate 2020-04-20 19:42:52 +10:00
Angus McLeod
32aa7cc897 Improve change handling structure 2020-04-20 19:41:13 +10:00
Angus McLeod
d194a8313a Add user field options as dropdown option 2020-04-19 21:02:14 +10:00
Angus McLeod
1a5c66bf20 Support custom user fields in profile update action 2020-04-19 19:48:58 +10:00
Angus McLeod
47722d13a3 after_signup on approval fixes 2020-04-19 16:42:44 +10:00
Angus McLeod
bffdc1f363 Ensure content exists 2020-04-19 16:11:07 +10:00
Angus McLeod
20ca39bf2a Ensure content exists before adding it 2020-04-19 16:06:45 +10:00
Angus McLeod
02c6096395 Update structure 2020-04-19 16:06:18 +10:00
fzngagan
500c305701 added import 2020-04-17 13:32:56 +05:30
Angus McLeod
fdbc31c30a bugfix after signup 2020-04-17 08:42:55 +10:00
Angus McLeod
a25d69eb5f Step description mapper updates 2020-04-16 15:14:03 +10:00
Angus McLeod
aa5f455c6b Update wizard.js.es6 2020-04-16 13:34:49 +10:00
Angus McLeod
ba7c50b40f Clarify mapper interpolation 2020-04-16 13:33:42 +10:00
Angus McLeod
ca7af31562 Update field id handling 2020-04-16 13:33:07 +10:00
Angus McLeod
4576aff5b5 Fix wizard-link sorting 2020-04-16 12:13:26 +10:00
Angus McLeod
d26744cf56 Schema handling updates
- support custom field types
- move client schema to seperate helper
- handle schema defaults properly
2020-04-16 12:04:27 +10:00
Angus McLeod
707f187455 Use full name if present 2020-04-16 09:32:35 +10:00
Angus McLeod
3e350ac3dd Use group full name in wizard selector 2020-04-16 09:10:39 +10:00
Angus McLeod
db16c9692b Update custom validation && location style 2020-04-15 18:58:57 +10:00
Angus McLeod
4889435164 Bugfix 2020-04-15 18:58:10 +10:00
Angus McLeod
a1272de568 Handle event and location fields 2020-04-15 16:22:54 +10:00
Angus McLeod
28ae6fd19f
Merge pull request #32 from paviliondev/add_group_field
v0.2
2020-04-15 15:42:43 +10:00
Angus McLeod
92bd7953f1 Handle incorrect data in mapped inputs 2020-04-15 15:41:27 +10:00
Angus McLeod
e285674c8f Handle corrupted wizard data 2020-04-15 15:22:21 +10:00
Angus McLeod
03ae1dc7c9 Update wizard-admin.scss 2020-04-15 14:48:42 +10:00
Angus McLeod
c24c7f7b44 Api tweaks 2020-04-15 14:29:47 +10:00
Angus McLeod
79fc4eee24 Refactor open composer action 2020-04-15 13:52:02 +10:00
Angus McLeod
cda316a9c6 Dont use updater in action 2020-04-15 13:34:54 +10:00
Angus McLeod
f114672dd8 Update wizard-admin.scss 2020-04-15 13:22:58 +10:00
Angus McLeod
3066c22367 bugfix 2020-04-15 13:21:40 +10:00
Angus McLeod
949b28cecb Update logs 2020-04-15 12:47:14 +10:00
Angus McLeod
57a19d4f23 Minor bugfixes 2020-04-15 12:34:39 +10:00
Angus McLeod
147b8a787c Improve log UI 2020-04-15 12:10:39 +10:00
Angus McLeod
9694b7b7d3 bugfix send message log 2020-04-15 11:46:55 +10:00
Angus McLeod
74e8525251 Group action bugfixes 2020-04-15 11:42:24 +10:00
Angus McLeod
8cfdaf94ef bugfix 2020-04-15 11:27:19 +10:00
Angus McLeod
1ac241fb9a Revert to post_builder 2020-04-15 11:23:41 +10:00
Angus McLeod
631640a7d7 Bugfix topic params 2020-04-15 11:13:06 +10:00
Angus McLeod
d65eb923d9 Update action.rb 2020-04-15 11:06:50 +10:00
Angus McLeod
7950485e12 Add more action logs 2020-04-15 11:05:26 +10:00
Angus McLeod
04198339ca Action logging and submissions bugixs 2020-04-15 10:46:44 +10:00
Angus McLeod
4c3e88beee Added debugging 2020-04-15 00:10:26 +10:00
Angus McLeod
83243af22d Minor bugfix 2020-04-14 23:16:45 +10:00
Angus McLeod
bab2c95cfe Update error handling 2020-04-14 23:08:02 +10:00
Angus McLeod
ebab021916 Handle case when error input can't be found 2020-04-14 23:00:19 +10:00
Angus McLeod
e01c900bae Help text 2020-04-14 22:54:02 +10:00
Angus McLeod
961d5ec1c5 Version bump 2020-04-14 22:12:43 +10:00
Angus McLeod
f8104eb01b Limit dropdown types 2020-04-14 22:10:42 +10:00
Angus McLeod
d96ebb3bdd Don't allow auto-updating of trust level 2020-04-14 20:46:53 +10:00
Angus McLeod
e056242269 Ensure all necessary data is present for topic creation 2020-04-14 20:21:54 +10:00
Angus McLeod
c8a5fe09cd Fix add_to_group and file type validation 2020-04-14 19:51:58 +10:00
Angus McLeod
d74831aa06 Fix file type validation 2020-04-14 16:45:25 +10:00
Angus McLeod
303c79be1f Only clear mapped properties if the field id remains the same 2020-04-14 16:06:02 +10:00
Angus McLeod
d128565979 various 2020-04-14 15:46:06 +10:00
Angus McLeod
92e61f3f51 various 2020-04-14 09:39:21 +10:00
Angus McLeod
ab18769820 various 2020-04-13 22:17:22 +10:00
Angus McLeod
dae08e53d4 various 2020-04-12 09:27:16 +10:00
Angus McLeod
d8fd5cb258 various 2020-04-11 16:22:12 +10:00
Angus McLeod
ae87e383d2 update profile update action fields 2020-04-10 18:51:01 +10:00
Angus McLeod
3c8dc540c8 wip 2020-04-10 17:57:49 +10:00
Angus McLeod
024ab63006 various 2020-04-08 17:59:54 +10:00
Angus McLeod
98f9215d65 various 2020-04-08 12:52:07 +10:00
Angus McLeod
5a6afef005 Merge branch 'master' into add_group_field 2020-04-08 00:24:56 +10:00
Angus McLeod
5c33b4a621 Profile action fixes 2020-04-08 00:18:12 +10:00
Angus McLeod
df8d40cf2b Ensure update avatar works 2020-04-07 23:33:11 +10:00
Angus McLeod
06e618ecbe Cast comparisons 2020-04-07 21:53:00 +10:00
Angus McLeod
565e175f79 Tags bugfix 2020-04-07 21:17:20 +10:00
Angus McLeod
6ced0cf13c various 2020-04-07 21:06:35 +10:00
Angus McLeod
a20c74a943 various 2020-04-07 20:28:39 +10:00
Angus McLeod
539f61c610 wip 2020-04-07 18:33:51 +10:00
Angus McLeod
2e272f3ef4 Merge branch 'events-support-imports' into add_group_field 2020-04-07 17:57:36 +10:00
Angus McLeod
b5fce333f6 wip 2020-04-07 17:54:30 +10:00
Angus McLeod
e3fa75597b various 2020-04-07 14:56:16 +10:00
Angus McLeod
bd88a74718
Merge pull request #36 from paviliondev/events-support-imports
Add pickaday style
2020-04-06 18:39:59 +10:00
Angus McLeod
b74d7dd25e Merge branch 'master' into events-support-imports 2020-04-06 18:39:31 +10:00
Angus McLeod
6570e4b74b wip 2020-04-06 18:36:38 +10:00
Angus McLeod
04d7fc1c59 various 2020-04-06 11:54:16 +10:00
Angus McLeod
7b3ed54f29 various 2020-04-05 11:37:09 +10:00
Angus McLeod
610ab8570a Add style updates 2020-04-03 19:49:36 +11:00
Angus McLeod
666c4f1eb4 Update wizard.rb 2020-04-03 12:10:52 +11:00
Angus McLeod
335e69e53b Update wizard.rb 2020-04-03 10:06:13 +11:00
Angus McLeod
a6cb3ddd05 Update wizard.js.es6 2020-04-03 09:47:32 +11:00
Angus McLeod
7035c05e37 Add pickaday style 2020-04-03 00:21:19 +11:00
Angus McLeod
ccb9143237
Merge pull request #35 from paviliondev/events-support-imports
Events support imports
2020-04-02 21:33:12 +11:00
Angus McLeod
6088efcbbb Merge branch 'master' into events-support-imports 2020-04-02 21:31:59 +11:00
Angus McLeod
10fb3c4c44 various 2020-04-02 20:29:22 +11:00
Angus McLeod
9e71195236 Update wizard-admin.scss 2020-04-02 19:25:38 +11:00
Angus McLeod
0d94c1d8c6 various 2020-04-02 19:21:03 +11:00
Angus McLeod
87a53a8c85 wip 2020-04-02 16:21:57 +11:00
Angus McLeod
694f5f1898 Update plugin.rb 2020-04-01 23:16:49 +11:00
Angus McLeod
bbdf11c84f wip 2020-04-01 23:16:26 +11:00
Angus McLeod
2046648862 various 2020-04-01 21:58:30 +11:00
Angus McLeod
515f0b3393 Update wizard-mapper.scss 2020-04-01 16:31:09 +11:00
Angus McLeod
3bb16f1fb5 wip 2020-04-01 16:03:26 +11:00
Angus McLeod
66bd90a56e wip 2020-03-31 19:30:53 +11:00
Angus McLeod
947a42cf0f wip 2020-03-31 17:29:59 +11:00
Angus McLeod
9a489f3b9b Merge branch 'master' into add_group_field 2020-03-31 15:53:00 +11:00
Angus McLeod
9b03552344 Migrate to new Site registration approach 2020-03-31 14:14:49 +11:00
Angus McLeod
906db9269f Update wizard-custom.js 2020-03-31 11:13:16 +11:00
Angus McLeod
ee61c1deb3 add permitted setting 2020-03-30 17:16:03 +11:00
Angus McLeod
b212eaa2f3 wip 2020-03-30 10:53:28 +11:00
Angus McLeod
71054b80f3 Style and deprecation updates 2020-03-29 18:49:33 +11:00
fzngagan
b728af7a46 added events form css 2020-03-27 12:50:52 +05:30
fzngagan
19ed700e46 added requirejs imports for events form 2020-03-27 12:50:20 +05:30
fzngagan
2b45e9b039 added css/js for timepicker on wizard side 2020-03-27 12:49:27 +05:30
Angus McLeod
fa2d411088
Merge pull request #34 from paviliondev/topic-custom-fields
improved topic custom fields saving mechanism
2020-03-27 15:50:44 +11:00
fzngagan
c06af2b068 improved topic custom fields saving mechanism 2020-03-25 23:20:25 +05:30
merefield
a2351c7119
Merge pull request #33 from merefield/number_and_url_validation
CSS for url entry to bring in line with text fields
2020-03-25 11:37:27 +00:00
Robert Barrow
3c364c928c CSS for url entry to bring in line with text fields 2020-03-25 11:30:05 +00:00
Angus McLeod
f3eedbac64
Merge pull request #31 from merefield/number_and_url_validation
Number and url validation
2020-03-25 22:02:51 +11:00
Angus McLeod
f7c1185644 Update group validation 2020-03-24 21:45:28 +11:00
Angus McLeod
ab1763545b Update custom.js.es6 2020-03-24 21:24:27 +11:00
Angus McLeod
8a4b4413b9 Update wizard-custom-action.hbs 2020-03-24 21:22:32 +11:00
Angus McLeod
b81685e1d1 Bugfixes 2020-03-24 21:14:42 +11:00
Angus McLeod
fe7283ab3c Add content conditionals 2020-03-24 20:35:46 +11:00
Robert Barrow
ce9373dd91 working url and number validation 2020-03-23 18:40:11 +00:00
Robert Barrow
506a245a47 Merge branch 'master' into number_and_url_validation 2020-03-23 14:51:01 +00:00
Robert Barrow
f2d7f57bb6 first feature commit 2020-03-23 14:49:39 +00:00
Angus McLeod
3a14cb0805 wip 2020-03-23 16:41:04 +11:00
Angus McLeod
632493f363 Update builder.rb 2020-03-22 17:51:20 +11:00
Angus McLeod
ffde10c217 wip 2020-03-22 17:47:56 +11:00
Angus McLeod
2e6ab27ea0 add prefil 2020-03-22 04:30:11 +11:00
Angus McLeod
b8369146c7 remove preset dropdown 2020-03-19 18:58:45 +11:00
Angus McLeod
ca5afcb95d Update wizard-custom.js 2020-03-15 17:20:46 +11:00
Angus McLeod
cf7b8f0115 Update wizard-custom.js 2020-03-15 14:58:46 +11:00
Angus McLeod
0390f742a8
Merge pull request #29 from merefield/missing_tags_fix
FIX: missing tags when using custom tags
2020-03-06 16:09:15 +11:00
Robert Barrow
b8f9a73b21 FIX: missing tags when using custom tags 2020-03-04 14:10:16 +00:00
merefield
9ccef0832b Update wizard-custom.js
change to file locations in core
2020-02-08 13:16:29 +00:00
Angus McLeod
dd898a9921
Merge pull request #28 from paviliondev/select_kit_2
Update to select-kit-2
2020-02-05 19:13:22 +11:00
Angus McLeod
3b9488cacb Fix spec for CI 2020-02-05 18:20:39 +11:00
Angus McLeod
f2a97f903c Add onChange to category-selector 2020-02-05 18:20:24 +11:00
Angus McLeod
1b3dd5a6ba Revert use of options && other combo-box cleanups 2020-02-05 17:58:35 +11:00
Angus McLeod
e293a3f5e9 Update to select-kit-2 2020-02-02 21:42:05 +11:00
Angus McLeod
3825d2dba9 FIX: serializer associations 2019-12-13 09:54:13 +11:00
Angus McLeod
79dcacf451 tweak 2019-12-12 15:47:59 +11:00
Angus McLeod
4d1ee9007b Improve custom wizard serialization and add spec 2019-12-12 15:43:11 +11:00
Angus McLeod
c8ce5e957e Send enabled setting to client 2019-12-12 11:06:58 +11:00
Angus McLeod
e584123d34 FIX: extension module prepending 2019-12-12 10:53:13 +11:00
Angus McLeod
6ad44d58ad Add dropdown tests and improvements 2019-12-12 10:20:10 +11:00
Angus McLeod
c182435805
Merge pull request #27 from paviliondev/add_tests
Add tests
2019-12-11 15:33:56 +11:00
Angus McLeod
bc60283182 require simplecov 2019-12-09 19:14:31 +11:00
Angus McLeod
9e29947e27 Merge master 2019-12-09 17:21:38 +11:00
Angus McLeod
e8c81765f0 Update .travis.yml 2019-12-09 17:16:29 +11:00
Angus McLeod
d6621a830b Add plugins-specific coverage 2019-12-09 17:14:30 +11:00
Angus McLeod
8e5d6b779c Complete builder.rb spec 2019-12-09 16:51:42 +11:00
Angus McLeod
be83350b72 Tests WIP 2019-12-09 12:43:30 +11:00
merefield
0a79517301
Merge pull request #26 from merefield/national_flags_better_integration
REMOVE: all redundant nat flags logic that has been moved to national flags plugin
2019-12-06 11:47:08 +00:00
merefield
7541e09e98
Merge pull request #25 from merefield/another_require_fix
FIX: add yet another require to resolve critical failure
2019-12-06 11:34:42 +00:00
Robert Barrow
6f331388f4 FIX: add yet another require to resolve critical failure 2019-12-06 11:33:37 +00:00
Angus McLeod
a96a2b965c Bulder tests WIP 2019-12-06 20:05:19 +11:00
Angus McLeod
ba33576f51 File restructuring 2019-12-05 19:05:21 +11:00
Angus McLeod
f1fdc37a21 Add enabled setting && tests && file restructure 2019-12-05 17:48:32 +11:00
Angus McLeod
bbfc5abae1 Add rspec folder structure 2019-12-04 22:13:51 +11:00
Angus McLeod
9ac57eeb98 FEATURE: Add real Discourse composer 2019-11-20 23:08:04 +11:00
Angus McLeod
c812f60fd7 FIX: pass restart_on_revisit as option on initial load 2019-11-15 10:29:48 +11:00
Angus McLeod
acad46b246 Add reader property 2019-11-15 10:00:02 +11:00
Angus McLeod
a68f7f8cbc FIX: Revisit mispellings 2019-11-15 09:47:20 +11:00
Angus McLeod
833195039b Add a whole bunch of required objects 2019-11-14 18:28:26 +11:00
merefield
468557058e
Merge pull request #24 from merefield/another_require_fix
FIX: add missing require to accommodate core change
2019-11-11 22:13:00 +00:00
Robert Barrow
c0b55f77b6 FIX: add missing require to accommodate core change 2019-11-11 21:58:23 +00:00
Angus McLeod
642e3cca98 FIX: reduce scope of ExtraLocalesController override 2019-11-11 09:48:26 +11:00
Robert Barrow
5b210c41d4 REMOVE: all national flags logic that will be moved to national flags plugin 2019-11-10 22:48:06 +00:00
Angus McLeod
ef81a07918
Merge pull request #23 from merefield/reset_wizard
FEATURE:  new option to force restart at each revisit
2019-11-08 12:09:07 +11:00
Robert Barrow
2e1926fc8a Merge branch 'master' of https://github.com/merefield/discourse-custom-wizard into reset_wizard 2019-11-04 18:10:20 +00:00
Robert Barrow
1c3d272b79 FEATURE: new option to force restart at each revisit 2019-11-04 17:49:30 +00:00
merefield
dfc2b90961
Merge pull request #22 from merefield/require_fix_experiment
add new dependency to fix critical failure of wizard
2019-10-31 23:30:06 +00:00
Robert Barrow
76444d6203 add dependency 2019-10-31 23:14:28 +00:00
Robert Barrow
8f347f428f require fix experiment 2019-10-31 16:03:16 +00:00
merefield
2c101e61ed
Merge pull request #21 from merefield/juless_extensions
FIX: avoid exception if no update data is available for update profile
2019-10-26 23:54:41 +01:00
Robert Barrow
fd9cc78e58 FIX: avoid exception if no update data is available 2019-10-26 23:52:49 +01:00
merefield
8dacd5ec4c
Merge pull request #20 from merefield/juless_extensions
FIX: checkbox showed incorrect value
2019-10-24 19:15:29 +01:00
Robert Barrow
b84677ddb6 FIX: checkbox showed incorrect value 2019-10-24 19:13:54 +01:00
merefield
dd5bacfd0f
Merge pull request #19 from merefield/juless_extensions
FIX: gracefully deal with lack of field label for dropdown and add settings key value.
2019-10-22 20:41:57 +01:00
Robert Barrow
c9348469d7 FIX: gracefully deal with lack of field label for dropdown and add settings explanation key value 2019-10-22 20:40:27 +01:00
merefield
d03f8c964f
Merge pull request #18 from merefield/juless_extensions
new site setting to allow admin to choose the label cue for nat flags
2019-10-21 11:58:31 +01:00
Robert Barrow
ce49a8ab94 new site setting to allow admin to choose the label cue to show national flag images when using the drop-down to select flag 2019-10-21 11:56:36 +01:00
Angus McLeod
71386efff7
Merge pull request #17 from paviliondev/fix-redirect-after-login
fix redirect after login
2019-10-17 11:38:43 +11:00
Angus McLeod
085f4b1633 Use non-e6 formatting 2019-10-17 11:26:21 +11:00
Angus McLeod
aab2662f9c Add path to redirect 2019-10-17 11:16:41 +11:00
Angus McLeod
7792d2365b FIX: properly account for custom tag fields 2019-10-15 16:34:43 +11:00
Angus McLeod
9880bd780e FIX: limit wizard fields to category fields for custom categories 2019-10-15 16:08:49 +11:00
Angus McLeod
2f02ca0fb2
Merge pull request #15 from merefield/juless_extensions
NEW FEATURES:  support for user avatars, national flags plugin and optional messages
2019-10-15 12:13:23 +11:00
Angus McLeod
a3ccbe6a4e Merge branch 'master' into fix-redirect-after-login 2019-10-14 11:04:46 +11:00
Robert Barrow
7e0c2b37f4 update to fix search for flag dropdown 2019-10-12 18:55:01 +01:00
Marcus Baw
7dc42c24ea javascript based cookie setting and redirect, removed ruby cookie handling 2019-10-11 12:40:11 +01:00
Robert Barrow
fc602db262 Merge branch 'master' of https://github.com/angusmcleod/discourse-custom-wizard into juless_extensions 2019-10-11 10:47:16 +01:00
Angus McLeod
bdb1d936b9 Remove link functionality from editor 2019-10-11 08:49:20 +11:00
Robert Barrow
c5c91a11af MERGE: merged upstream changes 2019-10-09 16:06:39 +01:00
Robert Barrow
d1b4a96e2c FIX: better solution for setting a required field for send_message 2019-10-09 16:02:06 +01:00
Angus McLeod
a2b15024b9 precompile wizard-custom-guest 2019-10-09 10:09:30 +11:00
Angus McLeod
6d63a7927b
Merge pull request #16 from paviliondev/add_guest_login
add guest login
2019-10-08 21:33:29 +11:00
Angus McLeod
82cb2668bc add guest login 2019-10-08 16:46:13 +11:00
Robert Barrow
f1ea4159f5 Merge branch 'juless_extensions' of https://github.com/merefield/discourse-custom-wizard into juless_extensions 2019-10-04 22:17:52 +01:00
Robert Barrow
96d5a189dc Various PR fixes inc moving flag data to yml, making accepted image upload files a site setting and adding class binding for image uploads 2019-10-04 22:13:41 +01:00
Angus McLeod
514a03c3af add require_dependency back for backwards compatibility 2019-10-03 16:54:15 +10:00
Angus McLeod
954dea0af9 zeitwork compatibility 2019-10-03 15:17:21 +10:00
Angus McLeod
82d98892a3 FIX: allow action tags and topic field tag mapping to work together 2019-10-03 12:17:33 +10:00
Angus McLeod
f1a310ad4a FIX: zeitwork cleanup 2019-10-03 10:40:06 +10:00
Angus McLeod
e328331249 FIX: action category selection 2019-10-02 14:24:02 +10:00
Robert Barrow
fe67efdb3c improve CSS for intellisense results presentation 2019-10-01 19:39:39 +01:00
Robert Barrow
979e896d6b leave send_message if there are any empty data fields 2019-10-01 18:14:15 +01:00
Robert Barrow
f5fc69a908 FIX: add ability for send_message to recognise custom title 2019-10-01 17:13:15 +01:00
Angus McLeod
9a3506a9d6 FIX: required data check 2019-09-24 15:52:09 +08:00
Robert Barrow
d376e178b4 removed console log 2019-09-23 23:00:53 +01:00
Robert Barrow
1597e40a8a FEATURE: added image preview for image uploads 2019-09-23 22:16:41 +01:00
Robert Barrow
938e29fe3f NEW FEATURE: can upload avatar in a wizard step 2019-09-11 12:58:57 +01:00
Angus McLeod
26ce6a313b boolean cast bugfix 2019-09-11 21:30:59 +10:00
Angus McLeod
0b9abf84cc Add support for date variable in field interpolation 2019-09-11 19:53:51 +10:00
Robert Barrow
5befcd2f23 Merge branch 'master' into juless_extensions 2019-09-11 10:15:33 +01:00
Angus McLeod
83b49a9082 Profile updates bugfixes 2019-09-11 19:08:00 +10:00
Robert Barrow
1670ed4b67 NEW FEATURE: ability to request national flag update in wizard 2019-09-11 09:30:38 +01:00
Angus McLeod
961ad8cc27 bugfix 2019-08-29 10:24:10 +10:00
Angus McLeod
b779642422 Properly clean up route_to after it's used 2019-08-29 10:22:02 +10:00
Angus McLeod
f4a5b49446 route_to should take precedence 2019-08-29 09:53:24 +10:00
Angus McLeod
ad18ec9809 Improve redirect code clarity 2019-08-29 09:51:18 +10:00
Angus McLeod
69c25171d5 Fix sub-category slugs 2019-08-27 17:28:49 +10:00
Angus McLeod
f317032bca Add open composer action 2019-08-27 16:05:24 +10:00
Angus McLeod
9006126e04 Fix wizard locales for non-staff 2019-08-27 14:49:29 +10:00
Angus McLeod
a52b54c463 Remove bottom margin from step titles 2019-08-27 09:34:48 +10:00
Angus McLeod
243343987a Remove uncessary css 2019-08-21 11:12:47 +10:00
Angus McLeod
c565516ac4 Stylesheet loading has changed 2019-08-21 10:36:31 +10:00
Angus McLeod
a6516fe383 re-add submissions 2019-08-13 15:51:37 +10:00
Angus McLeod
30390e8264 Improve flexibility and structure of send_to_api action 2019-08-13 14:11:46 +10:00
Angus McLeod
6ad821024a
Merge pull request #14 from angusmcleod/pr/13
Pr/13
2019-08-07 20:59:56 +10:00
Angus McLeod
7cd5069069 minor formatting 2019-08-07 20:46:05 +10:00
Angus McLeod
c156dcb6d1 Componentize 2019-08-07 20:38:50 +10:00
Angus McLeod
922afdc1bd Client and server-side fixes 2019-08-07 20:16:05 +10:00
Angus McLeod
ee71719793 client-side improvements 2019-08-07 18:18:46 +10:00
Faizaan Gagan
861ab40a5a minor issue: passing parameter to translation string 2019-08-06 16:47:03 +05:30
Faizaan Gagan
25792f92e4 Fixed code formatting, tweaked css, moved remaining hardcoded strings to translations and removed all console.log calls 2019-08-06 16:38:05 +05:30
Angus McLeod
b634bed1d0 Add key recursion to wizard field interpolation 2019-08-01 11:05:03 +10:00
Angus McLeod
b41d66214a Fix validations 2019-07-31 17:42:50 +10:00
Angus McLeod
5b3245c576 Update field validation 2019-07-31 16:57:25 +10:00
Angus McLeod
f60ae12610 Move badges into main stylesheet 2019-07-31 16:25:19 +10:00
Faizaan Gagan
e4de1d4145 converted all the server side strings to translation ready strings 2019-07-31 10:27:40 +05:30
Angus McLeod
67074e975b Simplify css file requiring 2019-07-31 13:39:53 +10:00
Angus McLeod
0c61a9b5dc style tweaks 2019-07-31 12:53:42 +10:00
Angus McLeod
3046d16ff3 Style tweaks 2019-07-31 12:31:15 +10:00
Faizaan Gagan
bf9ceb6dd3 made the changes discussed with Angus, some UI improvements and some edge-case validations 2019-07-30 22:34:18 +05:30
Faizaan Gagan
98d8eeffca added some validations and changed the import logic to use FormData instead of FileReader 2019-07-29 13:30:56 +05:30
Faizaan Gagan
63fb0658e9 added a feature for importing and exporting wizards 2019-07-28 02:47:20 +05:30
Angus McLeod
eeba1d45d1 Style tweak 2019-07-27 17:14:07 +10:00
Angus McLeod
fa6414aaf7 set reset to null after load 2019-07-27 17:07:22 +10:00
Angus McLeod
802f7d1fd5 Add required data message 2019-07-27 17:01:29 +10:00
Angus McLeod
c058340c84 Fix tag and category fields 2019-07-27 16:10:26 +10:00
Angus McLeod
0460f9342d Allow selection of category property type 2019-07-26 19:12:58 +10:00
Angus McLeod
a1c8b53e64 Only save category ids 2019-07-26 18:59:41 +10:00
Angus McLeod
dfe8debda7 Revert "Revert "Add category and tag selectors""
This reverts commit f8a8d5a964.
2019-07-26 18:59:21 +10:00
Angus McLeod
f8a8d5a964 Revert "Add category and tag selectors"
This reverts commit 2e5af57c26.
2019-07-26 18:23:16 +10:00
Angus McLeod
2e5af57c26 Add category and tag selectors 2019-07-26 18:00:55 +10:00
Angus McLeod
7a27139ebc fix composer 2019-07-22 17:28:49 +10:00
Angus McLeod
05b651fdc6 Allow custom profile updates 2019-07-22 17:16:22 +10:00
Angus McLeod
81d86bec7c Add file types setting to upload field 2019-07-19 13:47:17 +10:00
Angus McLeod
0b90fdabcf bugfix 2019-07-18 09:18:08 +10:00
Angus McLeod
c9b7296640 Add preset dropdown for tags 2019-07-12 11:55:53 +10:00
Angus McLeod
e414e651cc Merge fix 2019-07-12 11:06:39 +10:00
Angus McLeod
91a9d30a8a
Merge pull request #12 from angusmcleod/api_authentication
Api authentication
2019-07-12 11:01:12 +10:00
Angus McLeod
dfc87bccb0
Merge branch 'master' into api_authentication 2019-07-12 11:00:10 +10:00
Angus McLeod
8aeb3fb32d tweak text 2019-07-02 16:52:47 +10:00
Angus McLeod
49c6456b87 Merge branch 'master' of https://github.com/angusmcleod/discourse-custom-wizard 2019-07-02 14:49:41 +10:00
Angus McLeod
650dc498a4 Add required data && permitted params to steps 2019-07-02 14:49:14 +10:00
Angus McLeod
3950d136b0
Merge pull request #11 from spacerest/view-submissions-css
View submissions css
2019-07-01 16:29:31 +10:00
Angus McLeod
f693a2d25a Add add_to_group action 2019-07-01 12:31:50 +10:00
spacerest
f1bb2f6be1 fix update css so wizard submissions table doesn't get cut off 2019-06-30 14:21:40 +09:30
spacerest
645c94c170 update css so wizard submissions table doesn't get cut off 2019-06-30 14:13:37 +09:30
Sadie Parker
d607c5cd08
Merge pull request #1 from angusmcleod/master
bring my fork up to date
2019-06-25 10:34:12 +09:30
Angus McLeod
20f605b899 Use wizard name in no access messages 2019-06-19 13:39:39 +08:00
Angus McLeod
aa7dd16827 Handle guests on wizard routes 2019-06-19 13:23:10 +08:00
Angus McLeod
92fb880502 Cook step titles 2019-06-19 12:32:03 +08:00
Robert Barrow
8db52e0656 a slew of bug fixes to ensure a fault free OAuth 2 authorisation 2019-06-16 16:40:47 +01:00
Robert Barrow
15e52a5e42 added CSS for log table to match existing 2019-06-16 14:44:23 +01:00
Robert Barrow
fa39bbff29 FIX: logs weren't deleting when trash can was pressed 2019-06-16 14:33:30 +01:00
Robert Barrow
7efaf25572 added logging to token refresh, added user column to log and log display 2019-06-16 12:49:51 +01:00
Robert Barrow
c6fed81d28 updated some ember actions to closure actions to remove deprecation warnings, fixed issue where you could not remove last auth parameter as key would never be cleared 2019-06-12 21:57:38 +01:00
Angus McLeod
620f30368e bugfix min length 2019-06-11 17:19:46 +10:00
Angus McLeod
b9f8cc61b2 distinguish between 2 legged and 3 legged oauth && other authorization improvements 2019-06-07 13:09:31 +10:00
Angus McLeod
4f195c704a Additional error handling 2019-06-07 09:57:34 +10:00
Robert Barrow
95ba52f973 added logging for api calls 2019-06-06 17:10:13 +01:00
Robert Barrow
1544d4494b removed test file 2019-06-05 22:29:35 +01:00
Robert Barrow
def5f8e669 added validation for endpoint body JSON in API admin and fixed error handling in actual API calls 2019-06-05 22:23:15 +01:00
Robert Barrow
06f9b4be69 fix for empty api_body and addition of catch for bad JSON 2019-06-04 19:51:24 +01:00
Angus McLeod
7d04ffbde5 set min-height and allow resize for composer 2019-06-03 18:18:31 +10:00
Angus McLeod
8f64d77940 Add special formatting for tags in Create Topic Topic Fields 2019-06-03 17:51:45 +10:00
Angus McLeod
5ffcee1dde Add custom wizard integration 2019-06-03 17:09:24 +10:00
Angus McLeod
819c76b3ff API data validation and administration improvements 2019-06-03 12:49:54 +10:00
Angus McLeod
22d1c6fd06 API Admin client-side cleanups 2019-06-03 09:40:54 +10:00
Robert Barrow
cc98a14d15 added basic auth interface changes and supporting code 2019-06-02 23:59:35 +01:00
Angus McLeod
f331f80cbb Update wizard api CRUD
- New api metadata model
- New api id system
- Minor UI updates
2019-06-02 20:54:31 +10:00
Angus McLeod
6345083c4d initialize auth params and endpoints in the route & model 2019-06-01 12:25:09 +10:00
Robert Barrow
65979e1987 non working controller updates 2019-06-01 00:06:30 +01:00
Robert Barrow
582e2cca42 fixed issue that prevented you adding params or endpoints when there were none to begin with 2019-05-31 23:25:22 +01:00
Robert Barrow
06b5e28ced removed debug statement from javascript 2019-05-31 22:37:17 +01:00
Robert Barrow
6afdeb7408 resolved type error for api.get not a function and for error on save when no endpoints 2019-05-31 22:32:24 +01:00
Angus McLeod
9ff904d0fa WIP: Add Endpoint Administration 2019-05-31 17:54:11 +10:00
Angus McLeod
01a9e7f148 complete OAuth authorization && Start API Admin UI 2019-05-30 15:04:34 +10:00
Robert Barrow
3da8833410 add parameter constraints for callback controller 2019-05-29 23:18:38 +01:00
Robert Barrow
fdecbe155e added controller to handle callbacks 2019-05-22 11:46:34 +01:00
Robert Barrow
52b8c229ba added code to handle token refresh jobs specific to services 2019-05-19 14:56:17 +01:00
Angus McLeod
bc1cea1f69
Merge pull request #9 from romanrizzi/remove_unused_group_option
Remove unused group option from custom-user-search
2019-05-16 11:34:49 +10:00
Angus McLeod
3aeb6a3b47
Merge pull request #10 from merefield/api_authentication
Api authentication
2019-05-16 09:38:08 +10:00
Robert Barrow
0ca8758f6c comments cleanup and added better paramater check for oauth2 2019-05-15 08:09:48 +01:00
Robert Barrow
08172d7d35 added basic authentication and error handling 2019-05-15 07:54:32 +01:00
romanrizzi
a4cacb169d Removed group option since it's not used and we're planning to deprecate it soon 2019-05-14 16:57:03 -03:00
Robert Barrow
19a9497d74 added authentication protocol type 2019-05-14 14:54:33 +01:00
Robert Barrow
839f085500 add file reference to plugin dot rb 2019-05-12 15:08:59 +01:00
Robert Barrow
221c233e6d first commit 2019-05-11 16:53:37 +01:00
Angus McLeod
1709900d51 remove margin on step-description 2019-04-26 11:25:36 +10:00
Angus McLeod
cd51e4cbca fix placeholders 2019-04-18 09:47:41 +10:00
Angus McLeod
29ad274df7 Merge branch 'master' of https://github.com/angusmcleod/discourse-custom-wizard 2019-04-12 19:43:13 +10:00
Angus McLeod
53952bbc1e css tweak 2019-04-12 19:42:59 +10:00
Angus McLeod
1a9c7d8589
Merge pull request #8 from nbianca/remove_dep
FIX: Remove outdated dependency.
2019-04-11 10:44:29 +10:00
Bianca Nenciu
ef84cbebd4
FIX: Remove outdated dependency. 2019-04-10 18:05:01 +03:00
Angus McLeod
62ee016c7c ensure wizard exists before forcing redirect 2019-04-09 19:11:09 +10:00
Angus McLeod
80e5bcc0dc add none placeholder for action types 2019-04-09 19:00:00 +10:00
Angus McLeod
e127d0c2ae
Merge pull request #7 from procourse/fix_footer_logo
Fix missing footer image
2019-04-02 11:41:26 +11:00
Angus McLeod
e05f98e43a
Merge pull request #6 from MakaryGo/patch-1
Fix for wizard height issue
2019-04-02 11:41:00 +11:00
Justin DiRose
5a70e79f5c FIX: Missing footer image 2019-03-26 10:53:59 -05:00
Makary
aea4d2f1c2
Fix for wizard height issue
This should take care of the layout issue mentioned below
https://meta.discourse.org/t/custom-wizard-plugin/73345/272?u=makarygo
2019-03-26 04:17:23 +01:00
Angus McLeod
4316e6c6ce Add svg fontawesome icons 2019-02-20 17:27:17 +11:00
Angus McLeod
6aefc5a192 precompile raw-templates script 2019-01-29 11:42:23 +11:00
Angus McLeod
2e861f6b69 add wizard raw template pre-compilation 2019-01-29 11:30:35 +11:00
Angus McLeod
8eee281e25 location in wizard style improvements 2019-01-24 11:44:19 +11:00
Angus McLeod
2af1c543c1 gsub fix 2019-01-23 10:07:29 +11:00
Angus McLeod
a0b34f308b fix custom_title check 2019-01-22 13:45:49 +11:00
Angus McLeod
3a5d3a0687 stripe whitespace when validating length 2019-01-22 13:11:42 +11:00
Angus McLeod
cfb93e2adb Add postalcode translation 2019-01-22 10:57:33 +11:00
Angus McLeod
76c2e0a88d bugfix 2019-01-22 10:57:03 +11:00
Angus McLeod
c40a582a51 Dont restrict step height 2019-01-22 10:35:23 +11:00
Angus McLeod
36dd30bf46 style update 2019-01-22 10:15:42 +11:00
Angus McLeod
44e15ddfaa various fixes 2019-01-18 11:34:52 +11:00
Angus McLeod
50593dc298 preload custom wizard start script 2019-01-17 15:45:21 +11:00
Angus McLeod
0ea0524dcf add reset flag 2019-01-14 13:53:53 +11:00
Angus McLeod
e8ac4f7ca8 bugfix 2019-01-14 13:13:37 +11:00
Angus McLeod
87c0c8fe74 add calendar-o svg 2019-01-14 13:03:42 +11:00
Chad Boschert
1dae4fc537 IE11 CSS hack for decent display w/o flex support 2018-11-29 09:50:06 +11:00
Chad Boschert
126cdd910a Added IE11 polyfill to resolve client-side error that prevented wizard step from rendering 2018-11-29 09:50:06 +11:00
Chad Boschert
36117bdc60 IE 11 caches agressively; prevent ajax call from caching 2018-11-29 09:50:06 +11:00
Chad Boschert
d735395c3e Fix IE bug that causes undefined wizardid 2018-11-29 09:50:06 +11:00
Angus McLeod
e842801737 remove special_font_face 2018-11-29 09:34:43 +11:00
Angus McLeod
1a0a4fdbbe add custom value placeholder 2018-10-07 18:28:26 +11:00
Angus McLeod
f903aaed59 ensure custom_value is not a blank string 2018-10-07 18:03:53 +11:00
Angus McLeod
ea1c7f3e64 add french translations 2018-10-05 09:04:20 +10:00
Angus McLeod
7952fd03b1 ensure after_signup is not triggered on password reset 2018-09-25 21:04:08 +10:00
Angus McLeod
b78c2f0c0f add skip_redirect for actions 2018-09-18 11:56:42 +10:00
Angus McLeod
a1f4d6fdf9 Allow wizard and user fields in custom_title 2018-09-18 11:15:11 +10:00
Angus McLeod
5c7ab3d550
Merge pull request #5 from angusmcleod/pr/4
Add upload component
2018-09-15 16:22:08 +10:00
Angus McLeod
cb8f8e2410 save whole file object and show filename 2018-09-15 16:21:02 +10:00
James Hahn II
5232518bdc
Update wizard-field-upload.hbs 2018-09-11 10:51:40 -05:00
James Hahn II
51f4365976
Update field.rb 2018-09-09 08:20:12 -05:00
James Hahn II
6f0aa3d911
Update wizard-field-upload.js.es6 2018-09-09 08:07:49 -05:00
James Hahn II
85c64fb3b6
Update wizard-field-upload.hbs 2018-09-09 08:06:52 -05:00
James Hahn II
5c811bbb2f
Create wizard-field-upload.hbs 2018-09-09 08:03:46 -05:00
James Hahn II
a0a037a41b
Create wizard-field-upload.js.es6 2018-09-09 08:01:02 -05:00
James Hahn II
d565032245
Delete components 2018-09-09 08:00:11 -05:00
James Hahn II
e47835ae96
Create components 2018-09-09 07:56:37 -05:00
Angus McLeod
efa8a7bbc8 css 2018-09-05 13:49:03 +10:00
Angus McLeod
3cdaa82ac5 avoid exception if path is null 2018-08-29 10:01:52 +10:00
Angus McLeod
7303a9314d theme_id has been pluralized 2018-08-20 09:08:28 +10:00
Angus McLeod
8f4ee450ee style tweaks 2018-08-19 10:34:28 +10:00
Angus McLeod
b6c26b43a7 Add custom field validators 2018-08-19 10:34:20 +10:00
Angus
ac9ed0ef2f Add transifex and update travis 2018-07-17 10:28:27 +10:00
Angus
ef7f6dfffc Add copyright 2018-07-17 09:33:53 +10:00
Angus
7a781b24d0 theme key has changed to theme id 2018-07-17 08:57:53 +10:00
Angus McLeod
ea9a7c1654
Merge pull request #3 from orlando/master
set checkbox id for labels work correctly
2018-07-13 15:11:18 +10:00
Orlando Del Aguila
d6a40d3088 set checkbox id for labels work correctly 2018-07-11 14:37:04 -05:00
Angus McLeod
8de21f05b3 We're taking an exclusive approach to attributes in the client now 2018-07-06 11:09:38 +10:00
Angus McLeod
b71ec64a9f Refactor redirect logic and update not_permitted text 2018-07-06 10:58:53 +10:00
Angus McLeod
c098a24cb3 bugfix 2018-07-04 13:48:03 +10:00
Angus McLeod
33792e4d35 Re-apply sortable when links change 2018-06-29 16:54:06 +10:00
Angus McLeod
1b1df47e62 js formatting 2018-06-29 16:07:34 +10:00
Angus McLeod
af613c11d6 Handle submissions made by deleted users 2018-06-29 16:07:18 +10:00
Angus McLeod
dcee0b3774 Also standardise booleans when pre-filling fields 2018-06-29 12:51:59 +10:00
Angus McLeod
72810b755a Update check 2018-06-22 00:03:29 +10:00
Angus McLeod
0dab4f4964 boolean cast fix 2018-06-19 09:56:45 +10:00
Angus McLeod
4830766649 Add head and body tags to wizard html 2018-06-14 10:00:50 +10:00
Angus McLeod
bdc699d43f Add wizard find method 2018-06-14 10:00:36 +10:00
Angus McLeod
1b83570ad3 Style disabled inputs 2018-06-14 09:59:58 +10:00
Angus McLeod
0bb1660b6b Replace object.assign with jQuery extend 2018-06-14 09:59:41 +10:00
Angus McLeod
6fab152930 Only check if time is valid if time has changed 2018-06-06 23:49:28 +10:00
Angus McLeod
e8a28ad22d Allow after time wizards to be updated without changing the time 2018-06-06 22:05:45 +10:00
Angus McLeod
b0223cc62d Ensure all checkboxes are boolean when validating 2018-06-05 13:11:52 +10:00
Angus McLeod
2dc7ada433 Better check of value 2018-06-05 12:54:05 +10:00
Angus McLeod
9343b63945 Value can be false 2018-06-05 12:37:47 +10:00
Angus McLeod
9bbc72481a Ensure added fields have a key and value 2018-06-05 12:36:56 +10:00
Angus McLeod
17ba9976c0 Add redirect on signup for approved users 2018-06-05 12:25:44 +10:00
Angus McLeod
a5a18666ad Also pass custom_fields to the UserUpdater 2018-05-25 10:43:46 +10:00
Angus McLeod
bf15927c8e Filter redirect_to from submissions 2018-05-24 22:54:36 +10:00
Angus McLeod
54a889d8e0 Add privacy to exclude path choices 2018-05-24 17:53:22 +10:00
Angus McLeod
cb9e37cf30 Fix client redirect 2018-05-24 16:11:23 +10:00
Angus McLeod
2981c32ea5 Add support for user_fields 2018-05-24 15:34:58 +10:00
Angus McLeod
5b312eca07 Add excluded paths setting 2018-05-24 15:34:02 +10:00
Angus McLeod
6d769a5392 If wizard is required add a redirect_to after signup 2018-05-24 15:32:51 +10:00
Angus McLeod
a9b5c2700c Ensure submissions are underscored 2018-05-24 15:32:22 +10:00
Angus McLeod
4f4b8c49b2 Ensure redirects are dasherized at the point of routing. 2018-05-24 15:32:07 +10:00
Angus McLeod
cf4beb7619 Bugfix: fix error arising from restructure 2018-05-21 15:52:39 +10:00
Angus McLeod
8b88309ed0 More improvements to the builder structure 2018-05-20 13:15:53 +10:00
Angus McLeod
b4e8572fd7 Fix custom labels and descriptions 2018-05-20 11:57:48 +10:00
Angus McLeod
39b323c5d1 Improve builder structure 2018-05-20 11:57:34 +10:00
Angus McLeod
e005eac934 Small tweaks 2018-05-16 17:19:03 +10:00
Angus McLeod
bc5a504dfd Minor fixes 2018-05-14 12:11:11 +10:00
Angus McLeod
bb0f3dfb3e Rm unnecessary options 2018-05-13 15:47:55 +10:00
Angus McLeod
b73b39370f Cook field labels 2018-05-13 15:46:02 +10:00
Angus McLeod
5e936036e6 Cook dropdown choices 2018-05-13 15:39:28 +10:00
Angus McLeod
1442bfe898 Template should return nil if there is wizard data 2018-05-11 10:43:00 +10:00
Angus McLeod
9a3ae6406f Fix completed? for reused wizards && ensure users with no access can get back to site 2018-05-09 15:06:43 +10:00
Angus McLeod
a295f6fe20 Stop reduce returning nil 2018-04-25 11:15:19 +10:00
Angus McLeod
26302cbad1 Restrict the cancelling of a scheduled after_time job is restricted to the current wizard 2018-04-24 10:55:03 +10:00
Angus McLeod
11c85270a7 Update wizard composer 2018-04-15 12:49:12 +10:00
Angus McLeod
9d8424a35f Allow theme to be added by name && use template when loading wizard for controller 2018-04-06 14:21:11 +10:00
Angus McLeod
4b4ed53a46 Field description styles are off 2018-04-05 15:49:39 +10:00
Angus McLeod
e674617e37 remove overly general description p style 2018-04-05 15:32:01 +10:00
Angus McLeod
70e623a6bc Move tx config to a seperate branch for now 2018-03-30 11:23:39 +11:00
604 geänderte Dateien mit 82245 neuen und 5355 gelöschten Zeilen

3
.discourse-compatibility Normale Datei
Datei anzeigen

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

3
.eslintrc Normale Datei
Datei anzeigen

@ -0,0 +1,3 @@
{
"extends": "eslint-config-discourse"
}

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

44
.github/workflows/plugin-metadata.yml gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,44 @@
name: Metadata
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout head repository
uses: actions/checkout@v2
- name: Store head version
run: |
sed -n -e 's/^.*version: /head_version=/p' plugin.rb >> $GITHUB_ENV
- name: Checkout base repository
uses: actions/checkout@v2
with:
ref: "${{ github.base_ref }}"
- name: Store base version
run: |
sed -n -e 's/^.*version: /base_version=/p' plugin.rb >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install semver
run: npm install --include=dev
- name: Check version
uses: actions/github-script@v5
with:
script: |
const semver = require('semver');
const { head_version, base_version } = process.env;
if (semver.lte(head_version, base_version)) {
core.setFailed("Head version is equal to or lower than base version.");
}

8
.gitignore gevendort Normale Datei
Datei anzeigen

@ -0,0 +1,8 @@
coverage/*
!coverage/.last_run.json
gems/*
.bundle/
auto_generated
.DS_Store
node_modules/
vendor/*

1
.prettierrc Normale Datei
Datei anzeigen

@ -0,0 +1 @@
{}

8
.rubocop.yml Normale Datei
Datei anzeigen

@ -0,0 +1,8 @@
inherit_gem:
rubocop-discourse: default.yml
RSpec/ContextWording:
Enabled: false
RSpec/DescribeClass:
Enabled: false

7
.simplecov Normale Datei
Datei anzeigen

@ -0,0 +1,7 @@
# frozen_string_literal: true
plugin = "discourse-custom-wizard"
SimpleCov.configure do
track_files "plugins/#{plugin}/**/*.rb"
add_filter { |src| !(src.filename =~ /(\/#{plugin}\/app\/|\/#{plugin}\/lib\/)/) }
end

4
.template-lintrc.js Normale Datei
Datei anzeigen

@ -0,0 +1,4 @@
module.exports = {
plugins: ["ember-template-lint-plugin-discourse"],
extends: "discourse:recommended",
};

Datei anzeigen

@ -1,10 +1,10 @@
install: skip services:
script: skip - docker
sudo: required
after_success: before_install:
- pip install virtualenv - git clone --depth=1 https://github.com/discourse/discourse-plugin-ci
- virtualenv ~/env
- source ~/env/bin/activate install: true
- pip install transifex-client
- sudo echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"$TRANSIFEX_USER"$'\npassword = '"$TRANSIFEX_PASSWORD"$'\ntoken = '"$TRANSIFEX_API_TOKEN"$'\n' > ~/.transifexrc script:
- tx push -s - discourse-plugin-ci/script.sh

Datei anzeigen

@ -13,4 +13,3 @@ file_filter = config/locales/server.<lang>.yml
source_file = config/locales/server.en.yml source_file = config/locales/server.en.yml
source_lang = en source_lang = en
type = YML type = YML

15
COPYRIGHT.txt Normale Datei
Datei anzeigen

@ -0,0 +1,15 @@
All code in this repository is Copyright 2023 by Angus McLeod.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with this program as the file LICENSE.txt; if not, please see
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.

7
Gemfile Normale Datei
Datei anzeigen

@ -0,0 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'
group :development do
gem 'rubocop-discourse'
end

39
Gemfile.lock Normale Datei
Datei anzeigen

@ -0,0 +1,39 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
json (2.6.2)
parallel (1.22.1)
parser (3.1.2.1)
ast (~> 2.4.1)
rainbow (3.1.1)
regexp_parser (2.6.0)
rexml (3.2.5)
rubocop (1.36.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.22.0)
parser (>= 3.1.1.0)
rubocop-discourse (3.0)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.13.2)
rubocop (~> 1.33)
ruby-progressbar (1.11.0)
unicode-display_width (2.3.0)
PLATFORMS
ruby
DEPENDENCIES
rubocop-discourse
BUNDLED WITH
2.2.16

Datei anzeigen

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

7
SECURITY.md Normale Datei
Datei anzeigen

@ -0,0 +1,7 @@
# Security Policy
The security of Discourse plugins are premised on the security of [Discourse](https://github.com/discourse/discourse). Please first consider whether a security issue is best reported and handled by the Discourse team. You can view the Discourse security policy [here](https://github.com/discourse/discourse/security/policy).
## Reporting a Vulnerability
If you find a security vulnerability that is specific to this plugin, please report it to development@pavilion.tech. Security issues always take precedence over all other work. All commits specific to security are prefixed with SECURITY.

Datei anzeigen

@ -0,0 +1,30 @@
# frozen_string_literal: true
class CustomWizard::AdminController < ::Admin::AdminController
before_action :ensure_admin
def index
subcription = CustomWizard::Subscription.new
render_json_dump(
subscribed: subcription.subscribed?,
subscription_type: subcription.type,
subscription_attributes: CustomWizard::Subscription.attributes,
subscription_client_installed: CustomWizard::Subscription.client_installed?
)
end
private
def find_wizard
params.require(:wizard_id)
@wizard = CustomWizard::Wizard.create(params[:wizard_id].underscore)
raise Discourse::InvalidParameters.new(:wizard_id) unless @wizard
end
def custom_field_list
serialize_data(CustomWizard::CustomField.full_list, CustomWizard::CustomFieldSerializer)
end
def render_error(message)
render json: failed_json.merge(error: message)
end
end

Datei anzeigen

@ -0,0 +1,141 @@
# frozen_string_literal: true
class CustomWizard::AdminApiController < CustomWizard::AdminController
skip_before_action :check_xhr, only: [:redirect]
def list
serializer = ActiveModel::ArraySerializer.new(CustomWizard::Api.list,
each_serializer: CustomWizard::BasicApiSerializer
)
render json: MultiJson.dump(serializer)
end
def find
render_serialized(CustomWizard::Api.get(api_params[:name]), CustomWizard::ApiSerializer, root: false)
end
def save
current = CustomWizard::Api.get(api_params[:name])
if api_params[:new] && current
raise Discourse::InvalidParameters, "An API with that name already exists: '#{current.title || current.name}'"
end
unless subscription.includes?(:api, :all)
raise Discourse::InvalidParameters, "Your subscription doesn't include API features."
end
PluginStoreRow.transaction do
CustomWizard::Api.set(api_params[:name], title: api_params[:title])
if auth_data.present?
auth_data['auth_params'] = auth_data['auth_params'] || []
CustomWizard::Api::Authorization.set(api_params[:name], auth_data)
end
if api_params[:endpoints].is_a? String
begin
endpoints = JSON.parse(api_params[:endpoints])
endpoints.each do |endpoint|
CustomWizard::Api::Endpoint.set(api_params[:name], endpoint)
end
rescue => e
puts e
end
end
end
render json: success_json.merge(
api: CustomWizard::ApiSerializer.new(
CustomWizard::Api.get(api_params[:name]),
root: false
)
)
end
def remove
PluginStoreRow.transaction do
CustomWizard::Api.remove(api_params[:name])
CustomWizard::Api::Authorization.remove(api_params[:name])
CustomWizard::Api::Endpoint.remove(api_params[:name])
CustomWizard::Api::LogEntry.clear(api_params[:name])
end
render json: success_json
end
def authorize
result = CustomWizard::Api::Authorization.get_token(api_params[:name])
if result.instance_variable_defined?(:@error)
render json: failed_json.merge(message: result['error_description'] || result['error'])
else
render json: success_json.merge(
api: CustomWizard::ApiSerializer.new(
CustomWizard::Api.get(api_params[:name]),
root: false
)
)
end
end
def clearlogs
CustomWizard::Api::LogEntry.clear(api_params[:name])
render json: success_json
end
def redirect
params.require(:name)
params.require(:code)
CustomWizard::Api::Authorization.set(params[:name], code: params[:code])
CustomWizard::Api::Authorization.get_token(params[:name])
redirect_to path('/admin/wizards/apis/' + params[:name])
end
private
def api_params
params.require(:name)
data = params.permit(
:name,
:title,
:auth_type,
:auth_url,
:token_url,
:client_id,
:client_secret,
:username,
:password,
:auth_params,
:endpoints,
:new
).to_h
data[:name] = data[:name].underscore
@api_params ||= data
end
def auth_data
auth_data = api_params.slice(
:auth_type,
:auth_url,
:token_url,
:client_id,
:client_secret,
:username,
:password,
:auth_params
)
auth_data[:auth_params] = JSON.parse(auth_data[:auth_params]) if auth_data[:auth_params].present?
@auth_data ||= auth_data
end
def subscription
@subscription ||= CustomWizard::Subscription.new
end
end

Datei anzeigen

@ -0,0 +1,66 @@
# frozen_string_literal: true
class CustomWizard::AdminCustomFieldsController < CustomWizard::AdminController
def index
render_json_dump(
custom_fields: custom_field_list
)
end
def update
errors = []
field_id = nil
field_data = {}
if saved_field = CustomWizard::CustomField.find(field_params[:id].to_i)
CustomWizard::CustomField::ATTRS.each do |attr|
field_data[attr] = saved_field.send(attr)
end
field_id = saved_field.id
end
CustomWizard::CustomField::ATTRS.each do |attr|
field_data[attr] = field_params[attr]
end
field = CustomWizard::CustomField.new(field_id, field_data)
PluginStoreRow.transaction do
unless field.save
field_errors = field.errors.any? ?
field.errors.full_messages.join("\n\n") :
I18n.t("wizard.custom_field.error.save_default", name: field.name)
errors << field_errors
raise ActiveRecord::Rollback.new
end
end
if errors.any?
render json: failed_json.merge(messages: errors)
else
render json: success_json
end
end
def destroy
params.require(:name)
if CustomWizard::CustomField.destroy(params[:name])
render json: success_json
else
render json: failed_json
end
end
private
def field_params
params.required(:custom_field)
.permit(
:id,
:name,
:klass,
:type,
serializers: []
)
end
end

Datei anzeigen

@ -0,0 +1,44 @@
# frozen_string_literal: true
class CustomWizard::AdminLogsController < CustomWizard::AdminController
before_action :find_wizard, except: [:index]
def index
render json: ActiveModel::ArraySerializer.new(
CustomWizard::Wizard.list(current_user),
each_serializer: CustomWizard::BasicWizardSerializer
)
end
def show
render_json_dump(
wizard: CustomWizard::BasicWizardSerializer.new(@wizard, root: false),
logs: ActiveModel::ArraySerializer.new(
log_list.logs,
each_serializer: CustomWizard::LogSerializer
),
total: log_list.total
)
end
protected
def log_list
@log_list ||= begin
list = CustomWizard::Log.list(params[:page].to_i, params[:limit].to_i, params[:wizard_id])
if list.logs.any? && (usernames = list.logs.map(&:username)).present?
user_map = User.where(username: usernames)
.reduce({}) do |result, user|
result[user.username] = user
result
end
list.logs.each do |log_item|
log_item.user = user_map[log_item.username]
end
end
list
end
end
end

Datei anzeigen

@ -0,0 +1,125 @@
# frozen_string_literal: true
class CustomWizard::AdminManagerController < CustomWizard::AdminController
skip_before_action :check_xhr, only: [:export]
before_action :get_wizard_ids, except: [:import]
def export
templates = []
@wizard_ids.each do |wizard_id|
if template = CustomWizard::Template.find(wizard_id)
templates.push(template)
end
end
if templates.empty?
return render_error(I18n.t('wizard.export.error.invalid_wizards'))
end
basename = SiteSetting.title.parameterize || 'discourse'
time = Time.now.to_i
filename = "#{basename}-wizards-#{time}.json"
send_data templates.to_json,
type: "application/json",
disposition: 'attachment',
filename: filename
end
def import
file = File.read(params['file'].tempfile)
if file.nil?
return render_error(I18n.t('wizard.export.error.no_file'))
end
file_size = file.size
max_file_size = 512 * 1024
if max_file_size < file_size
return render_error(I18n.t('wizard.import.error.file_large'))
end
begin
template_json = JSON.parse(file)
rescue JSON::ParserError
return render_error(I18n.t('wizard.import.error.invalid_json'))
end
imported = []
failures = []
templates = template_json.is_a?(Array) ? template_json : [template_json]
templates.each do |raw_template|
template = CustomWizard::Template.new(raw_template)
template.save(skip_jobs: true, create: true)
if template.errors.any?
failures.push(
id: template.data['id'],
messages: template.errors.full_messages.join(', ')
)
else
imported.push(
id: template.data['id'],
name: template.data['name']
)
end
end
render json: success_json.merge(
imported: imported,
failures: failures
)
end
def destroy
destroyed = []
failures = []
@wizard_ids.each do |wizard_id|
template = CustomWizard::Template.find(wizard_id)
if template && CustomWizard::Template.remove(wizard_id)
destroyed.push(
id: wizard_id,
name: template['name']
)
else
failures.push(
id: wizard_id,
messages: I18n.t("wizard.destroy.error.#{template ? 'default' : 'no_template'}")
)
end
end
render json: success_json.merge(
destroyed: destroyed,
failures: failures
)
end
private
def get_wizard_ids
if params['wizard_ids'].blank?
return render_error(I18n.t('wizard.export.error.select_one'))
end
wizard_ids = []
params['wizard_ids'].each do |wizard_id|
begin
wizard_ids.push(wizard_id.underscore)
rescue
#
end
end
if wizard_ids.empty?
return render_error(I18n.t('wizard.export.error.invalid_wizards'))
end
@wizard_ids = wizard_ids
end
end

Datei anzeigen

@ -0,0 +1,41 @@
# frozen_string_literal: true
class CustomWizard::AdminSubmissionsController < CustomWizard::AdminController
skip_before_action :preload_json, :check_xhr, only: [:download]
before_action :find_wizard, except: [:index]
def index
render json: ActiveModel::ArraySerializer.new(
CustomWizard::Wizard.list(current_user),
each_serializer: CustomWizard::BasicWizardSerializer
)
end
def show
render_json_dump(
wizard: CustomWizard::BasicWizardSerializer.new(@wizard, root: false),
submissions: ActiveModel::ArraySerializer.new(
submission_list.submissions,
each_serializer: CustomWizard::SubmissionSerializer
),
total: submission_list.total
)
end
def download
content = ActiveModel::ArraySerializer.new(
CustomWizard::Submission.list(@wizard).submissions,
each_serializer: CustomWizard::SubmissionSerializer
)
send_data content.to_json,
filename: "#{Discourse.current_hostname}-wizard-submissions-#{@wizard.name}.json",
content_type: "application/json",
disposition: "attachment"
end
protected
def submission_list
CustomWizard::Submission.list(@wizard, page: params[:page].to_i)
end
end

Datei anzeigen

@ -0,0 +1,173 @@
# frozen_string_literal: true
class CustomWizard::AdminWizardController < CustomWizard::AdminController
before_action :find_wizard, only: [:show, :remove]
def index
render_json_dump(
wizard_list: ActiveModel::ArraySerializer.new(
CustomWizard::Wizard.list(current_user),
each_serializer: CustomWizard::BasicWizardSerializer
),
field_types: CustomWizard::Field.types,
realtime_validations: CustomWizard::RealtimeValidation.types,
custom_fields: custom_field_list
)
end
def show
params.require(:wizard_id)
if data = CustomWizard::Template.find(params[:wizard_id].underscore)
render json: data.as_json
else
render json: { none: true }
end
end
def remove
if CustomWizard::Template.remove(@wizard.id)
render json: success_json
else
render json: failed_json
end
end
def save
template = CustomWizard::Template.new(save_wizard_params.to_h)
wizard_id = template.save(create: params[:create])
if template.errors.any?
render json: failed_json.merge(backend_validation_error: template.errors.full_messages.join("\n\n"))
else
render json: success_json.merge(wizard_id: wizard_id)
end
end
private
def mapped_params
[
:type,
:connector,
:output,
:output_type,
:output_connector,
pairs: [
:index,
:key,
:key_type,
:value,
:value_type,
:connector,
value: [],
key: [],
],
output: [],
]
end
def save_wizard_params
params.require(:wizard).permit(
:id,
:name,
:background,
:save_submissions,
:multiple_submissions,
:after_signup,
:after_time,
:after_time_scheduled,
:required,
:prompt_completion,
:restart_on_revisit,
:resume_on_revisit,
:theme_id,
permitted: mapped_params,
steps: [
:id,
:index,
:title,
:key,
:banner,
:banner_upload_id,
:raw_description,
:required_data_message,
:force_final,
required_data: mapped_params,
permitted_params: mapped_params,
condition: mapped_params,
fields: [
:id,
:index,
:label,
:image,
:image_upload_id,
:description,
:required,
:key,
:type,
:min_length,
:max_length,
:char_counter,
:file_types,
:format,
:limit,
:property,
:preview_template,
:placeholder,
:can_create_tag,
prefill: mapped_params,
content: mapped_params,
condition: mapped_params,
index: mapped_params,
validations: {},
tag_groups: [],
]
],
actions: [
:id,
:run_after,
:type,
:code,
:skip_redirect,
:suppress_notifications,
:post,
:post_builder,
:post_template,
:notification_level,
:api,
:api_endpoint,
:api_body,
:wizard_user,
title: mapped_params,
category: mapped_params,
tags: mapped_params,
custom_fields: mapped_params,
visible: mapped_params,
required: mapped_params,
recipient: mapped_params,
categories: mapped_params,
mute_remainder: mapped_params,
profile_updates: mapped_params,
group: mapped_params,
url: mapped_params,
name: mapped_params,
slug: mapped_params,
color: mapped_params,
text_color: mapped_params,
parent_category_id: mapped_params,
permissions: mapped_params,
full_name: mapped_params,
bio_raw: mapped_params,
usernames: mapped_params,
owner_usernames: mapped_params,
grant_trust_level: mapped_params,
mentionable_level: mapped_params,
messageable_level: mapped_params,
visibility_level: mapped_params,
members_visibility_level: mapped_params,
add_event: mapped_params,
add_location: mapped_params
]
)
end
end

Datei anzeigen

@ -0,0 +1,18 @@
# frozen_string_literal: true
class CustomWizard::RealtimeValidationsController < ::ApplicationController
def validate
klass_str = "CustomWizard::RealtimeValidation::#{validation_params[:type].camelize}"
result = klass_str.constantize.new(current_user).perform(validation_params)
render_serialized(result.items, "#{klass_str}Serializer".constantize, result.serializer_opts)
end
private
def validation_params
params.require(:type)
settings = ::CustomWizard::RealtimeValidation.types[params[:type].to_sym]
params.require(settings[:required_params]) if settings[:required_params].present?
params
end
end

Datei anzeigen

@ -0,0 +1,113 @@
# frozen_string_literal: true
class CustomWizard::StepsController < ::CustomWizard::WizardClientController
before_action :ensure_can_update
def update
update = update_params.to_h
update[:fields] = {}
if params[:fields]
field_ids = @builder.wizard.field_ids
params[:fields].each do |k, v|
update[:fields][k] = v if field_ids.include? k
end
end
@builder.build
updater = @builder.wizard.create_updater(update[:step_id], update[:fields])
updater.update
@result = updater.result
if updater.success?
wizard_id = update_params[:wizard_id]
builder = CustomWizard::Builder.new(wizard_id, current_user, guest_id)
@wizard = builder.build(force: true)
current_step = @wizard.find_step(update[:step_id])
current_submission = @wizard.current_submission
result = {}
if current_step.conditional_final_step && !current_step.last_step
current_step.force_final = true
end
if current_step.final?
builder.template.actions.each do |action_template|
if action_template['run_after'] === 'wizard_completion'
action_result = CustomWizard::Action.new(
action: action_template,
wizard: @wizard,
submission: current_submission
).perform
if action_result.success?
current_submission = action_result.submission
end
end
end
current_submission.save
if redirect = get_redirect
updater.result[:redirect_on_complete] = redirect
end
@wizard.cleanup_on_complete!
result[:final] = true
else
current_submission.save
result[:final] = false
result[:next_step_id] = current_step.next.id
end
result.merge!(updater.result) if updater.result.present?
result[:refresh_required] = true if updater.refresh_required?
result[:wizard] = ::CustomWizard::WizardSerializer.new(
@wizard,
scope: Guardian.new(current_user),
root: false
).as_json
render json: result
else
errors = []
updater.errors.messages.each do |field, msg|
errors << { field: field, description: msg.join(',') }
end
render json: { errors: errors }, status: 422
end
end
private
def ensure_can_update
raise Discourse::InvalidParameters.new(:wizard_id) if @builder.template.nil?
raise Discourse::InvalidAccess.new if !@builder.wizard || !@builder.wizard.can_access?
@step_template = @builder.template.steps.select do |s|
s['id'] == update_params[:step_id]
end.first
raise Discourse::InvalidParameters.new(:step_id) if !@step_template
raise Discourse::InvalidAccess.new if !@builder.check_condition(@step_template)
end
def update_params
@update_params || begin
params.require(:step_id)
params.require(:wizard_id)
params.permit(:wizard_id, :step_id).transform_values { |v| v.underscore }
end
end
def get_redirect
return @result[:redirect_on_next] if @result[:redirect_on_next].present?
submission = @wizard.current_submission
return nil unless submission.present?
## route_to set by actions, redirect_on_complete set by actions, redirect_to set at wizard entry
submission.route_to || submission.redirect_on_complete || submission.redirect_to
end
end

Datei anzeigen

@ -0,0 +1,39 @@
# frozen_string_literal: true
class CustomWizard::WizardController < ::CustomWizard::WizardClientController
def show
if wizard.present?
render json: CustomWizard::WizardSerializer.new(wizard, scope: guardian, root: false).as_json, status: 200
else
render json: { error: I18n.t('wizard.none') }
end
end
def skip
params.require(:wizard_id)
if wizard.required && !wizard.completed? && wizard.permitted?
return render json: { error: I18n.t('wizard.no_skip') }
end
result = { success: 'OK' }
if current_user && wizard.can_access?
if redirect_to = wizard.current_submission&.redirect_to
result.merge!(redirect_to: redirect_to)
end
wizard.cleanup_on_skip!
end
render json: result
end
protected
def wizard
@wizard ||= begin
return nil unless @builder.present?
@builder.build({ reset: params[:reset] }, params)
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

@ -0,0 +1,8 @@
# frozen_string_literal: true
module Jobs
class RefreshApiAccessToken < ::Jobs::Base
def execute(args)
CustomWizard::Api::Authorization.get_token(args[:name], refresh: true)
end
end
end

Datei anzeigen

@ -0,0 +1,24 @@
# frozen_string_literal: true
module Jobs
class SetAfterTimeWizard < ::Jobs::Base
def execute(args)
if SiteSetting.custom_wizard_enabled
wizard = CustomWizard::Wizard.create(args[:wizard_id])
if wizard && wizard.after_time
user_ids = []
User.human_users.each do |user|
if CustomWizard::Wizard.set_user_redirect(wizard.id, user)
user_ids.push(user.id)
end
end
CustomWizard::Template.clear_cache_keys
MessageBus.publish "/redirect_to_wizard", wizard.id, user_ids: user_ids
end
end
end
end
end

Datei anzeigen

@ -0,0 +1,17 @@
# frozen_string_literal: true
class CustomWizard::Api::AuthorizationSerializer < ::ApplicationSerializer
attributes :auth_type,
:auth_url,
:token_url,
:client_id,
:client_secret,
:authorized,
:auth_params,
:access_token,
:refresh_token,
:token_expires_at,
:token_refresh_at,
:code,
:username,
:password
end

Datei anzeigen

@ -0,0 +1,5 @@
# frozen_string_literal: true
class CustomWizard::Api::BasicEndpointSerializer < ::ApplicationSerializer
attributes :id,
:name
end

Datei anzeigen

@ -0,0 +1,13 @@
# frozen_string_literal: true
class CustomWizard::Api::EndpointSerializer < ::ApplicationSerializer
attributes :id,
:name,
:method,
:url,
:content_type,
:success_codes
def method
object.send('method')
end
end

Datei anzeigen

@ -0,0 +1,13 @@
# frozen_string_literal: true
class CustomWizard::Api::LogSerializer < ::ApplicationSerializer
attributes :log_id,
:time,
:status,
:url,
:error,
:user_id,
:username,
:userpath,
:name,
:avatar_template
end

Datei anzeigen

@ -0,0 +1,35 @@
# frozen_string_literal: true
class CustomWizard::ApiSerializer < ::ApplicationSerializer
attributes :name,
:title,
:authorization,
:endpoints,
:log
def authorization
if authorization = CustomWizard::Api::Authorization.get(object.name)
CustomWizard::Api::AuthorizationSerializer.new(
authorization,
root: false
)
end
end
def endpoints
if endpoints = CustomWizard::Api::Endpoint.list(object.name)
ActiveModel::ArraySerializer.new(
endpoints,
each_serializer: CustomWizard::Api::EndpointSerializer
)
end
end
def log
if log = CustomWizard::Api::LogEntry.list(object.name)
ActiveModel::ArraySerializer.new(
log,
each_serializer: CustomWizard::Api::LogSerializer
)
end
end
end

Datei anzeigen

@ -0,0 +1,15 @@
# frozen_string_literal: true
class CustomWizard::BasicApiSerializer < ::ApplicationSerializer
attributes :name,
:title,
:endpoints
def endpoints
if endpoints = CustomWizard::Api::Endpoint.list(object.name)
ActiveModel::ArraySerializer.new(
endpoints,
each_serializer: CustomWizard::Api::BasicEndpointSerializer
)
end
end
end

Datei anzeigen

@ -0,0 +1,4 @@
# frozen_string_literal: true
class CustomWizard::BasicWizardSerializer < ::ApplicationSerializer
attributes :id, :name
end

Datei anzeigen

@ -0,0 +1,4 @@
# frozen_string_literal: true
class CustomWizard::CustomFieldSerializer < ApplicationSerializer
attributes :id, :klass, :name, :type, :serializers
end

Datei anzeigen

@ -0,0 +1,10 @@
# frozen_string_literal: true
class CustomWizard::LogSerializer < ApplicationSerializer
attributes :date,
:action,
:username,
:message
has_one :user, serializer: ::BasicUserSerializer, embed: :objects
end

Datei anzeigen

@ -0,0 +1,3 @@
# frozen_string_literal: true
class ::CustomWizard::RealtimeValidation::SimilarTopicsSerializer < ::SimilarTopicSerializer
end

Datei anzeigen

@ -0,0 +1,35 @@
# frozen_string_literal: true
class CustomWizard::SubmissionSerializer < ApplicationSerializer
attributes :id,
:fields,
:submitted_at,
:user
def include_user?
object.wizard.user.present?
end
def user
::BasicUserSerializer.new(object.wizard.user, root: false).as_json
end
def fields
@fields ||= begin
result = {}
object.wizard.template['steps'].each do |step|
step['fields'].each do |field|
if value = object.fields[field['id']]
result[field['id']] = {
value: value,
type: field['type'],
label: field['label']
}
end
end
end
result
end
end
end

Datei anzeigen

@ -0,0 +1,138 @@
# frozen_string_literal: true
class CustomWizard::FieldSerializer < ::ApplicationSerializer
attributes :id,
:index,
:type,
:required,
:value,
:label,
:placeholder,
:description,
:image,
:file_types,
:format,
:limit,
:property,
:content,
:tag_groups,
:can_create_tag,
:validations,
:max_length,
:char_counter,
:preview_template
def id
object.id
end
def index
object.index
end
def type
object.type
end
def required
object.required
end
def value
object.value
end
def label
I18n.t("#{i18n_key}.label", default: object.label, base_url: Discourse.base_url)
end
def include_label?
label.present?
end
def description
I18n.t("#{i18n_key}.description", default: object.description, base_url: Discourse.base_url)
end
def include_description?
description.present?
end
def placeholder
I18n.t("#{i18n_key}.placeholder", default: object.placeholder)
end
def include_placeholder?
placeholder.present?
end
def image
object.image
end
def include_image?
object.image.present?
end
def file_types
object.file_types
end
def format
object.format
end
def limit
object.limit
end
def property
object.property
end
def content
object.content
end
def tag_groups
object.tag_groups
end
def can_create_tag
object.can_create_tag
end
def validations
validations = {}
object.validations&.each do |type, props|
next unless props["status"]
validations[props["position"]] ||= {}
validations[props["position"]][type] = props.merge CustomWizard::RealtimeValidation.types[type.to_sym]
end
validations
end
def max_length
object.max_length
end
def char_counter
object.char_counter
end
def preview_template
object.preview_template
end
protected
def i18n_key
@i18n_key ||= "#{object.step.wizard.id}.#{object.step.id}.#{object.id}".underscore
end
def subscribed?
@subscribed ||= CustomWizard::Subscription.subscribed?
end
end

Datei anzeigen

@ -0,0 +1,46 @@
# frozen_string_literal: true
class CustomWizard::WizardSerializer < CustomWizard::BasicWizardSerializer
attributes :start,
:background,
:submission_last_updated_at,
:theme_id,
:completed,
:required,
:permitted,
:resume_on_revisit
has_many :steps, serializer: ::CustomWizard::StepSerializer, embed: :objects
has_one :user, serializer: ::BasicUserSerializer, embed: :objects
def completed
object.completed?
end
def include_completed?
object.completed? &&
(!object.respond_to?(:multiple_submissions) || !object.multiple_submissions) &&
!scope.is_admin?
end
def permitted
object.permitted?
end
def start
object.start
end
def include_start?
include_steps? && object.start.present?
end
def submission_last_updated_at
object.current_submission.updated_at
end
def include_steps?
!include_completed?
end
end

Datei anzeigen

@ -0,0 +1,83 @@
# frozen_string_literal: true
class CustomWizard::StepSerializer < ::ApplicationSerializer
attributes :id,
:index,
:next,
:previous,
:description,
:title,
:banner,
:permitted,
:permitted_message,
:final
has_many :fields, serializer: ::CustomWizard::FieldSerializer, embed: :objects
def id
object.id
end
def index
object.index
end
def next
object.next.id if object.next.present?
end
def include_next?
object.next.present?
end
def previous
object.previous.id if object.previous.present?
end
def include_previous?
object.previous.present?
end
def title
I18n.t("#{i18n_key}.title", default: object.title, base_url: Discourse.base_url)
end
def include_title?
title.present?
end
def description
I18n.t("#{i18n_key}.description", default: object.description, base_url: Discourse.base_url)
end
def include_description?
description.present?
end
def banner
object.banner
end
def include_banner?
object.banner.present?
end
def permitted
object.permitted
end
def permitted_message
object.permitted_message
end
def final
object.final?
end
protected
def i18n_key
@i18n_key ||= "#{object.wizard.id}.#{object.id}".underscore
end
end

Datei anzeigen

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<title>Custom Wizard QUnit Test Runner</title>
<%= discourse_stylesheet_link_tag(:test_helper, theme_id: nil) %>
<%= discourse_stylesheet_link_tag :wizard, theme_id: nil %>
<%= discourse_stylesheet_link_tag :wizard_custom %>
<%= preload_script "locales/en" %>
<%= preload_script "ember_jquery" %>
<%= preload_script "wizard-vendor" %>
<%= preload_script "wizard-custom" %>
<%= preload_script "wizard-raw-templates" %>
<%= preload_script "wizard-plugin" %>
<%= preload_script "pretty-text-bundle" %>
<%= preload_script "wizard-qunit" %>
<%= csrf_meta_tags %>
<script src="<%= ExtraLocalesController.url("wizard") %>"></script>
<%= tag.meta id: 'data-discourse-setup', data: client_side_setup_data %>
<meta name="discourse_theme_id" content="">
<meta name="discourse-base-uri" content="<%= Discourse.base_path %>">
</head>
<body class="custom-wizard">
<div id="qunit"></div>
<div id="qunit-fixture"></div>
</body>
</html>

Datei anzeigen

@ -0,0 +1,126 @@
import Component from "@ember/component";
import discourseComputed, { observes } from "discourse-common/utils/decorators";
import { alias, equal, or } from "@ember/object/computed";
import I18n from "I18n";
export default Component.extend({
tagName: "tr",
topicSerializers: ["topic_view", "topic_list_item"],
postSerializers: ["post"],
groupSerializers: ["basic_group"],
categorySerializers: ["basic_category"],
showInputs: or("field.new", "field.edit"),
classNames: ["custom-field-input"],
loading: or("saving", "destroying"),
destroyDisabled: alias("loading"),
closeDisabled: alias("loading"),
isExternal: equal("field.id", "external"),
didInsertElement() {
this.set("originalField", JSON.parse(JSON.stringify(this.field)));
},
@discourseComputed("field.klass")
serializerContent(klass) {
const serializers = this.get(`${klass}Serializers`);
if (serializers) {
return serializers.reduce((result, key) => {
result.push({
id: key,
name: I18n.t(`admin.wizard.custom_field.serializers.${key}`),
});
return result;
}, []);
}
},
@observes("field.klass")
clearSerializersWhenClassChanges() {
this.set("field.serializers", null);
},
compareArrays(array1, array2) {
return (
array1.length === array2.length &&
array1.every((value, index) => {
return value === array2[index];
})
);
},
@discourseComputed(
"saving",
"isExternal",
"field.name",
"field.klass",
"field.type",
"field.serializers"
)
saveDisabled(saving, isExternal) {
if (saving || isExternal) {
return true;
}
const originalField = this.originalField;
if (!originalField) {
return false;
}
return ["name", "klass", "type", "serializers"].every((attr) => {
let current = this.get(attr);
let original = originalField[attr];
if (!current) {
return false;
}
if (attr === "serializers") {
return this.compareArrays(current, original);
} else {
return current === original;
}
});
},
actions: {
edit() {
this.set("field.edit", true);
},
close() {
if (this.field.edit) {
this.set("field.edit", false);
}
},
destroy() {
this.set("destroying", true);
this.removeField(this.field);
},
save() {
this.set("saving", true);
const field = this.field;
let data = {
id: field.id,
klass: field.klass,
type: field.type,
serializers: field.serializers,
name: field.name,
};
this.saveField(data).then((result) => {
this.set("saving", false);
if (result.success) {
this.set("field.edit", false);
} else {
this.set("saveIcon", "times");
}
setTimeout(() => this.set("saveIcon", null), 10000);
});
},
},
});

Datei anzeigen

@ -0,0 +1,146 @@
import {
default as computed,
observes,
} from "discourse-common/utils/decorators";
import { renderAvatar } from "discourse/helpers/user-avatar";
import userSearch from "discourse/lib/user-search";
import I18n from "I18n";
import Handlebars from "handlebars";
import { isEmpty } from "@ember/utils";
import TextField from "discourse/components/text-field";
const template = function (params) {
const options = params.options;
let html = "<div class='autocomplete'>";
if (options.users) {
html += "<ul>";
options.users.forEach((u) => {
html += `<li><a href title="${u.name}">`;
html += renderAvatar(u, { imageSize: "tiny" });
html += `<span class='username'>${u.username}</span>`;
if (u.name) {
html += `<span class='name'>${u.name}</span>`;
}
html += `</a></li>`;
});
html += "</ul>";
}
html += "</div>";
return new Handlebars.SafeString(html).string;
};
export default TextField.extend({
attributeBindings: ["autofocus", "maxLength"],
autocorrect: false,
autocapitalize: false,
name: "user-selector",
id: "custom-member-selector",
@computed("placeholderKey")
placeholder(placeholderKey) {
return placeholderKey ? I18n.t(placeholderKey) : "";
},
@observes("usernames")
_update() {
if (this.get("canReceiveUpdates") === "true") {
this.didInsertElement({ updateData: true });
}
},
didInsertElement(opts) {
this._super();
let self = this,
selected = [],
groups = [],
includeMentionableGroups =
this.get("includeMentionableGroups") === "true",
includeMessageableGroups =
this.get("includeMessageableGroups") === "true",
includeGroups = this.get("includeGroups") === "true",
allowedUsers = this.get("allowedUsers") === "true";
function excludedUsernames() {
// hack works around some issues with allowAny eventing
const usernames = self.get("single") ? [] : selected;
return usernames;
}
$(this.element)
.val(this.get("usernames"))
.autocomplete({
template,
disabled: this.get("disabled"),
single: this.get("single"),
allowAny: this.get("allowAny"),
updateData: opts && opts.updateData ? opts.updateData : false,
dataSource(term) {
const termRegex = /[^a-zA-Z0-9_\-\.@\+]/;
let results = userSearch({
term: term.replace(termRegex, ""),
topicId: self.get("topicId"),
exclude: excludedUsernames(),
includeGroups,
allowedUsers,
includeMentionableGroups,
includeMessageableGroups,
});
return results;
},
transformComplete(v) {
if (v.username || v.name) {
if (!v.username) {
groups.push(v.name);
}
return v.username || v.name;
} else {
let excludes = excludedUsernames();
return v.usernames.filter(function (item) {
return excludes.indexOf(item) === -1;
});
}
},
onChangeItems(items) {
let hasGroups = false;
items = items.map(function (i) {
if (groups.indexOf(i) > -1) {
hasGroups = true;
}
return i.username ? i.username : i;
});
self.set("usernames", items.join(","));
self.set("hasGroups", hasGroups);
selected = items;
if (self.get("onChangeCallback")) {
self.sendAction("onChangeCallback");
}
},
reverseTransform(i) {
return { username: i };
},
});
},
willDestroyElement() {
this._super();
$(this.element).autocomplete("destroy");
},
// THIS IS A HUGE HACK TO SUPPORT CLEARING THE INPUT
@observes("usernames")
_clearInput: function () {
if (arguments.length > 1) {
if (isEmpty(this.get("usernames"))) {
$(this.element).parent().find("a").click();
}
}
},
});

Datei anzeigen

@ -0,0 +1,18 @@
import CategorySelector from "select-kit/components/category-selector";
import { computed } from "@ember/object";
import { makeArray } from "discourse-common/lib/helpers";
export default CategorySelector.extend({
classNames: ["category-selector", "wizard-category-selector"],
content: computed(
"categories.[]",
"blacklist.[]",
"whitelist.[]",
function () {
return this._super().filter((category) => {
const whitelist = makeArray(this.whitelist);
return !whitelist.length || whitelist.indexOf(category.id) > -1;
});
}
),
});

Datei anzeigen

@ -0,0 +1,213 @@
import ComposerEditor from "discourse/components/composer-editor";
import {
bind,
default as discourseComputed,
on,
} from "discourse-common/utils/decorators";
import { findRawTemplate } from "discourse-common/lib/raw-templates";
import { scheduleOnce } from "@ember/runloop";
import { caretPosition, inCodeBlock } from "discourse/lib/utilities";
import highlightSyntax from "discourse/lib/highlight-syntax";
import { alias } from "@ember/object/computed";
import Site from "discourse/models/site";
import { uploadIcon } from "discourse/lib/uploads";
import { dasherize } from "@ember/string";
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
import { inject as service } from "@ember/service";
const IMAGE_MARKDOWN_REGEX =
/!\[(.*?)\|(\d{1,4}x\d{1,4})(,\s*\d{1,3}%)?(.*?)\]\((upload:\/\/.*?)\)(?!(.*`))/g;
export default ComposerEditor.extend({
modal: service(),
classNameBindings: ["fieldClass"],
allowUpload: true,
showLink: false,
topic: null,
showToolbar: true,
focusTarget: "reply",
canWhisper: false,
lastValidatedAt: "lastValidatedAt",
popupMenuOptions: [],
draftStatus: "null",
replyPlaceholder: alias("field.translatedPlaceholder"),
wizardEventFieldId: null,
composerEventPrefix: "wizard-editor",
@on("didInsertElement")
_composerEditorInit() {
const $input = $(this.element.querySelector(".d-editor-input"));
if (this.siteSettings.enable_mentions) {
$input.autocomplete({
template: findRawTemplate("user-selector-autocomplete"),
dataSource: (term) => this._userSearchTerm.call(this, term),
key: "@",
transformComplete: (v) => v.username || v.name,
afterComplete: (value) => {
this.composer.set("reply", value);
scheduleOnce("afterRender", () => $input.blur().focus());
},
triggerRule: (textarea) =>
!inCodeBlock(textarea.value, caretPosition(textarea)),
});
}
const siteSettings = this.siteSettings;
if (siteSettings.mentionables_enabled) {
Site.currentProp("mentionable_items", this.wizard.mentionable_items);
const { SEPARATOR } = requirejs(
"discourse/plugins/discourse-mentionables/discourse/lib/discourse-markdown/mentionable-items"
);
const { searchMentionableItem } = requirejs(
"discourse/plugins/discourse-mentionables/discourse/lib/mentionable-item-search"
);
$input.autocomplete({
template: findRawTemplate("javascripts/mentionable-item-autocomplete"),
key: SEPARATOR,
afterComplete: (value) => {
this.composer.set("reply", value);
scheduleOnce("afterRender", () => $input.blur().focus());
},
transformComplete: (item) => item.model.slug,
dataSource: (term) =>
term.match(/\s/) ? null : searchMentionableItem(term, siteSettings),
triggerRule: (textarea) =>
!inCodeBlock(textarea.value, caretPosition(textarea)),
});
}
$input.on("scroll", this._throttledSyncEditorAndPreviewScroll);
this._bindUploadTarget();
const field = this.field;
this.editorInputClass = `.${dasherize(field.type)}-${dasherize(
field.id
)} .d-editor-input`;
this._uppyInstance.on("file-added", () => {
this.session.set("wizardEventFieldId", field.id);
});
},
@discourseComputed("field.id")
fileUploadElementId(fieldId) {
return `file-uploader-${dasherize(fieldId)}`;
},
@discourseComputed
allowedFileTypes() {
return this.siteSettings.authorized_extensions
.split("|")
.map((ext) => "." + ext)
.join(",");
},
@discourseComputed()
uploadIcon() {
return uploadIcon(false, this.siteSettings);
},
@bind
_handleImageDeleteButtonClick(event) {
if (!event.target.classList.contains("delete-image-button")) {
return;
}
const index = parseInt(
event.target.closest(".button-wrapper").dataset.imageIndex,
10
);
const matchingPlaceholder =
this.get("composer.reply").match(IMAGE_MARKDOWN_REGEX);
this.session.set("wizardEventFieldId", this.field.id);
this.appEvents.trigger(
"composer:replace-text",
matchingPlaceholder[index],
"",
{ regex: IMAGE_MARKDOWN_REGEX, index }
);
},
actions: {
extraButtons(toolbar) {
const component = this;
if (this.allowUpload && this.uploadIcon) {
toolbar.addButton({
id: "upload",
group: "insertions",
icon: this.uploadIcon,
title: "upload",
sendAction: (event) => component.send("showUploadModal", event),
});
}
toolbar.addButton({
id: "link",
group: "insertions",
shortcut: "K",
trimLeading: true,
unshift: true,
sendAction: (event) => component.send("showLinkModal", event),
});
if (this.siteSettings.mentionables_enabled) {
const { SEPARATOR } = requirejs(
"discourse/plugins/discourse-mentionables/discourse/lib/discourse-markdown/mentionable-items"
);
toolbar.addButton({
id: "insert-mentionable",
group: "extras",
icon: this.siteSettings.mentionables_composer_button_icon,
title: "mentionables.composer.insert.title",
perform: () => {
this.appEvents.trigger("wizard-editor:insert-text", {
fieldId: this.field.id,
text: SEPARATOR,
});
const $textarea = $(
document.querySelector(
`.composer-field.${this.field.id} textarea.d-editor-input`
)
);
$textarea.trigger("keyup.autocomplete");
},
});
}
},
previewUpdated(preview) {
highlightSyntax(preview, this.siteSettings, this.session);
if (this.siteSettings.mentionables_enabled) {
const { linkSeenMentionableItems } = requirejs(
"discourse/plugins/discourse-mentionables/discourse/lib/mentionable-items-preview-styling"
);
linkSeenMentionableItems(preview, this.siteSettings);
}
this._super(...arguments);
},
showLinkModal(toolbarEvent) {
let linkText = "";
this._lastSel = toolbarEvent.selected;
if (this._lastSel) {
linkText = this._lastSel.value;
}
this.modal.show(InsertHyperlink, {
model: { linkText, toolbarEvent },
});
},
showUploadModal() {
this.session.set("wizardEventFieldId", this.field.id);
document.getElementById(this.fileUploadElementId).click();
},
},
});

Datei anzeigen

@ -0,0 +1,17 @@
import DateInput from "discourse/components/date-input";
import discourseComputed from "discourse-common/utils/decorators";
export default DateInput.extend({
useNativePicker: false,
classNameBindings: ["fieldClass"],
@discourseComputed()
placeholder() {
return this.format;
},
_opts() {
return {
format: this.format || "LL",
};
},
});

Datei anzeigen

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

Datei anzeigen

@ -0,0 +1,42 @@
import { observes } from "discourse-common/utils/decorators";
import Category from "discourse/models/category";
import Component from "@ember/component";
export default Component.extend({
didInsertElement() {
const property = this.field.property || "id";
const value = this.field.value;
if (value) {
this.set(
"categories",
[...value].reduce((result, v) => {
let val =
property === "id" ? Category.findById(v) : Category.findBySlug(v);
if (val) {
result.push(val);
}
return result;
}, [])
);
}
},
@observes("categories")
setValue() {
const categories = (this.categories || []).filter((c) => !!c);
const property = this.field.property || "id";
if (categories.length) {
this.set(
"field.value",
categories.reduce((result, c) => {
if (c && c[property]) {
result.push(c[property]);
}
return result;
}, [])
);
}
},
});

Datei anzeigen

@ -0,0 +1,3 @@
import Component from "@ember/component";
export default Component.extend({});

Datei anzeigen

@ -0,0 +1,49 @@
import Component from "@ember/component";
import { loadOneboxes } from "discourse/lib/load-oneboxes";
import { schedule } from "@ember/runloop";
import discourseDebounce from "discourse-common/lib/debounce";
import { resolveAllShortUrls } from "pretty-text/upload-short-url";
import { ajax } from "discourse/lib/ajax";
import { on } from "discourse-common/utils/decorators";
export default Component.extend({
@on("init")
updatePreview() {
if (this.isDestroyed) {
return;
}
schedule("afterRender", () => {
if (this._state !== "inDOM" || !this.element) {
return;
}
const $preview = $(this.element);
if ($preview.length === 0) {
return;
}
this.previewUpdated($preview);
});
},
previewUpdated($preview) {
// Paint oneboxes
const paintFunc = () => {
loadOneboxes(
$preview[0],
ajax,
null,
null,
this.siteSettings.max_oneboxes_per_post,
true // refresh on every load
);
};
discourseDebounce(this, paintFunc, 450);
// Short upload urls need resolution
resolveAllShortUrls(ajax, this.siteSettings, $preview[0]);
},
});

Datei anzeigen

@ -0,0 +1,48 @@
import {
default as computed,
observes,
} from "discourse-common/utils/decorators";
import EmberObject from "@ember/object";
import Component from "@ember/component";
export default Component.extend({
showPreview: false,
classNameBindings: [
":wizard-field-composer",
"showPreview:show-preview:hide-preview",
],
didInsertElement() {
this.set(
"composer",
EmberObject.create({
loading: false,
reply: this.get("field.value") || "",
})
);
},
@observes("composer.reply")
setField() {
this.set("field.value", this.get("composer.reply"));
},
@computed("showPreview")
togglePreviewLabel(showPreview) {
return showPreview
? "wizard_composer.hide_preview"
: "wizard_composer.show_preview";
},
actions: {
togglePreview() {
this.toggleProperty("showPreview");
},
groupsMentioned() {},
afterRefresh() {},
cannotSeeMention() {},
importQuote() {},
showUploadSelector() {},
},
});

Datei anzeigen

@ -0,0 +1,15 @@
import Component from "@ember/component";
import { observes } from "discourse-common/utils/decorators";
export default Component.extend({
@observes("dateTime")
setValue() {
this.set("field.value", this.dateTime.format(this.field.format));
},
actions: {
onChange(value) {
this.set("dateTime", moment(value));
},
},
});

Datei anzeigen

@ -0,0 +1,15 @@
import Component from "@ember/component";
import { observes } from "discourse-common/utils/decorators";
export default Component.extend({
@observes("date")
setValue() {
this.set("field.value", this.date.format(this.field.format));
},
actions: {
onChange(value) {
this.set("date", moment(value));
},
},
});

Datei anzeigen

@ -0,0 +1,13 @@
import Component from "@ember/component";
export default Component.extend({
keyPress(e) {
e.stopPropagation();
},
actions: {
onChangeValue(value) {
this.set("field.value", value);
},
},
});

Datei anzeigen

@ -0,0 +1,3 @@
import Component from "@ember/component";
export default Component.extend({});

Datei anzeigen

@ -0,0 +1,3 @@
import Component from "@ember/component";
export default Component.extend({});

Datei anzeigen

@ -0,0 +1,3 @@
import Component from "@ember/component";
export default Component.extend({});

Datei anzeigen

@ -0,0 +1,7 @@
import Component from "@ember/component";
export default Component.extend({
keyPress(e) {
e.stopPropagation();
},
});

Datei anzeigen

@ -0,0 +1,7 @@
import Component from "@ember/component";
export default Component.extend({
keyPress(e) {
e.stopPropagation();
},
});

Datei anzeigen

@ -0,0 +1,23 @@
import Component from "@ember/component";
import { observes } from "discourse-common/utils/decorators";
export default Component.extend({
classNameBindings: ["fieldClass"],
@observes("time")
setValue() {
this.set("field.value", this.time.format(this.field.format));
},
actions: {
onChange(value) {
this.set(
"time",
moment({
hours: value.hours,
minutes: value.minutes,
})
);
},
},
});

Datei anzeigen

@ -0,0 +1,27 @@
import UppyUploadMixin from "discourse/mixins/uppy-upload";
import Component from "@ember/component";
import { computed } from "@ember/object";
export default Component.extend(UppyUploadMixin, {
classNames: ["wizard-field-upload"],
classNameBindings: ["isImage", "fieldClass"],
uploading: false,
type: computed(function () {
return `wizard_${this.field.id}`;
}),
id: computed(function () {
return `wizard_field_upload_${this.field.id}`;
}),
isImage: computed("field.value.extension", function () {
return (
this.field.value &&
this.siteSettings.wizard_recognised_image_upload_formats
.split("|")
.includes(this.field.value.extension)
);
}),
uploadDone(upload) {
this.set("field.value", upload);
},
});

Datei anzeigen

@ -0,0 +1,3 @@
import Component from "@ember/component";
export default Component.extend({});

Datei anzeigen

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

Datei anzeigen

@ -0,0 +1,41 @@
import Component from "@ember/component";
import { dasherize } from "@ember/string";
import discourseComputed from "discourse-common/utils/decorators";
import { cookAsync } from "discourse/lib/text";
export default Component.extend({
classNameBindings: [
":wizard-field",
"typeClasses",
"field.invalid",
"field.id",
],
didReceiveAttrs() {
this._super(...arguments);
cookAsync(this.field.translatedDescription).then((cookedDescription) => {
this.set("cookedDescription", cookedDescription);
});
},
@discourseComputed("field.type", "field.id")
typeClasses: (type, id) =>
`${dasherize(type)}-field ${dasherize(type)}-${dasherize(id)}`,
@discourseComputed("field.id")
fieldClass: (id) => `field-${dasherize(id)} wizard-focusable`,
@discourseComputed("field.type", "field.id")
inputComponentName(type, id) {
if (["text_only"].includes(type)) {
return false;
}
return dasherize(type === "component" ? id : `custom-wizard-field-${type}`);
},
@discourseComputed("field.type")
textType(fieldType) {
return ["text", "textarea"].includes(fieldType);
},
});

Datei anzeigen

@ -0,0 +1,19 @@
import ComboBox from "select-kit/components/combo-box";
import { computed } from "@ember/object";
import { makeArray } from "discourse-common/lib/helpers";
export default ComboBox.extend({
content: computed("groups.[]", "field.content.[]", function () {
const whitelist = makeArray(this.field.content);
return this.groups
.filter((group) => {
return !whitelist.length || whitelist.indexOf(group.id) > -1;
})
.map((g) => {
return {
id: g.id,
name: g.full_name ? g.full_name : g.name,
};
});
}),
});

Datei anzeigen

@ -0,0 +1,29 @@
import CustomWizard from "../models/custom-wizard";
import discourseComputed from "discourse-common/utils/decorators";
import Component from "@ember/component";
import { dasherize } from "@ember/string";
import getURL from "discourse-common/lib/get-url";
export default Component.extend({
classNameBindings: [":wizard-no-access", "reasonClass"],
@discourseComputed("reason")
reasonClass(reason) {
return dasherize(reason);
},
@discourseComputed
siteName() {
return this.siteSettings.title || "";
},
actions: {
skip() {
if (this.currentUser) {
CustomWizard.skip(this.get("wizardId"));
} else {
window.location = getURL("/");
}
},
},
});

Datei anzeigen

@ -0,0 +1,38 @@
import Component from "@ember/component";
import { bind } from "@ember/runloop";
import { observes } from "discourse-common/utils/decorators";
export default Component.extend({
classNames: ["wizard-similar-topics"],
showTopics: true,
didInsertElement() {
$(document).on("click", bind(this, this.documentClick));
},
willDestroyElement() {
$(document).off("click", bind(this, this.documentClick));
},
documentClick(e) {
if (this._state === "destroying") {
return;
}
let $target = $(e.target);
if (!$target.hasClass("show-topics")) {
this.set("showTopics", false);
}
},
@observes("topics")
toggleShowWhenTopicsChange() {
this.set("showTopics", true);
},
actions: {
toggleShowTopics() {
this.set("showTopics", true);
},
},
});

Datei anzeigen

@ -0,0 +1,9 @@
import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
export default Component.extend({
classNameBindings: [":wizard-step-form", "customStepClass"],
@discourseComputed("step.id")
customStepClass: (stepId) => `wizard-step-${stepId}`,
});

Datei anzeigen

@ -0,0 +1,227 @@
import discourseComputed, { observes } from "discourse-common/utils/decorators";
import Component from "@ember/component";
import I18n from "I18n";
import getUrl from "discourse-common/lib/get-url";
import { htmlSafe } from "@ember/template";
import { schedule } from "@ember/runloop";
import { cookAsync } from "discourse/lib/text";
import CustomWizard, {
updateCachedWizard,
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
import { alias, not } from "@ember/object/computed";
import discourseLater from "discourse-common/lib/later";
const alreadyWarned = {};
export default Component.extend({
classNameBindings: [":wizard-step", "step.id"],
saving: null,
init() {
this._super(...arguments);
this.set("stylingDropdown", {});
},
didReceiveAttrs() {
this._super(...arguments);
cookAsync(this.step.translatedTitle).then((cookedTitle) => {
this.set("cookedTitle", cookedTitle);
});
cookAsync(this.step.translatedDescription).then((cookedDescription) => {
this.set("cookedDescription", cookedDescription);
});
},
didInsertElement() {
this._super(...arguments);
this.autoFocus();
},
@discourseComputed("step.index", "wizard.required")
showQuitButton: (index, required) => index === 0 && !required,
showNextButton: not("step.final"),
showDoneButton: alias("step.final"),
@discourseComputed(
"step.index",
"step.displayIndex",
"wizard.totalSteps",
"wizard.completed"
)
showFinishButton: (index, displayIndex, total, completed) => {
return index !== 0 && displayIndex !== total && completed;
},
@discourseComputed("step.index")
showBackButton: (index) => index > 0,
@discourseComputed("step.banner")
bannerImage(src) {
if (!src) {
return;
}
return getUrl(src);
},
@discourseComputed("step.id")
bannerAndDescriptionClass(id) {
return `wizard-banner-and-description wizard-banner-and-description-${id}`;
},
@discourseComputed("step.fields.[]")
primaryButtonIndex(fields) {
return fields.length + 1;
},
@discourseComputed("step.fields.[]")
secondaryButtonIndex(fields) {
return fields.length + 2;
},
@observes("step.id")
_stepChanged() {
this.set("saving", false);
this.autoFocus();
},
@observes("step.message")
_handleMessage: function () {
const message = this.get("step.message");
this.showMessage(message);
},
@discourseComputed("step.index", "wizard.totalSteps")
barStyle(displayIndex, totalSteps) {
let ratio = parseFloat(displayIndex) / parseFloat(totalSteps - 1);
if (ratio < 0) {
ratio = 0;
}
if (ratio > 1) {
ratio = 1;
}
return htmlSafe(`width: ${ratio * 200}px`);
},
@discourseComputed("step.fields")
includeSidebar(fields) {
return !!fields.findBy("show_in_sidebar");
},
autoFocus() {
discourseLater(() => {
schedule("afterRender", () => {
if ($(".invalid .wizard-focusable").length) {
this.animateInvalidFields();
}
});
});
},
animateInvalidFields() {
schedule("afterRender", () => {
let $invalid = $(".invalid .wizard-focusable");
if ($invalid.length) {
$([document.documentElement, document.body]).animate(
{
scrollTop: $invalid.offset().top - 200,
},
400
);
}
});
},
advance() {
this.set("saving", true);
this.get("step")
.save()
.then((response) => {
updateCachedWizard(CustomWizard.build(response["wizard"]));
if (response["final"]) {
CustomWizard.finished(response);
} else {
this.goNext(response);
}
})
.catch(() => this.animateInvalidFields())
.finally(() => this.set("saving", false));
},
actions: {
quit() {
this.get("wizard").skip();
},
done() {
this.send("nextStep");
},
showMessage(message) {
this.sendAction(message);
},
stylingDropdownChanged(id, value) {
this.set("stylingDropdown", { id, value });
},
exitEarly() {
const step = this.step;
step.validate();
if (step.get("valid")) {
this.set("saving", true);
step
.save()
.then(() => this.send("quit"))
.finally(() => this.set("saving", false));
} else {
this.autoFocus();
}
},
backStep() {
if (this.saving) {
return;
}
this.goBack();
},
nextStep() {
if (this.saving) {
return;
}
const step = this.step;
const result = step.validate();
if (result.warnings.length) {
const unwarned = result.warnings.filter((w) => !alreadyWarned[w]);
if (unwarned.length) {
unwarned.forEach((w) => (alreadyWarned[w] = true));
return window.bootbox.confirm(
unwarned.map((w) => I18n.t(`wizard.${w}`)).join("\n"),
I18n.t("no_value"),
I18n.t("yes_value"),
(confirmed) => {
if (confirmed) {
this.advance();
}
}
);
}
}
if (step.get("valid")) {
this.advance();
} else {
this.autoFocus();
}
},
},
});

Datei anzeigen

@ -0,0 +1,15 @@
import TagChooser from "select-kit/components/tag-chooser";
export default TagChooser.extend({
searchTags(url, data, callback) {
if (this.tagGroups) {
let tagGroupsString = this.tagGroups.join(",");
data.filterForInput = {
name: "custom-wizard-tag-chooser",
groups: tagGroupsString,
};
}
return this._super(url, data, callback);
},
});

Datei anzeigen

@ -0,0 +1,11 @@
import TagChooser from "select-kit/components/tag-chooser";
import { makeArray } from "discourse-common/lib/helpers";
export default TagChooser.extend({
_transformJson(context, json) {
return this._super(context, json).filter((tag) => {
const whitelist = makeArray(context.whitelist);
return !whitelist.length || whitelist.indexOf(tag.id) > 1;
});
},
});

Datei anzeigen

@ -0,0 +1,44 @@
import computed from "discourse-common/utils/decorators";
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
import I18n from "I18n";
import TextField from "discourse/components/text-field";
export default TextField.extend({
attributeBindings: [
"autocorrect",
"autocapitalize",
"autofocus",
"maxLength",
"dir",
],
@computed
dir() {
if (this.siteSettings.support_mixed_text_direction) {
let val = this.value;
if (val) {
return isRTL(val) ? "rtl" : "ltr";
} else {
return siteDir();
}
}
},
keyUp() {
if (this.siteSettings.support_mixed_text_direction) {
let val = this.value;
if (isRTL(val)) {
this.set("dir", "rtl");
} else if (isLTR(val)) {
this.set("dir", "ltr");
} else {
this.set("dir", siteDir());
}
}
},
@computed("placeholderKey")
placeholder(placeholderKey) {
return placeholderKey ? I18n.t(placeholderKey) : "";
},
});

Datei anzeigen

@ -0,0 +1,3 @@
import TimeInput from "discourse/components/time-input";
export default TimeInput.extend({});

Datei anzeigen

@ -0,0 +1,9 @@
import Component from "@ember/component";
export default Component.extend({
actions: {
perform() {
this.appEvents.trigger("custom-wizard:validate");
},
},
});

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

@ -0,0 +1,160 @@
import WizardFieldValidator from "discourse/plugins/discourse-custom-wizard/discourse/components/validator";
import { deepMerge } from "discourse-common/lib/object";
import discourseComputed, { observes } from "discourse-common/utils/decorators";
import { cancel, later } from "@ember/runloop";
import { A } from "@ember/array";
import EmberObject, { computed } from "@ember/object";
import { and, equal, notEmpty } from "@ember/object/computed";
import { categoryBadgeHTML } from "discourse/helpers/category-link";
import { dasherize } from "@ember/string";
export default WizardFieldValidator.extend({
classNames: ["similar-topics-validator"],
similarTopics: null,
hasInput: notEmpty("field.value"),
hasSimilarTopics: notEmpty("similarTopics"),
hasNotSearched: equal("similarTopics", null),
noSimilarTopics: computed("similarTopics", function () {
return this.similarTopics !== null && this.similarTopics.length === 0;
}),
showSimilarTopics: computed("typing", "hasSimilarTopics", function () {
return this.hasSimilarTopics && !this.typing;
}),
showNoSimilarTopics: computed("typing", "noSimilarTopics", function () {
return this.noSimilarTopics && !this.typing;
}),
hasValidationCategories: notEmpty("validationCategories"),
insufficientCharacters: computed("typing", "field.value", function () {
return this.hasInput && this.field.value.length < 5 && !this.typing;
}),
insufficientCharactersCategories: and(
"insufficientCharacters",
"hasValidationCategories"
),
@discourseComputed("validation.categories")
validationCategories(categoryIds) {
if (categoryIds) {
return categoryIds.map((id) => this.site.categoriesById[id]);
}
return A();
},
@discourseComputed("validationCategories")
catLinks(categories) {
return categories.map((category) => categoryBadgeHTML(category)).join("");
},
@discourseComputed(
"loading",
"showSimilarTopics",
"showNoSimilarTopics",
"insufficientCharacters",
"insufficientCharactersCategories"
)
currentState(
loading,
showSimilarTopics,
showNoSimilarTopics,
insufficientCharacters,
insufficientCharactersCategories
) {
switch (true) {
case loading:
return "loading";
case showSimilarTopics:
return "results";
case showNoSimilarTopics:
return "no_results";
case insufficientCharactersCategories:
return "insufficient_characters_categories";
case insufficientCharacters:
return "insufficient_characters";
default:
return false;
}
},
@discourseComputed("currentState")
currentStateClass(currentState) {
if (currentState) {
return `similar-topics-${dasherize(currentState)}`;
}
return "similar-topics";
},
@discourseComputed("currentState")
currentStateKey(currentState) {
if (currentState) {
return `realtime_validations.similar_topics.${currentState}`;
}
return false;
},
validate() {},
@observes("field.value")
customValidate() {
const field = this.field;
if (!field.value) {
this.set("similarTopics", null);
return;
}
const value = field.value;
this.set("typing", true);
const lastKeyUp = new Date();
this._lastKeyUp = lastKeyUp;
// One second from now, check to see if the last key was hit when
// we recorded it. If it was, the user paused typing.
cancel(this._lastKeyTimeout);
this._lastKeyTimeout = later(() => {
if (lastKeyUp !== this._lastKeyUp) {
return;
}
this.set("typing", false);
if (value && value.length < 5) {
this.set("similarTopics", null);
return;
}
this.updateSimilarTopics();
}, 1000);
},
updateSimilarTopics() {
this.set("similarTopics", null);
this.set("updating", true);
this.backendValidate({
title: this.get("field.value"),
categories: this.get("validation.categories"),
time_unit: this.get("validation.time_unit"),
time_n_value: this.get("validation.time_n_value"),
})
.then((result) => {
const similarTopics = A(
deepMerge(result["topics"], result["similar_topics"])
);
similarTopics.forEach(function (topic, index) {
similarTopics[index] = EmberObject.create(topic);
});
this.set("similarTopics", similarTopics);
})
.finally(() => this.set("updating", false));
},
actions: {
closeMessage() {
this.set("showMessage", false);
},
},
});

Datei anzeigen

@ -0,0 +1,42 @@
import Component from "@ember/component";
import { equal } from "@ember/object/computed";
import { ajax, getToken } from "discourse/lib/ajax";
export default Component.extend({
classNames: ["validator"],
classNameBindings: ["isValid", "isInvalid"],
validMessageKey: null,
invalidMessageKey: null,
isValid: null,
isInvalid: equal("isValid", false),
init() {
this._super(...arguments);
if (this.get("validation.backend")) {
// set a function that can be called as often as it need to
// from the derived component
this.backendValidate = (params) => {
return ajax("/realtime-validations", {
data: {
type: this.get("type"),
authenticity_token: getToken(),
...params,
},
});
};
}
},
didInsertElement() {
this.appEvents.on("custom-wizard:validate", this, this.checkIsValid);
},
willDestroyElement() {
this.appEvents.off("custom-wizard:validate", this, this.checkIsValid);
},
checkIsValid() {
this.set("isValid", this.validate());
},
});

Datei anzeigen

@ -1,79 +1,104 @@
import { default as computed, observes } from 'ember-addons/ember-computed-decorators'; import { default as discourseComputed } from "discourse-common/utils/decorators";
import { empty, equal, or } from "@ember/object/computed";
import { notificationLevels, selectKitContent } from "../lib/wizard";
import { computed } from "@ember/object";
import UndoChanges from "../mixins/undo-changes";
import Component from "@ember/component";
import I18n from "I18n";
const ACTION_TYPES = [ export default Component.extend(UndoChanges, {
{ id: 'create_topic', name: 'Create Topic' }, componentType: "action",
{ id: 'update_profile', name: 'Update Profile' }, classNameBindings: [":wizard-custom-action", "visible"],
{ id: 'send_message', name: 'Send Message' } visible: computed("currentActionId", function () {
]; return this.action.id === this.currentActionId;
}),
createTopic: equal("action.type", "create_topic"),
updateProfile: equal("action.type", "update_profile"),
watchCategories: equal("action.type", "watch_categories"),
watchTags: equal("action.type", "watch_tags"),
sendMessage: equal("action.type", "send_message"),
openComposer: equal("action.type", "open_composer"),
sendToApi: equal("action.type", "send_to_api"),
addToGroup: equal("action.type", "add_to_group"),
routeTo: equal("action.type", "route_to"),
createCategory: equal("action.type", "create_category"),
createGroup: equal("action.type", "create_group"),
apiEmpty: empty("action.api"),
groupPropertyTypes: selectKitContent(["id", "name"]),
hasCustomFields: or(
"basicTopicFields",
"updateProfile",
"createGroup",
"createCategory"
),
basicTopicFields: or("createTopic", "sendMessage", "openComposer"),
publicTopicFields: or("createTopic", "openComposer"),
showPostAdvanced: or("createTopic", "sendMessage"),
availableNotificationLevels: notificationLevels.map((type) => {
return {
id: type,
name: I18n.t(`admin.wizard.action.watch_x.notification_level.${type}`),
};
}),
const PROFILE_FIELDS = [ messageUrl: "https://discourse.pluginmanager.org/t/action-settings",
'name',
'date_of_birth',
'title',
'locale',
'location',
'website',
'bio_raw',
'profile_background',
'card_background',
'theme_key'
];
export default Ember.Component.extend({ @discourseComputed("action.type")
classNames: 'wizard-custom-action', messageKey(type) {
types: ACTION_TYPES, let key = "type";
profileFields: PROFILE_FIELDS, if (type) {
createTopic: Ember.computed.equal('action.type', 'create_topic'), key = "edit";
updateProfile: Ember.computed.equal('action.type', 'update_profile'),
sendMessage: Ember.computed.equal('action.type', 'send_message'),
disableId: Ember.computed.not('action.isNew'),
@computed('currentStepId', 'wizard.save_submissions')
availableFields(currentStepId, saveSubmissions) {
const allSteps = this.get('wizard.steps');
let steps = allSteps;
let fields = [];
if (!saveSubmissions) {
steps = [allSteps.findBy('id', currentStepId)];
} }
return key;
},
steps.forEach((s) => { @discourseComputed("action.type")
if (s.fields && s.fields.length > 0) { customFieldsContext(type) {
let stepFields = s.fields.map((f) => { return `action.${type}`;
return Ember.Object.create({ },
id: f.id,
label: `${f.id} (${s.id})` @discourseComputed("wizard.steps")
}); runAfterContent(steps) {
}); let content = steps.map(function (step) {
fields.push(...stepFields); return {
} id: step.id,
name: step.title || step.id,
};
}); });
return fields; content.unshift({
id: "wizard_completion",
name: I18n.t("admin.wizard.action.run_after.wizard_completion"),
});
return content;
}, },
@computed('availableFields') @discourseComputed("apis")
builderWizardFields(fields) { availableApis(apis) {
return fields.map((f) => ` w{${f.id}}`); return apis.map((a) => {
return {
id: a.name,
name: a.title,
};
});
}, },
@computed() @discourseComputed("apis", "action.api")
builderUserFields() { availableEndpoints(apis, api) {
const noThemeKey = PROFILE_FIELDS.filter((f) => f !== 'theme_key'); if (!api) {
const fields = noThemeKey.concat(['email', 'username']); return [];
return fields.map((f) => ` u{${f}}`); }
return apis.find((a) => a.name === api).endpoints;
}, },
@observes('action.custom_category_wizard_field') @discourseComputed("fieldTypes")
toggleCustomCategoryUserField() { hasEventField(fieldTypes) {
const wizard = this.get('action.custom_category_wizard_field'); return fieldTypes.map((ft) => ft.id).includes("event");
if (wizard) this.set('action.custom_category_user_field', false);
}, },
@observes('action.custom_category_user_field') @discourseComputed("fieldTypes")
toggleCustomCategoryWizardField() { hasLocationField(fieldTypes) {
const user = this.get('action.custom_category_user_field'); return fieldTypes.map((ft) => ft.id).includes("location");
if (user) this.set('action.custom_category_wizard_field', false); },
}
}); });

Datei anzeigen

@ -1,21 +1,159 @@
import { default as computed } from 'ember-addons/ember-computed-decorators'; import { default as discourseComputed } from "discourse-common/utils/decorators";
import { equal, or } from "@ember/object/computed";
import { computed } from "@ember/object";
import { selectKitContent } from "../lib/wizard";
import UndoChanges from "../mixins/undo-changes";
import Component from "@ember/component";
import wizardSchema from "../lib/wizard-schema";
export default Ember.Component.extend({ export default Component.extend(UndoChanges, {
classNames: 'wizard-custom-field', componentType: "field",
isDropdown: Ember.computed.equal('field.type', 'dropdown'), classNameBindings: [":wizard-custom-field", "visible"],
disableId: Ember.computed.not('field.isNew'), visible: computed("currentFieldId", function () {
choicesTypes: ['translation', 'preset', 'custom'], return this.field.id === this.currentFieldId;
choicesTranslation: Ember.computed.equal('field.choices_type', 'translation'), }),
choicesPreset: Ember.computed.equal('field.choices_type', 'preset'), isDropdown: equal("field.type", "dropdown"),
choicesCustom: Ember.computed.equal('field.choices_type', 'custom'), isUpload: equal("field.type", "upload"),
isCategory: equal("field.type", "category"),
isGroup: equal("field.type", "group"),
isTag: equal("field.type", "tag"),
isText: equal("field.type", "text"),
isTextarea: equal("field.type", "textarea"),
isUrl: equal("field.type", "url"),
isComposer: equal("field.type", "composer"),
showPrefill: or("isText", "isCategory", "isTag", "isGroup", "isDropdown"),
showContent: or("isCategory", "isTag", "isGroup", "isDropdown"),
showLimit: or("isCategory", "isTag"),
isTextType: or("isText", "isTextarea", "isComposer"),
isComposerPreview: equal("field.type", "composer_preview"),
categoryPropertyTypes: selectKitContent(["id", "slug"]),
messageUrl: "https://discourse.pluginmanager.org/t/field-settings",
@computed('field.type') @discourseComputed("field.type")
isInput: (type) => type === 'text' || type === 'textarea', validations(type) {
const applicableToField = [];
@computed() for (let validation in wizardSchema.field.validations) {
presetChoices() { if (wizardSchema.field.validations[validation]["types"].includes(type)) {
return [ applicableToField.push(validation);
{ id: 'categories', name: I18n.t('admin.wizard.field.choices_preset.categories') } }
]; }
return applicableToField;
},
@discourseComputed("field.type")
isDateTime(type) {
return ["date_time", "date", "time"].indexOf(type) > -1;
},
@discourseComputed("field.type")
messageKey(type) {
let key = "type";
if (type) {
key = "edit";
}
return key;
},
setupTypeOutput(fieldType, options) {
const selectionType = {
category: "category",
tag: "tag",
group: "group",
}[fieldType];
if (selectionType) {
options[`${selectionType}Selection`] = "output";
options.outputDefaultSelection = selectionType;
}
return options;
},
@discourseComputed("field.type")
contentOptions(fieldType) {
let options = {
wizardFieldSelection: true,
textSelection: "key,value",
userFieldSelection: "key,value",
context: "field",
};
options = this.setupTypeOutput(fieldType, options);
if (this.isDropdown) {
options.wizardFieldSelection = "key,value";
options.userFieldOptionsSelection = "output";
options.textSelection = "key,value";
options.inputTypes = "association,conditional,assignment";
options.pairConnector = "association";
options.keyPlaceholder = "admin.wizard.key";
options.valuePlaceholder = "admin.wizard.value";
}
return options;
},
@discourseComputed("field.type")
prefillOptions(fieldType) {
let options = {
wizardFieldSelection: true,
textSelection: true,
userFieldSelection: "key,value",
context: "field",
};
return this.setupTypeOutput(fieldType, options);
},
@discourseComputed("step.index")
fieldConditionOptions(stepIndex) {
const options = {
inputTypes: "validation",
context: "field",
textSelection: "value",
userFieldSelection: true,
groupSelection: true,
};
if (stepIndex > 0) {
options.wizardFieldSelection = true;
options.wizardActionSelection = true;
}
return options;
},
@discourseComputed("step.index")
fieldIndexOptions(stepIndex) {
const options = {
context: "field",
userFieldSelection: true,
groupSelection: true,
};
if (stepIndex > 0) {
options.wizardFieldSelection = true;
options.wizardActionSelection = true;
}
return options;
},
actions: {
imageUploadDone(upload) {
this.setProperties({
"field.image": upload.url,
"field.image_upload_id": upload.id,
});
},
imageUploadDeleted() {
this.setProperties({
"field.image": null,
"field.image_upload_id": null,
});
},
}, },
}); });

Datei anzeigen

@ -1,19 +0,0 @@
export default Ember.Component.extend({
noneKey: 'admin.wizard.select_field',
noneValue: 'admin.wizard.none',
inputKey: 'admin.wizard.key',
inputValue: 'admin.wizard.value',
actions: {
add() {
if (!this.get('inputs')) {
this.set('inputs', Ember.A());
}
this.get('inputs').pushObject(Ember.Object.create());
},
remove(input) {
this.get('inputs').removeObject(input);
}
}
});

Datei anzeigen

@ -1,18 +1,40 @@
import { observes } from 'ember-addons/ember-computed-decorators'; import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
export default Ember.Component.extend({ export default Component.extend({
classNames: 'wizard-custom-step', classNames: "wizard-custom-step",
currentField: null,
currentAction: null,
disableId: Ember.computed.not('step.isNew'),
@observes('step') @discourseComputed("step.index")
resetCurrentObjects() { stepConditionOptions(stepIndex) {
const fields = this.get('step.fields'); const options = {
const actions = this.get('step.actions'); inputTypes: "validation",
this.setProperties({ context: "step",
currentField: fields.length ? fields[0] : null, textSelection: "value",
currentAction: actions.length ? actions[0] : null userFieldSelection: true,
}); groupSelection: true,
} };
if (stepIndex > 0) {
options["wizardFieldSelection"] = true;
options["wizardActionSelection"] = true;
}
return options;
},
actions: {
bannerUploadDone(upload) {
this.setProperties({
"step.banner": upload.url,
"step.banner_upload_id": upload.id,
});
},
bannerUploadDeleted() {
this.setProperties({
"step.banner": null,
"step.banner_upload_id": null,
});
},
},
}); });

Datei anzeigen

@ -1,82 +1,150 @@
import { default as computed } from 'ember-addons/ember-computed-decorators'; import discourseComputed from "discourse-common/utils/decorators";
import { generateName } from "../lib/wizard";
import {
setWizardDefaults,
default as wizardSchema,
} from "../lib/wizard-schema";
import { notEmpty } from "@ember/object/computed";
import EmberObject from "@ember/object";
import Component from "@ember/component";
import { A } from "@ember/array";
export default Ember.Component.extend({ export default Component.extend({
classNames: 'wizard-links', classNameBindings: [":wizard-links", "itemType"],
items: Ember.A(), items: A(),
anyLinks: notEmpty("links"),
didInsertElement() {
this.applySortable();
},
applySortable() {
this.$("ul").sortable({tolerance: 'pointer'}).on('sortupdate', (e, ui) => {
const itemId = ui.item.data('id');
const index = ui.item.index();
Ember.run.bind(this, this.updateItemOrder(itemId, index));
});
},
updateItemOrder(itemId, newIndex) { updateItemOrder(itemId, newIndex) {
const items = this.get('items'); const items = this.items;
const item = items.findBy('id', itemId); const item = items.findBy("id", itemId);
items.removeObject(item); items.removeObject(item);
item.set("index", newIndex);
items.insertAt(newIndex, item); items.insertAt(newIndex, item);
Ember.run.scheduleOnce('afterRender', this, () => this.applySortable());
}, },
@computed('type') @discourseComputed("itemType")
header: (type) => `admin.wizard.${type}.header`, header: (itemType) => `admin.wizard.${itemType}.header`,
@computed('items.@each.id', 'current') @discourseComputed(
links(items, current) { "current",
if (!items) return; "items.@each.id",
"items.@each.type",
"items.@each.label",
"items.@each.title"
)
links(current, items) {
if (!items) {
return;
}
return items.map((item) => { return items.map((item, index) => {
if (item) { if (item) {
const id = item.get('id'); let link = {
const type = this.get('type'); id: item.id,
const label = type === 'action' ? id : (item.get('label') || item.get('title') || id);
let link = { id, label };
let classes = 'btn';
if (current && item.get('id') === current.get('id')) {
classes += ' btn-primary';
}; };
link['classes'] = classes; let label = item.label || item.title || item.id;
if (this.generateLabels && item.type) {
label = generateName(item.type);
}
link.label = `${label} (${item.id})`;
let classes = "btn";
if (current && item.id === current.id) {
classes += " btn-primary";
}
link.classes = classes;
link.index = index;
if (index === 0) {
link.first = true;
}
if (index === items.length - 1) {
link.last = true;
}
return link; return link;
} }
}); });
}, },
getNextIndex() {
const items = this.items;
if (!items || items.length === 0) {
return 0;
}
const numbers = items
.map((i) => Number(i.id.split("_").pop()))
.sort((a, b) => a - b);
return numbers[numbers.length - 1];
},
actions: { actions: {
add() { add() {
const items = this.get('items'); const items = this.get("items");
const type = this.get('type'); const itemType = this.itemType;
const newId = `${type}_${items.length + 1}`; let params = setWizardDefaults({}, itemType);
let params = { id: newId, isNew: true };
if (type === 'step') { params.isNew = true;
params['fields'] = Ember.A(); params.index = this.getNextIndex();
params['actions'] = Ember.A();
};
const newItem = Ember.Object.create(params); let id = `${itemType}_${params.index + 1}`;
if (itemType === "field") {
id = `${this.parentId}_${id}`;
}
params.id = id;
let objectArrays = wizardSchema[itemType].objectArrays;
if (objectArrays) {
Object.keys(objectArrays).forEach((objectType) => {
params[objectArrays[objectType].property] = A();
});
}
const newItem = EmberObject.create(params);
items.pushObject(newItem); items.pushObject(newItem);
this.set('current', newItem);
this.sendAction('isNew'); this.set("current", newItem);
},
back(item) {
this.updateItemOrder(item.id, item.index - 1);
},
forward(item) {
this.updateItemOrder(item.id, item.index + 1);
}, },
change(itemId) { change(itemId) {
const items = this.get('items'); this.set("current", this.items.findBy("id", itemId));
this.set('current', items.findBy('id', itemId));
}, },
remove(itemId) { remove(itemId) {
const items = this.get('items'); const items = this.items;
items.removeObject(items.findBy('id', itemId)); let item;
this.set('current', items[items.length - 1]); let index;
}
} items.forEach((it, ind) => {
if (it.id === itemId) {
item = it;
index = ind;
}
});
let nextIndex;
if (this.current.id === itemId) {
nextIndex = index < items.length - 2 ? index + 1 : index - 1;
}
items.removeObject(item);
if (nextIndex) {
this.set("current", items[nextIndex]);
}
},
},
}); });

Datei anzeigen

@ -0,0 +1,38 @@
import Component from "@ember/component";
import { gt } from "@ember/object/computed";
import { computed } from "@ember/object";
import { defaultConnector } from "../lib/wizard-mapper";
import { later } from "@ember/runloop";
import I18n from "I18n";
export default Component.extend({
classNameBindings: [
":mapper-connector",
":mapper-block",
"hasMultiple::single",
],
hasMultiple: gt("connectors.length", 1),
connectorLabel: computed(function () {
let key = this.connector;
let path = this.inputTypes ? `input.${key}.name` : `connector.${key}`;
return I18n.t(`admin.wizard.${path}`);
}),
didReceiveAttrs() {
if (!this.connector) {
later(() => {
this.set(
"connector",
defaultConnector(this.connectorType, this.inputType, this.options)
);
});
}
},
actions: {
changeConnector(value) {
this.set("connector", value);
this.onUpdate("connector", this.connectorType);
},
},
});

Datei anzeigen

@ -0,0 +1,78 @@
import { computed, set } from "@ember/object";
import { alias, equal, not, or } from "@ember/object/computed";
import {
connectorContent,
defaultConnector,
defaultSelectionType,
inputTypesContent,
newPair,
} from "../lib/wizard-mapper";
import Component from "@ember/component";
import { observes } from "discourse-common/utils/decorators";
import { A } from "@ember/array";
export default Component.extend({
classNameBindings: [":mapper-input", "inputType"],
inputType: alias("input.type"),
isConditional: equal("inputType", "conditional"),
isAssignment: equal("inputType", "assignment"),
isAssociation: equal("inputType", "association"),
isValidation: equal("inputType", "validation"),
hasOutput: or("isConditional", "isAssignment"),
hasPairs: or("isConditional", "isAssociation", "isValidation"),
canAddPair: not("isAssignment"),
connectors: computed(function () {
return connectorContent("output", this.input.type, this.options);
}),
inputTypes: computed(function () {
return inputTypesContent(this.options);
}),
@observes("input.type")
setupType() {
if (this.hasPairs && (!this.input.pairs || this.input.pairs.length < 1)) {
this.send("addPair");
}
if (this.hasOutput) {
this.set("input.output", null);
if (!this.input.outputConnector) {
const options = this.options;
this.set("input.output_type", defaultSelectionType("output", options));
this.set(
"input.output_connector",
defaultConnector("output", this.inputType, options)
);
}
}
},
actions: {
addPair() {
if (!this.input.pairs) {
this.set("input.pairs", A());
}
const pairs = this.input.pairs;
const pairCount = pairs.length + 1;
pairs.forEach((p) => set(p, "pairCount", pairCount));
pairs.pushObject(
newPair(
this.input.type,
Object.assign({}, this.options, { index: pairs.length, pairCount })
)
);
},
removePair(pair) {
const pairs = this.input.pairs;
const pairCount = pairs.length - 1;
pairs.forEach((p) => set(p, "pairCount", pairCount));
pairs.removeObject(pair);
},
},
});

Datei anzeigen

@ -0,0 +1,16 @@
import { connectorContent } from "../lib/wizard-mapper";
import { alias, gt } from "@ember/object/computed";
import { computed } from "@ember/object";
import Component from "@ember/component";
export default Component.extend({
classNameBindings: [":mapper-pair", "hasConnector::no-connector"],
firstPair: gt("pair.index", 0),
showRemove: alias("firstPair"),
showJoin: computed("pair.pairCount", function () {
return this.pair.index < this.pair.pairCount - 1;
}),
connectors: computed(function () {
return connectorContent("pair", this.inputType, this.options);
}),
});

Datei anzeigen

@ -0,0 +1,16 @@
import discourseComputed from "discourse-common/utils/decorators";
import Component from "@ember/component";
export default Component.extend({
tagName: "a",
classNameBindings: ["active"],
@discourseComputed("item.type", "activeType")
active(type, activeType) {
return type === activeType;
},
click() {
this.toggle(this.item.type);
},
});

Datei anzeigen

@ -0,0 +1,410 @@
import { alias, gt, or } from "@ember/object/computed";
import { computed } from "@ember/object";
import {
default as discourseComputed,
observes,
} from "discourse-common/utils/decorators";
import { getOwner } from "discourse-common/lib/get-owner";
import { defaultSelectionType, selectionTypes } from "../lib/wizard-mapper";
import {
generateName,
sentenceCase,
snakeCase,
userProperties,
} from "../lib/wizard";
import Component from "@ember/component";
import { bind, later } from "@ember/runloop";
import I18n from "I18n";
import Subscription from "../mixins/subscription";
const customFieldActionMap = {
topic: ["create_topic", "send_message"],
post: ["create_topic", "send_message"],
category: ["create_category"],
group: ["create_group"],
user: ["update_profile"],
};
const values = ["present", "true", "false"];
export default Component.extend(Subscription, {
classNameBindings: [":mapper-selector", "activeType"],
showText: computed("activeType", function () {
return this.showInput("text");
}),
showWizardField: computed("activeType", function () {
return this.showInput("wizardField");
}),
showWizardAction: computed("activeType", function () {
return this.showInput("wizardAction");
}),
showUserField: computed("activeType", function () {
return this.showInput("userField");
}),
showUserFieldOptions: computed("activeType", function () {
return this.showInput("userFieldOptions");
}),
showCategory: computed("activeType", function () {
return this.showInput("category");
}),
showTag: computed("activeType", function () {
return this.showInput("tag");
}),
showGroup: computed("activeType", function () {
return this.showInput("group");
}),
showUser: computed("activeType", function () {
return this.showInput("user");
}),
showList: computed("activeType", function () {
return this.showInput("list");
}),
showCustomField: computed("activeType", function () {
return this.showInput("customField");
}),
showValue: computed("activeType", function () {
return this.showInput("value");
}),
textEnabled: computed("options.textSelection", "inputType", function () {
return this.optionEnabled("textSelection");
}),
wizardFieldEnabled: computed(
"options.wizardFieldSelection",
"inputType",
function () {
return this.optionEnabled("wizardFieldSelection");
}
),
wizardActionEnabled: computed(
"options.wizardActionSelection",
"inputType",
function () {
return this.optionEnabled("wizardActionSelection");
}
),
customFieldEnabled: computed(
"options.customFieldSelection",
"inputType",
function () {
return this.optionEnabled("customFieldSelection");
}
),
userFieldEnabled: computed(
"options.userFieldSelection",
"inputType",
function () {
return this.optionEnabled("userFieldSelection");
}
),
userFieldOptionsEnabled: computed(
"options.userFieldOptionsSelection",
"inputType",
function () {
return this.optionEnabled("userFieldOptionsSelection");
}
),
categoryEnabled: computed(
"options.categorySelection",
"inputType",
function () {
return this.optionEnabled("categorySelection");
}
),
tagEnabled: computed("options.tagSelection", "inputType", function () {
return this.optionEnabled("tagSelection");
}),
groupEnabled: computed("options.groupSelection", "inputType", function () {
return this.optionEnabled("groupSelection");
}),
guestGroup: computed("options.guestGroup", "inputType", function () {
return this.optionEnabled("guestGroup");
}),
userEnabled: computed("options.userSelection", "inputType", function () {
return this.optionEnabled("userSelection");
}),
listEnabled: computed("options.listSelection", "inputType", function () {
return this.optionEnabled("listSelection");
}),
valueEnabled: computed("connector", function () {
return this.connector === "is";
}),
@discourseComputed("site.groups", "guestGroup", "subscriptionType")
groups(groups, guestGroup, subscriptionType) {
let result = groups;
if (!guestGroup) {
return result;
}
if (["standard", "business"].includes(subscriptionType)) {
let guestIndex;
result.forEach((r, index) => {
if (r.id === 0) {
r.name = I18n.t("admin.wizard.selector.label.users");
guestIndex = index;
}
});
result.splice(guestIndex, 0, {
id: -1,
name: I18n.t("admin.wizard.selector.label.guests"),
});
}
return result;
},
categories: alias("site.categories"),
showComboBox: or(
"showWizardField",
"showWizardAction",
"showUserField",
"showUserFieldOptions",
"showCustomField",
"showValue"
),
showMultiSelect: or("showCategory", "showGroup"),
hasTypes: gt("selectorTypes.length", 1),
showTypes: false,
didInsertElement() {
if (
!this.activeType ||
(this.activeType && !this[`${this.activeType}Enabled`])
) {
later(() => this.resetActiveType());
}
$(document).on("click", bind(this, this.documentClick));
},
willDestroyElement() {
$(document).off("click", bind(this, this.documentClick));
},
documentClick(e) {
if (this._state === "destroying") {
return;
}
let $target = $(e.target);
if (!$target.parents(".type-selector").length && this.showTypes) {
this.set("showTypes", false);
}
},
@discourseComputed("connector")
selectorTypes() {
return selectionTypes
.filter((type) => this[`${type}Enabled`])
.map((type) => ({ type, label: this.typeLabel(type) }));
},
@discourseComputed("activeType")
activeTypeLabel(activeType) {
return this.typeLabel(activeType);
},
typeLabel(type) {
return type
? I18n.t(`admin.wizard.selector.label.${snakeCase(type)}`)
: null;
},
comboBoxAllowAny: or("showWizardField", "showWizardAction"),
@discourseComputed
showController() {
return getOwner(this).lookup("controller:admin-wizards-wizard-show");
},
@discourseComputed(
"activeType",
"showController.wizardFields.[]",
"showController.wizard.actions.[]",
"showController.userFields.[]",
"showController.currentField.id",
"showController.currentAction.id",
"showController.customFields"
)
comboBoxContent(
activeType,
wizardFields,
wizardActions,
userFields,
currentFieldId,
currentActionId,
customFields
) {
let content;
let context;
let contextType;
if (this.options.context) {
let contextAttrs = this.options.context.split(".");
context = contextAttrs[0];
contextType = contextAttrs[1];
}
if (activeType === "wizardField") {
content = wizardFields;
if (context === "field") {
content = content.filter((field) => field.id !== currentFieldId);
}
}
if (activeType === "wizardAction") {
content = wizardActions.map((a) => ({
id: a.id,
label: `${generateName(a.type)} (${a.id})`,
type: a.type,
}));
if (context === "action") {
content = content.filter((a) => a.id !== currentActionId);
}
}
if (activeType === "userField") {
content = userProperties
.map((f) => ({
id: f,
name: generateName(f),
}))
.concat(userFields || []);
if (
context === "action" &&
this.inputType === "association" &&
this.selectorType === "key"
) {
const excludedFields = ["username", "email", "trust_level"];
content = content.filter(
(userField) => excludedFields.indexOf(userField.id) === -1
);
}
}
if (activeType === "userFieldOptions") {
content = userFields;
}
if (activeType === "customField") {
content = customFields
.filter((f) => {
return (
f.type !== "json" &&
customFieldActionMap[f.klass].includes(contextType)
);
})
.map((f) => ({
id: f.name,
name: `${sentenceCase(f.klass)} ${f.name} (${f.type})`,
}));
}
if (activeType === "value") {
content = values.map((value) => ({
id: value,
name: value,
}));
}
return content;
},
@discourseComputed("activeType")
multiSelectContent(activeType) {
return {
category: this.categories,
group: this.groups,
list: "",
}[activeType];
},
@discourseComputed("activeType", "inputType")
placeholderKey(activeType) {
if (
activeType === "text" &&
this.options[`${this.selectorType}Placeholder`]
) {
return this.options[`${this.selectorType}Placeholder`];
} else {
return `admin.wizard.selector.placeholder.${snakeCase(activeType)}`;
}
},
@discourseComputed("activeType")
multiSelectOptions(activeType) {
let result = {
none: this.placeholderKey,
};
if (activeType === "list") {
result.allowAny = true;
}
return result;
},
optionEnabled(type) {
const options = this.options;
if (!options) {
return false;
}
const option = options[type];
if (option === true) {
return true;
}
if (typeof option !== "string") {
return false;
}
return option.split(",").filter((o) => {
return [this.selectorType, this.inputType].indexOf(o) !== -1;
}).length;
},
showInput(type) {
return this.activeType === type && this[`${type}Enabled`];
},
changeValue(value) {
this.set("value", value);
this.onUpdate("selector", this.activeType);
},
@observes("inputType")
resetActiveType() {
this.set(
"activeType",
defaultSelectionType(this.selectorType, this.options, this.connector)
);
},
actions: {
toggleType(type) {
this.set("activeType", type);
this.set("showTypes", false);
this.set("value", null);
this.onUpdate("selector");
},
toggleTypes() {
this.toggleProperty("showTypes");
},
changeValue(value) {
this.changeValue(value);
},
changeInputValue(event) {
this.changeValue(event.target.value);
},
changeUserValue(value) {
this.changeValue(value);
},
},
});

Datei anzeigen

@ -0,0 +1,86 @@
import { newInput, selectionTypes } from "../lib/wizard-mapper";
import discourseComputed from "discourse-common/utils/decorators";
import { later } from "@ember/runloop";
import Component from "@ember/component";
import { A } from "@ember/array";
export default Component.extend({
classNames: "wizard-mapper",
didReceiveAttrs() {
if (this.inputs && this.inputs.constructor !== Array) {
later(() => this.set("inputs", null));
}
},
@discourseComputed("inputs.@each.type")
canAdd(inputs) {
return (
!inputs ||
inputs.constructor !== Array ||
inputs.every((i) => {
return ["assignment", "association"].indexOf(i.type) === -1;
})
);
},
@discourseComputed("options.@each.inputType")
inputOptions(options) {
let result = {
inputTypes: options.inputTypes || "assignment,conditional",
inputConnector: options.inputConnector || "or",
pairConnector: options.pairConnector || null,
outputConnector: options.outputConnector || null,
context: options.context || null,
guestGroup: options.guestGroup || false,
};
let inputTypes = ["key", "value", "output"];
inputTypes.forEach((type) => {
result[`${type}Placeholder`] = options[`${type}Placeholder`] || null;
result[`${type}DefaultSelection`] =
options[`${type}DefaultSelection`] || null;
});
selectionTypes.forEach((type) => {
if (options[`${type}Selection`] !== undefined) {
result[`${type}Selection`] = options[`${type}Selection`];
} else {
result[`${type}Selection`] = type === "text" ? true : false;
}
});
return result;
},
onUpdate() {},
actions: {
add() {
if (!this.get("inputs")) {
this.set("inputs", A());
}
this.get("inputs").pushObject(
newInput(this.inputOptions, this.inputs.length)
);
this.onUpdate(this.property, "input");
},
remove(input) {
const inputs = this.inputs;
inputs.removeObject(input);
if (inputs.length) {
inputs[0].set("connector", null);
}
this.onUpdate(this.property, "input");
},
inputUpdated(component, type) {
this.onUpdate(this.property, component, type);
},
},
});

Datei anzeigen

@ -0,0 +1,33 @@
import { default as discourseComputed } from "discourse-common/utils/decorators";
import { not, notEmpty } from "@ember/object/computed";
import Component from "@ember/component";
import I18n from "I18n";
const icons = {
error: "times-circle",
success: "check-circle",
warn: "exclamation-circle",
info: "info-circle",
};
export default Component.extend({
classNameBindings: [":wizard-message", "type", "loading"],
showDocumentation: not("loading"),
showIcon: not("loading"),
hasItems: notEmpty("items"),
@discourseComputed("type")
icon(type) {
return icons[type] || "info-circle";
},
@discourseComputed("key", "component", "opts")
message(key, component, opts) {
return I18n.t(`admin.wizard.message.${component}.${key}`, opts || {});
},
@discourseComputed("component")
documentation(component) {
return I18n.t(`admin.wizard.message.${component}.documentation`);
},
});

Datei anzeigen

@ -0,0 +1,58 @@
import Component from "@ember/component";
import EmberObject from "@ember/object";
import { cloneJSON } from "discourse-common/lib/object";
import Category from "discourse/models/category";
import discourseComputed from "discourse-common/utils/decorators";
import I18n from "I18n";
export default Component.extend({
classNames: ["realtime-validations", "setting", "full", "subscription"],
@discourseComputed
timeUnits() {
return ["days", "weeks", "months", "years"].map((unit) => {
return {
id: unit,
name: I18n.t(`admin.wizard.field.validations.time_units.${unit}`),
};
});
},
init() {
this._super(...arguments);
if (!this.validations) {
return;
}
if (!this.field.validations) {
const validations = {};
this.validations.forEach((validation) => {
validations[validation] = {};
});
this.set("field.validations", EmberObject.create(validations));
}
const validationBuffer = cloneJSON(this.get("field.validations"));
let bufferCategories;
if (
validationBuffer.similar_topics &&
(bufferCategories = validationBuffer.similar_topics.categories)
) {
const categories = Category.findByIds(bufferCategories);
validationBuffer.similar_topics.categories = categories;
}
this.set("validationBuffer", validationBuffer);
},
actions: {
updateValidationCategories(type, validation, categories) {
this.set(`validationBuffer.${type}.categories`, categories);
this.set(
`field.validations.${type}.categories`,
categories.map((category) => category.id)
);
},
},
});

Datei anzeigen

@ -0,0 +1,30 @@
import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
import Subscription from "../mixins/subscription";
import DiscourseURL from "discourse/lib/url";
import I18n from "I18n";
export default Component.extend(Subscription, {
tagName: "a",
classNameBindings: [":wizard-subscription-badge", "subscriptionType"],
attributeBindings: ["title"],
@discourseComputed("subscriptionType")
i18nKey(type) {
return `admin.wizard.subscription.type.${type ? type : "none"}`;
},
@discourseComputed("i18nKey")
title(i18nKey) {
return I18n.t(`${i18nKey}.title`);
},
@discourseComputed("i18nKey")
label(i18nKey) {
return I18n.t(`${i18nKey}.label`);
},
click() {
DiscourseURL.routeTo(this.subscriptionLink);
},
});

Datei anzeigen

@ -0,0 +1,26 @@
import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
import Subscription from "../mixins/subscription";
export default Component.extend(Subscription, {
classNameBindings: [":wizard-subscription-container", "subscribed"],
@discourseComputed("subscribed")
subscribedIcon(subscribed) {
return subscribed ? "check" : "times";
},
@discourseComputed("subscribed")
subscribedLabel(subscribed) {
return `admin.wizard.subscription.${
subscribed ? "subscribed" : "not_subscribed"
}.label`;
},
@discourseComputed("subscribed")
subscribedTitle(subscribed) {
return `admin.wizard.subscription.${
subscribed ? "subscribed" : "not_subscribed"
}.title`;
},
});

Datei anzeigen

@ -0,0 +1,36 @@
import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
import Subscription from "../mixins/subscription";
import I18n from "I18n";
export default Component.extend(Subscription, {
tagName: "a",
classNameBindings: [":btn", ":btn-pavilion-support", "subscriptionType"],
attributeBindings: ["title"],
@discourseComputed("subscribed")
i18nKey(subscribed) {
return `admin.wizard.subscription.cta.${
subscribed ? "subscribed" : "none"
}`;
},
@discourseComputed("subscribed")
icon(subscribed) {
return subscribed ? "far-life-ring" : "external-link-alt";
},
@discourseComputed("i18nKey")
title(i18nKey) {
return I18n.t(`${i18nKey}.title`);
},
@discourseComputed("i18nKey")
label(i18nKey) {
return I18n.t(`${i18nKey}.label`);
},
click() {
window.open(this.subscriptionCtaLink, "_blank").focus();
},
});

Datei anzeigen

@ -0,0 +1,96 @@
import SingleSelectComponent from "select-kit/components/single-select";
import Subscription from "../mixins/subscription";
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
import discourseComputed from "discourse-common/utils/decorators";
import I18n from "I18n";
const nameKey = function (feature, attribute, value) {
if (feature === "action") {
return `admin.wizard.action.${value}.label`;
} else {
return `admin.wizard.${feature}.${attribute}.${value}`;
}
};
export default SingleSelectComponent.extend(Subscription, {
classNames: ["combo-box", "wizard-subscription-selector"],
selectKitOptions: {
autoFilterable: false,
filterable: false,
showFullTitle: true,
headerComponent:
"wizard-subscription-selector/wizard-subscription-selector-header",
caretUpIcon: "caret-up",
caretDownIcon: "caret-down",
},
allowedSubscriptionTypes(feature, attribute, value) {
let attributes = this.subscriptionAttributes[feature];
if (!attributes || !attributes[attribute]) {
return ["none"];
}
let allowedTypes = [];
Object.keys(attributes[attribute]).forEach((subscriptionType) => {
let values = attributes[attribute][subscriptionType];
if (values[0] === "*" || values.includes(value)) {
allowedTypes.push(subscriptionType);
}
});
return allowedTypes;
},
@discourseComputed("feature", "attribute", "wizard.allowGuests")
content(feature, attribute) {
return filterValues(this.wizard, feature, attribute)
.map((value) => {
let allowedSubscriptionTypes = this.allowedSubscriptionTypes(
feature,
attribute,
value
);
let subscriptionRequired =
allowedSubscriptionTypes.length &&
!allowedSubscriptionTypes.includes("none");
let attrs = {
id: value,
name: I18n.t(nameKey(feature, attribute, value)),
subscriptionRequired,
};
if (subscriptionRequired) {
let subscribed = allowedSubscriptionTypes.includes(
this.subscriptionType
);
let selectorKey = subscribed ? "subscribed" : "not_subscribed";
let selectorLabel = `admin.wizard.subscription.${selectorKey}.selector`;
attrs.disabled = !subscribed;
attrs.selectorLabel = selectorLabel;
}
return attrs;
})
.sort(function (a, b) {
if (a.subscriptionType && !b.subscriptionType) {
return 1;
}
if (!a.subscriptionType && b.subscriptionType) {
return -1;
}
if (a.subscriptionType === b.subscriptionType) {
return a.subscriptionType
? a.subscriptionType.localeCompare(b.subscriptionType)
: 0;
} else {
return a.subscriptionType === "standard" ? -1 : 0;
}
});
},
modifyComponentForRow() {
return "wizard-subscription-selector/wizard-subscription-selector-row";
},
});

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