diff --git a/assets/javascripts/wizard/initializers/custom.js.es6 b/assets/javascripts/wizard/initializers/custom.js.es6 index c426514e..225f1f0f 100644 --- a/assets/javascripts/wizard/initializers/custom.js.es6 +++ b/assets/javascripts/wizard/initializers/custom.js.es6 @@ -71,6 +71,10 @@ export default { return index === 0 && !required; }.property('step.index', 'wizard.required'), + cookedTitle: function() { + return cook(this.get('step.title')); + }.property('step.title'), + cookedDescription: function() { return cook(this.get('step.description')); }.property('step.description'), diff --git a/assets/javascripts/wizard/templates/components/wizard-step.hbs b/assets/javascripts/wizard/templates/components/wizard-step.hbs index 41cc336a..ae793060 100644 --- a/assets/javascripts/wizard/templates/components/wizard-step.hbs +++ b/assets/javascripts/wizard/templates/components/wizard-step.hbs @@ -1,6 +1,6 @@
{{#if step.title}} -

{{step.title}}

+

{{cookedTitle}}

{{/if}} {{#if step.description}} diff --git a/lib/wizard_edits.rb b/lib/wizard_edits.rb index 4a24afd3..9ca52331 100644 --- a/lib/wizard_edits.rb +++ b/lib/wizard_edits.rb @@ -127,8 +127,8 @@ end ::WizardStepSerializer.class_eval do def title - return object.title if object.title - I18n.t("#{object.key || i18n_key}.title", default: '') + return PrettyText.cook(object.title) if object.title + PrettyText.cook(I18n.t("#{object.key || i18n_key}.title", default: '')) end def description