Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
ade61c96
Commit
ade61c96
authored
Apr 18, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error field highlighting
parent
73cd8ed0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/gl_field_error.js
app/assets/javascripts/gl_field_error.js
+5
-5
No files found.
app/assets/javascripts/gl_field_error.js
View file @
ade61c96
...
...
@@ -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
}
hid
e
'>
${
this
.
errorMessage
}
</p>`
);
this
.
fieldErrorElement
=
$
(
`<p class='
${
errorMessageClass
}
hid
den
'>
${
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
'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment