@@ -96,7 +96,7 @@ class AddCommentFormView extends React.PureComponent {
9696 < div className = "col-sm-12 form-group" >
9797 < form id = "add-comment-form"
9898 aria-label = { l10n [ 't_add_comment' ] || 'Add a comment' }
99- className = { ` form-horizontal ${ hasValidationErrors ? 'has-error' : '' } ` }
99+ className = " form-horizontal"
100100 onSubmit = { handleSubmit } >
101101 { hasServerError &&
102102 < div id = "add-comment-failed-msg"
@@ -105,7 +105,7 @@ class AddCommentFormView extends React.PureComponent {
105105 { l10n [ 't_server_error' ] || 'Server error' }
106106 </ div >
107107 }
108- < div className = " form-group form-group-sm" >
108+ < div className = { ` form-group form-group-sm ${ hasValidationErrors ? 'has-error' : '' } ` } >
109109 < label htmlFor = "new-comment" className = "control-label col-sm-3 required-field" >
110110 { l10n [ 't_comment' ] || 'Comment' }
111111 </ label >
@@ -118,14 +118,14 @@ class AddCommentFormView extends React.PureComponent {
118118 required = "required"
119119 onChange = { handleChange } >
120120 </ textarea >
121+ { hasValidationErrors &&
122+ < span id = "new-comment.errors" className = "help-block" >
123+ { validationErrors . join ( ', ' ) }
124+ </ span >
125+ }
121126 </ div >
122127 </ div >
123128 < div className = "col-sm-offset-3 col-sm-9" >
124- { hasValidationErrors &&
125- < span id = "new-comment.errors" className = "help-block" >
126- { validationErrors . join ( ', ' ) }
127- </ span >
128- }
129129 < button
130130 type = "submit"
131131 className = "btn btn-primary btn-sm"
0 commit comments