Please set focus to "username" when page loads

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Please set focus to "username" when page loads

Post 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?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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.
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

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

Post by eloyd »

Oh, like I'm going to add one word to a piece of HTML to solve my own problems. Inconceivable!
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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?
Former Nagios employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

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

Post 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. :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

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

Post by jomann »

Pointing out this will be in the 2015R1.1 release :)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked