Page 1 of 1

Please set focus to "username" when page loads

Posted: Wed Nov 05, 2014 8:54 am
by eloyd
It would be nice to save a clickstroke and not have to select the username field when first loading the NLS login page. Would it be possible to have the username field automatically selected for focus when the page loads?

Re: Please set focus to "username" when page loads

Posted: Wed Nov 05, 2014 10:45 am
by tmcdonald
Change /var/www/html/nagioslogserver/application/views/auth/login.php line 26 from:

Code: Select all

<input type="text" name="username" value="<?php echo $username; ?>" placeholder="<?php echo _('Username'); ?>"><br/>
to

Code: Select all

<input type="text" name="username" value="<?php echo $username; ?>" placeholder="<?php echo _('Username'); ?>" autofocus><br/>
and I'll put in a feature request to make this permanent.

Re: Please set focus to "username" when page loads

Posted: Wed Nov 05, 2014 10:49 am
by eloyd
Oh, like I'm going to add one word to a piece of HTML to solve my own problems. Inconceivable!

Re: Please set focus to "username" when page loads

Posted: Wed Nov 05, 2014 10:50 am
by tmcdonald
Shall I do it in Javascript? Or perhaps a nice Flash applet that will move your cursor to the field and click for you?

Re: Please set focus to "username" when page loads

Posted: Wed Nov 05, 2014 12:07 pm
by eloyd
I expect an HTML5 app on my mobile phone that connects to my desktop via gotomypc.com, scripts a telnet session to log me into our NLS server, and does the work for me by exposing the disk to the appropriate cosmic rays needed to change the orientation of the correct dipoles.

Oh, and please, God, close this thread. :-)

Re: Please set focus to "username" when page loads

Posted: Mon Nov 10, 2014 12:19 pm
by jomann
Pointing out this will be in the 2015R1.1 release :)