diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-18 19:28:18 +0300 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-18 19:28:18 +0300 |
commit | ade61c9676066bd22b0aa2639bdf4888d5c0e94a (patch) | |
tree | bb0bef5730526a9da377c0c2c1e2e46cf90c2db8 /app/assets | |
parent | 73cd8ed0f8a8e64c03e1edd7bc91e58b63774f9e (diff) |
Fix error field highlighting
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/gl_field_error.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/gl_field_error.js b/app/assets/javascripts/gl_field_error.js index 972b2252acb..87c6e37b9fb 100644 --- a/app/assets/javascripts/gl_field_error.js +++ b/app/assets/javascripts/gl_field_error.js @@ -62,7 +62,7 @@ export default class GlFieldError { this.inputDomElement = this.inputElement.get(0); this.form = formErrors; this.errorMessage = this.inputElement.attr('title') || 'This field is required.'; - this.fieldErrorElement = $(`<p class='${errorMessageClass} hide'>${this.errorMessage}</p>`); + this.fieldErrorElement = $(`<p class='${errorMessageClass} hidden'>${this.errorMessage}</p>`); this.state = { valid: false, @@ -146,8 +146,8 @@ export default class GlFieldError { renderInvalid() { this.inputElement.addClass(inputErrorClass); - this.scopedSiblings.hide(); - return this.fieldErrorElement.show(); + this.scopedSiblings.addClass('hidden'); + return this.fieldErrorElement.removeClass('hidden'); } renderClear() { @@ -157,7 +157,7 @@ export default class GlFieldError { this.accessCurrentValue(trimmedInput); } this.inputElement.removeClass(inputErrorClass); - this.scopedSiblings.hide(); - this.fieldErrorElement.hide(); + this.scopedSiblings.addClass('hidden'); + this.fieldErrorElement.addClass('hidden'); } } |