]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: remove the autofocus on the scope input field
authorCyril Bonté <cyril.bonte@free.fr>
Thu, 18 Apr 2013 20:38:35 +0000 (22:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Apr 2013 20:42:33 +0000 (22:42 +0200)
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.

src/dumpstats.c

index 2069048e781f6576069b7e3d4d858c4357e164a9..806d9c6d80078a4531df15d257e6f0f26bfe2405 100644 (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" : "",