Set form focus to Username field on login form

This commit is contained in:
Oliver Gorwits
2014-03-02 20:59:56 +00:00
parent 391b658ed1
commit a64eb49c27
3 changed files with 4 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
* User Reports appear in "My Reports" menu if no category is given
* Permit clipboard copy of device IP from Job Queue rows
* Failed Job Device IPs link to Discover form with pre-filled Discover IP
* Set form focus to Username field on login form
2.024003 - 2014-02-27

View File

@@ -203,7 +203,7 @@ template from this distribution:
mkdir ~/environments
cp ~/perl5/lib/perl5/auto/share/dist/App-Netdisco/environments/deployment.yml ~/environments
chmod +w ~/environments/deployment.yml
chmod 600 ~/environments/deployment.yml
Edit the file ("C<~/environments/deployment.yml>") and change the database
connection parameters to match those for your local system (that is, the

View File

@@ -38,7 +38,7 @@
[% IF NOT session.logged_in_user %]
<form class="nd_login-form" method="post" action="[% uri_for('/login') %]">
<div class="form-horizontal">
<input placeholder="Username" class="span2" name="username" type="text" required="required"/>
<input id='loginuser' placeholder="Username" class="span2" name="username" type="text" required="required"/>
<input placeholder="Password" class="span2" name="password" type="password" required="required"/>
<button type="submit" class="btn btn-info">Log In</button>
</div>
@@ -85,6 +85,7 @@
<script type="text/javascript">
var stats_loaded = 0;
$('#nq').focus(); // set focus to navbar search
$('#loginuser').focus(); // set focus to login, if it's there
$('.collapse').on('show', function() {
$('.nd_chevron').toggleClass('icon-chevron-up icon-chevron-down');