diff --git a/app/assets/javascripts/characterCount.js b/app/assets/javascripts/characterCount.js deleted file mode 100644 index 97232c615..000000000 --- a/app/assets/javascripts/characterCount.js +++ /dev/null @@ -1,39 +0,0 @@ -(function(Modules) { - "use strict"; - - Modules.CharacterCount = function() { - - this.start = function(component) { - - var getCharacterCount = () => - ($textarea.val()).length; - - var getLengthOfOneMessage = () => - 160 - (serviceName + ': ').length; - - var $component = $(component); - - var serviceName = $component.data('service-name'); - - var $textarea = $('textarea', $component) - .eq(0) - .on('change keyup paste', () => $counter.html(` - ${getCharacterCount()} of ${getLengthOfOneMessage()} characters - `)); - - $component - .append($counter = $(` -
- `)); - - $textarea - .trigger('change'); - - }; - - }; - -})(window.GOVUK.Modules); diff --git a/app/assets/stylesheets/components/textbox.scss b/app/assets/stylesheets/components/textbox.scss index d49b0c6c6..27ee0d1f8 100644 --- a/app/assets/stylesheets/components/textbox.scss +++ b/app/assets/stylesheets/components/textbox.scss @@ -54,9 +54,3 @@ .textbox-right-aligned { text-align: right; } - -.textbox-character-count { - @include core-19($tabular-numbers: true); - margin: 10px 0 0 0; - color: $secondary-text-colour; -} diff --git a/app/templates/components/textbox.html b/app/templates/components/textbox.html index cfd6f15d2..40d141072 100644 --- a/app/templates/components/textbox.html +++ b/app/templates/components/textbox.html @@ -9,16 +9,9 @@ width='2-3', suffix=None, safe_error_message=False, - rows=8, - character_count=False, - service_name=None + rows=8 ) %} -