MINOR: stats: remove the autofocus on the scope input field

commit 88c278fadf provided a new input field on the statistics page which was
focused by default. The autofocus prevent to scroll down the page with the
keyboard immediately afterloading it, without the need to leave that field.
It also interfered with "stats refresh" by scrolling up to this field on each
refresh.

This small patch removes the autofocus keyword and adds a tabindex="1" as
suggested by Vincent Bernat. It also cleans up the generated html code.
This commit is contained in:
Cyril Bont 2013-04-18 22:38:35 +02:00 committed by Willy Tarreau
parent 88c278fadf
commit 5465684e20

View File

@ -3174,7 +3174,7 @@ static void stats_dump_html_info(struct stream_interface *si, struct uri_auth *u
scope_txt[si->applet.ctx.stats.scope_len] = '\0';
chunk_appendf(&trash,
"<li><form method=GET ACTION='%s%s%s'>Scope : <input value='%s' name='" STAT_SCOPE_INPUT_NAME "' autofocus size=8 maxlength='%d'/></form>\n",
"<li><form method=\"GET\" action=\"%s%s%s\">Scope : <input value=\"%s\" name=\"" STAT_SCOPE_INPUT_NAME "\" size=\"8\" maxlength=\"%d\" tabindex=\"1\"/></form>\n",
uri->uri_prefix,
(si->applet.ctx.stats.flags & STAT_HIDE_DOWN) ? ";up" : "",
(si->applet.ctx.stats.flags & STAT_NO_REFRESH) ? ";norefresh" : "",