From 12cd8ac201be5795318aa34be956cdff426581d5 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Wed, 26 Oct 2022 09:40:02 +0200 Subject: [PATCH] FIX: straighten-out wizard-level subscription features --- .../templates/admin-wizards-wizard-show.hbs | 68 +++++++++---------- assets/stylesheets/common/admin.scss | 12 +--- lib/custom_wizard/subscription.rb | 6 ++ 3 files changed, 41 insertions(+), 45 deletions(-) diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs index 96d773cf..11a2b415 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard-show.hbs @@ -55,21 +55,11 @@
- +
- {{input type="checkbox" checked=wizard.required}} - {{i18n "admin.wizard.required_label"}} -
-
- -
-
- -
-
- {{input type="checkbox" checked=wizard.after_signup}} - {{i18n "admin.wizard.after_signup_label"}} + {{input type="checkbox" checked=wizard.save_submissions}} + {{i18n "admin.wizard.save_submissions_label"}}
@@ -83,6 +73,16 @@
+
+
+ +
+
+ {{input type="checkbox" checked=wizard.after_signup}} + {{i18n "admin.wizard.after_signup_label"}} +
+
+
@@ -108,32 +108,14 @@
-
-
- -
-
- {{wizard-mapper - inputs=wizard.permitted - options=(hash - context="wizard" - inputTypes="assignment,validation" - groupSelection="output" - userFieldSelection="key" - textSelection="value" - inputConnector="and" - )}} -
-
- {{#wizard-subscription-container}}
- +
- {{input type="checkbox" checked=wizard.save_submissions}} - {{i18n "admin.wizard.save_submissions_label"}} + {{input type="checkbox" checked=wizard.required}} + {{i18n "admin.wizard.required_label"}}
@@ -146,6 +128,24 @@ {{i18n "admin.wizard.restart_on_revisit_label"}} + +
+
+ +
+
+ {{wizard-mapper + inputs=wizard.permitted + options=(hash + context="wizard" + inputTypes="assignment,validation" + groupSelection="output" + userFieldSelection="key" + textSelection="value" + inputConnector="and" + )}} +
+
{{/wizard-subscription-container}} diff --git a/assets/stylesheets/common/admin.scss b/assets/stylesheets/common/admin.scss index 9c23d498..6a1601d9 100644 --- a/assets/stylesheets/common/admin.scss +++ b/assets/stylesheets/common/admin.scss @@ -183,16 +183,6 @@ $error: #ef1700; @extend .wizard-settings-group; } -.admin-wizard-container.settings { - .wizard-settings { - .wizard-subscription-container { - [class~="setting"] { - margin-bottom: 0; - } - } - } -} - .wizard-custom-field { background: transparent; background-color: var(--primary-very-low); @@ -868,7 +858,7 @@ $error: #ef1700; .subscription-header { display: flex; justify-content: space-between; - margin-bottom: 0.25em; + margin-bottom: 0.5em; h3 { margin: 0; diff --git a/lib/custom_wizard/subscription.rb b/lib/custom_wizard/subscription.rb index 86330cc7..b2abb761 100644 --- a/lib/custom_wizard/subscription.rb +++ b/lib/custom_wizard/subscription.rb @@ -18,6 +18,12 @@ class CustomWizard::Subscription standard: ['*'], business: ['*'], community: ['*'] + }, + restart_on_revisit: { + none: [], + standard: ['*'], + business: ['*'], + community: ['*'] } }, step: {