Commit a1ebb1dc authored by travis%sedsystems.ca's avatar travis%sedsystems.ca

Bug 281632 : Add javascript to focus/select the voting textbox or checkbox

Patch by GavinS <bugzilla@chimpychompy.org> r=wurblzap a=justdave
parent d2664956
...@@ -42,6 +42,13 @@ ...@@ -42,6 +42,13 @@
[% h2 = voting_user.login FILTER html %] [% h2 = voting_user.login FILTER html %]
[% IF canedit %] [% IF canedit %]
[% title = "Change Votes" %] [% title = "Change Votes" %]
[% IF bug_id %]
[%# We .select and .focus the input so it works for textbox and
checkbox %]
[% onload = "document.forms['voting_form'].bug_" _ bug_id _
".select();document.forms['voting_form'].bug_" _ bug_id _
".focus()" %]
[% END %]
[% ELSE %] [% ELSE %]
[% title = "Show Votes" %] [% title = "Show Votes" %]
[% END %] [% END %]
...@@ -63,7 +70,7 @@ ...@@ -63,7 +70,7 @@
[% END %] [% END %]
[% IF products.size %] [% IF products.size %]
<form method="post" action="votes.cgi"> <form name="voting_form" method="post" action="votes.cgi">
<input type="hidden" name="action" value="vote"> <input type="hidden" name="action" value="vote">
<table cellspacing="4"> <table cellspacing="4">
<tr> <tr>
...@@ -105,10 +112,10 @@ ...@@ -105,10 +112,10 @@
[% IF canedit %] [% IF canedit %]
[% IF product.onevoteonly %] [% IF product.onevoteonly %]
<input type="checkbox" name="[% bug.id %]" value="1" <input type="checkbox" name="[% bug.id %]" value="1"
[% " checked" IF bug.count %]> [% " checked" IF bug.count %] id="bug_[% bug.id %]">
[% ELSE %] [% ELSE %]
<input name="[% bug.id %]" value="[% bug.count %]" <input name="[% bug.id %]" value="[% bug.count %]"
size="2"> size="2" id="bug_[% bug.id %]">
[% END %] [% END %]
[% ELSE %] [% ELSE %]
[% bug.count %] [% bug.count %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment