diff --git a/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 new file mode 100644 index 00000000..dc5d1a02 --- /dev/null +++ b/assets/javascripts/discourse/initializers/custom-wizard-edits.js.es6 @@ -0,0 +1,25 @@ +import { withPluginApi } from 'discourse/lib/plugin-api'; + +export default { + name: 'custom-wizard-edits', + initialize() { + withPluginApi('0.8.12', api => { + api.modifyClass('component:global-notice', { + buildBuffer(buffer) { + this._super(...arguments); + const wizards = this.site.get('complete_custom_wizard'); + if (wizards) { + wizards.forEach((w) => { + const text = I18n.t('wizard.complete_custom', { + wizard_url: w.url, + wizard_name: w.name, + site_name: this.siteSettings.title + }); + buffer.push(`