From af93a67bb1b41d839de4d26989d0f9763e37328a Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Wed, 15 Jun 2022 09:08:28 +0200 Subject: [PATCH] Fixes from the cherry picks --- .../javascripts/wizard/components/wizard-composer-editor.js.es6 | 2 +- .../javascripts/wizard/lib/initialize/patch-components.js.es6 | 2 +- assets/javascripts/wizard/models/wizard.js.es6 | 1 + .../wizard/templates/components/wizard-field-text.hbs | 2 +- .../wizard/templates/components/wizard-field-textarea.hbs | 2 +- assets/javascripts/wizard/templates/components/wizard-field.hbs | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 index 2c04cd4f..4f44d439 100644 --- a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 +++ b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 @@ -25,7 +25,7 @@ export default ComposerEditor.extend({ lastValidatedAt: "lastValidatedAt", popupMenuOptions: [], draftStatus: "null", - replyPlaceholder: alias("field.placeholder"), + replyPlaceholder: alias("field.translatedPlaceholder"), uploadingFieldId: null, @on("didInsertElement") diff --git a/assets/javascripts/wizard/lib/initialize/patch-components.js.es6 b/assets/javascripts/wizard/lib/initialize/patch-components.js.es6 index 90ded90c..9d13160e 100644 --- a/assets/javascripts/wizard/lib/initialize/patch-components.js.es6 +++ b/assets/javascripts/wizard/lib/initialize/patch-components.js.es6 @@ -1,5 +1,5 @@ export default { - run(_, container) { + run(app, container) { const getToken = requirejs("wizard/lib/ajax").getToken; const isTesting = requirejs("discourse-common/config/environment") .isTesting; diff --git a/assets/javascripts/wizard/models/wizard.js.es6 b/assets/javascripts/wizard/models/wizard.js.es6 index bc2bff14..15bcbb8c 100644 --- a/assets/javascripts/wizard/models/wizard.js.es6 +++ b/assets/javascripts/wizard/models/wizard.js.es6 @@ -57,6 +57,7 @@ CustomWizard.reopenClass({ wizardJson.steps = wizardJson.steps .map((step) => { const stepObj = Step.create(step); + stepObj.wizardId = wizardJson.id; stepObj.fields.sort((a, b) => { return parseFloat(a.number) - parseFloat(b.number); diff --git a/assets/javascripts/wizard/templates/components/wizard-field-text.hbs b/assets/javascripts/wizard/templates/components/wizard-field-text.hbs index be44e8e7..08733d3f 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-text.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-text.hbs @@ -1 +1 @@ -{{input id=field.id value=field.value class=fieldClass placeholder=field.placeholder tabindex=field.tabindex autocomplete=autocomplete}} +{{input id=field.id value=field.value class=fieldClass placeholder=field.translatedPlaceholder tabindex=field.tabindex autocomplete=autocomplete}} diff --git a/assets/javascripts/wizard/templates/components/wizard-field-textarea.hbs b/assets/javascripts/wizard/templates/components/wizard-field-textarea.hbs index 6efb7560..dda299bc 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field-textarea.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field-textarea.hbs @@ -1 +1 @@ -{{textarea id=field.id value=field.value class=fieldClass placeholder=field.placeholder tabindex=field.tabindex}} +{{textarea id=field.id value=field.value class=fieldClass placeholder=field.translatedPlaceholder tabindex=field.tabindex}} diff --git a/assets/javascripts/wizard/templates/components/wizard-field.hbs b/assets/javascripts/wizard/templates/components/wizard-field.hbs index e0dd1551..efda8629 100644 --- a/assets/javascripts/wizard/templates/components/wizard-field.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-field.hbs @@ -1,5 +1,5 @@ {{#if field.image}}