Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
d4e9938e
Commit
d4e9938e
authored
Aug 27, 2015
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #533 from badsyntax/login-form-focus
Focus on fields in the login form
parents
b2dfdc38
f26c0b71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
login.html
management/templates/login.html
+16
-2
No files found.
management/templates/login.html
View file @
d4e9938e
...
...
@@ -57,11 +57,15 @@ sudo tools/mail.py user make-admin me@{{hostname}}</pre>
<script>
function
do_login
()
{
if
(
$
(
'
#loginEmail
'
).
val
()
==
""
)
{
show_modal_error
(
"
Login Failed
"
,
"
Enter your email address.
"
)
show_modal_error
(
"
Login Failed
"
,
"
Enter your email address.
"
,
function
()
{
$
(
'
#loginEmail
'
).
focus
();
});
return
false
;
}
if
(
$
(
'
#loginPassword
'
).
val
()
==
""
)
{
show_modal_error
(
"
Login Failed
"
,
"
Enter your email password.
"
)
show_modal_error
(
"
Login Failed
"
,
"
Enter your email password.
"
,
function
()
{
$
(
'
#loginPassword
'
).
focus
();
});
return
false
;
}
...
...
@@ -126,4 +130,14 @@ function do_logout() {
sessionStorage
.
removeItem
(
"
miab-cp-credentials
"
);
show_panel
(
'
login
'
);
}
function
show_login
()
{
$
(
'
#loginEmail,#loginPassword
'
).
each
(
function
()
{
var
input
=
$
(
this
);
if
(
!
$
.
trim
(
input
.
val
()))
{
input
.
focus
();
return
false
;
}
});
}
</script>
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