From 6bcc24eabcef135cd97189858ccba87858415c40 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 30 Mar 2023 12:02:01 +0800 Subject: [PATCH] Namespace char-counter helper --- .../helpers/{char-counter.js.es6 => wizard-char-counter.js.es6} | 2 +- .../discourse/templates/components/custom-wizard-field.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/javascripts/discourse/helpers/{char-counter.js.es6 => wizard-char-counter.js.es6} (89%) diff --git a/assets/javascripts/discourse/helpers/char-counter.js.es6 b/assets/javascripts/discourse/helpers/wizard-char-counter.js.es6 similarity index 89% rename from assets/javascripts/discourse/helpers/char-counter.js.es6 rename to assets/javascripts/discourse/helpers/wizard-char-counter.js.es6 index a700a432..3cf4aee1 100644 --- a/assets/javascripts/discourse/helpers/char-counter.js.es6 +++ b/assets/javascripts/discourse/helpers/wizard-char-counter.js.es6 @@ -2,7 +2,7 @@ import { registerUnbound } from "discourse-common/lib/helpers"; import I18n from "I18n"; import Handlebars from "handlebars"; -export default registerUnbound("char-counter", function (body, maxLength) { +export default registerUnbound("wizard-char-counter", function (body, maxLength) { let bodyLength = body ? body.length : 0; let finalString; diff --git a/assets/javascripts/discourse/templates/components/custom-wizard-field.hbs b/assets/javascripts/discourse/templates/components/custom-wizard-field.hbs index efda8629..a95f9fef 100644 --- a/assets/javascripts/discourse/templates/components/custom-wizard-field.hbs +++ b/assets/javascripts/discourse/templates/components/custom-wizard-field.hbs @@ -20,7 +20,7 @@ {{#if field.char_counter}} {{#if textType}} - {{char-counter field.value field.max_length}} + {{wizard-char-counter field.value field.max_length}} {{/if}} {{/if}}