1
0
Fork 0
Commit-Graph

220 Commits

Autor SHA1 Nachricht Datum
Angus McLeod
150afb29e0 Namespace CSS and remove uneccessary site attributes 2022-07-27 14:40:05 +01:00
Angus McLeod
a19a1fa3b1 Refactor wizard client and add tests 2022-06-15 08:03:38 +02:00
Angus McLeod
46c86cda58 Move to new coverage approach 2022-03-12 14:00:07 +01:00
Angus McLeod
3169c0803e BUGFIX: assignment does not need mapping 2022-03-03 20:38:49 +01: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
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
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
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
b7575a3295 use standard naming for custom fields 2021-10-30 16:07:16 +05:30
Faizaan Gagan
c1481e2ad4 Merge branch 'main' into wizard-permissions 2021-10-30 14:29:32 +05:30
angusmcleod
805e934fdf FIX: cast both key and value as boolean if operator is `is:[true|false]` 2021-10-20 20:48:38 +08:00
Faizaan Gagan
687c3530b3 WIP 2021-10-19 09:05:55 +05:30
Faizaan Gagan
d9d4c7d8fa WIP 2021-10-14 18:27:18 +05:30
angusmcleod
1edfcca78b DEV: remove group log settings change from create_group action 2021-10-05 10:23:48 +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
208cb1229a FIX: Minor bugfixes in manager and create_group action 2021-09-07 11:11:29 +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
Faizaan Gagan
3c70b712bf remove redundant reset method 2021-08-13 18:57:20 +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
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
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
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
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
c9f90fb8ce FIX: text length validation bug 2021-07-07 11:50:56 +05:30
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
6d1958d772 Merge branch 'master' into submission_improvements 2021-06-28 13:54:03 +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
angusmcleod
3d9f6aac98 Ensure data is not nil 2021-06-23 17:02:21 +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
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
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
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
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
Faizaan Gagan
ff14570d64 FIX: exclude conditional fields while saving step submission 2021-05-12 18:15:55 +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