From 4ceffb7d0fcebd57c1af001dc20536afad1af00e Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 3 Apr 2023 11:04:28 +1000 Subject: [PATCH 01/10] FIX: Apply char-counter fix to composer as well --- .../templates/components/custom-wizard-field-composer.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field-composer.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field-composer.hbs index 2c966d24..5e54636b 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field-composer.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field-composer.hbs @@ -15,6 +15,6 @@ {{#if field.char_counter}} - {{char-counter field.value field.max_length}} + {{wizard-char-counter field.value field.max_length}} {{/if}} From 61ec6123d7597c2dbbc77bea60ad3f03996b7ad4 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 3 Apr 2023 12:28:06 +1000 Subject: [PATCH 02/10] Handle admin template deprecations --- .../wizard-subscription-container.js.es6 | 2 +- .../templates/admin-wizards-api-show.hbs | 58 +++++++++++---- .../templates/admin-wizards-manager.hbs | 21 +++--- .../templates/admin-wizards-wizard-show.hbs | 51 +++++++++---- .../components/custom-field-input.hbs | 7 +- .../components/custom-wizard-editor.hbs | 7 +- .../components/wizard-custom-action.hbs | 27 +++++-- .../components/wizard-custom-field.hbs | 74 +++++++++++++------ .../components/wizard-custom-step.hbs | 14 +++- .../components/wizard-mapper-selector.hbs | 11 +-- .../wizard-realtime-validations.hbs | 11 ++- 11 files changed, 200 insertions(+), 83 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-subscription-container.js.es6 b/assets/javascripts/discourse/components/wizard-subscription-container.js.es6 index 5cc6b17c..3a1eac9c 100644 --- a/assets/javascripts/discourse/components/wizard-subscription-container.js.es6 +++ b/assets/javascripts/discourse/components/wizard-subscription-container.js.es6 @@ -7,7 +7,7 @@ export default Component.extend(Subscription, { @discourseComputed("subscribed") subscribedIcon(subscribed) { - return subscribed ? "check" : "dash"; + return subscribed ? "check" : "times"; }, @discourseComputed("subscribed") diff --git a/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs b/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs index 303b3f6d..7fe0fd21 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-api-show.hbs @@ -32,13 +32,19 @@
- {{input type="checkbox" checked=wizard.after_signup}} + {{i18n "admin.wizard.after_signup_label"}}
@@ -88,7 +99,10 @@
- {{input type="checkbox" checked=wizard.prompt_completion}} + {{i18n "admin.wizard.prompt_completion_label"}}
@@ -98,7 +112,10 @@
- {{input type="checkbox" checked=wizard.after_time}} + {{i18n "admin.wizard.after_time_label"}} {{d-button action=(action "setNextSessionScheduled") @@ -114,7 +131,10 @@
- {{input type="checkbox" checked=wizard.required}} + {{i18n "admin.wizard.required_label"}}
@@ -124,7 +144,10 @@
- {{input type="checkbox" checked=wizard.restart_on_revisit}} + {{i18n "admin.wizard.restart_on_revisit_label"}}
diff --git a/assets/javascripts/discourse/templates/components/custom-field-input.hbs b/assets/javascripts/discourse/templates/components/custom-field-input.hbs index c0bdaaff..8c532cc9 100644 --- a/assets/javascripts/discourse/templates/components/custom-field-input.hbs +++ b/assets/javascripts/discourse/templates/components/custom-field-input.hbs @@ -20,9 +20,10 @@ )}} - {{input - value=field.name - placeholder=(i18n "admin.wizard.custom_field.name.select")}} + {{multi-select diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs index 5c1cc45b..6350594c 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-editor.hbs @@ -40,7 +40,12 @@ {{conditional-loading-spinner condition=loading}} - {{textarea tabindex=tabindex value=value class="d-editor-input" placeholder=placeholder}} +