Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
0edac160
Commit
0edac160
authored
Jul 22, 2019
by
Markus Scheidgen
Browse files
Fixed missing enter handler on login dialog. Fixes 176.
parent
42ddd00b
Pipeline
#52239
passed with stages
in 20 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gui/src/components/LoginLogout.js
View file @
0edac160
...
...
@@ -41,6 +41,7 @@ class LoginLogout extends React.Component {
super
(
props
)
this
.
handleLogout
=
this
.
handleLogout
.
bind
(
this
)
this
.
handleChange
=
this
.
handleChange
.
bind
(
this
)
this
.
handleKeyPress
=
this
.
handleKeyPress
.
bind
(
this
)
}
state
=
{
...
...
@@ -82,7 +83,7 @@ class LoginLogout extends React.Component {
handleChange
=
name
=>
event
=>
{
this
.
setState
({
[
name
]:
event
.
target
.
value
[
name
]:
event
.
target
.
value
,
failure
:
false
})
}
...
...
@@ -93,6 +94,13 @@ class LoginLogout extends React.Component {
}
}
handleKeyPress
(
ev
)
{
if
(
ev
.
key
===
'
Enter
'
)
{
ev
.
preventDefault
()
this
.
handleLoginDialogClosed
(
true
)
}
}
render
()
{
const
{
classes
,
user
,
variant
,
color
,
isLoggingIn
}
=
this
.
props
const
{
failure
}
=
this
.
state
...
...
@@ -141,6 +149,7 @@ class LoginLogout extends React.Component {
fullWidth
value
=
{
this
.
state
.
userName
}
onChange
=
{
this
.
handleChange
(
'
userName
'
)}
onKeyPress
=
{
this
.
handleKeyPress
}
/
>
<
TextField
autoComplete
=
"
current-password
"
...
...
@@ -152,6 +161,7 @@ class LoginLogout extends React.Component {
fullWidth
value
=
{
this
.
state
.
password
}
onChange
=
{
this
.
handleChange
(
'
password
'
)}
onKeyPress
=
{
this
.
handleKeyPress
}
/
>
<
/FormGroup
>
<
/form
>
...
...
Write
Preview
Supports
Markdown
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