summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-02-16 02:13:02 +0100
committertravis%sedsystems.ca <>2005-02-16 02:13:02 +0100
commita1ebb1dc2f70d884adb8c2e308ffc36fde647398 (patch)
tree49e944cb79e316d3d45941e2e802c73aaeb1d743 /template/en/default
parentd2664956a3387b9b969f1c1bec7dc615f95bc9a7 (diff)
downloadbugzilla-a1ebb1dc2f70d884adb8c2e308ffc36fde647398.tar.gz
bugzilla-a1ebb1dc2f70d884adb8c2e308ffc36fde647398.tar.xz
Bug 281632 : Add javascript to focus/select the voting textbox or checkbox
Patch by GavinS <bugzilla@chimpychompy.org> r=wurblzap a=justdave
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/bug/votes/list-for-user.html.tmpl13
1 files changed, 10 insertions, 3 deletions
diff --git a/template/en/default/bug/votes/list-for-user.html.tmpl b/template/en/default/bug/votes/list-for-user.html.tmpl
index b7a47e2e0..e0d97acb1 100644
--- a/template/en/default/bug/votes/list-for-user.html.tmpl
+++ b/template/en/default/bug/votes/list-for-user.html.tmpl
@@ -42,6 +42,13 @@
[% h2 = voting_user.login FILTER html %]
[% IF canedit %]
[% 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 %]
[% title = "Show Votes" %]
[% END %]
@@ -63,7 +70,7 @@
[% END %]
[% 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">
<table cellspacing="4">
<tr>
@@ -105,10 +112,10 @@
[% IF canedit %]
[% IF product.onevoteonly %]
<input type="checkbox" name="[% bug.id %]" value="1"
- [% " checked" IF bug.count %]>
+ [% " checked" IF bug.count %] id="bug_[% bug.id %]">
[% ELSE %]
<input name="[% bug.id %]" value="[% bug.count %]"
- size="2">
+ size="2" id="bug_[% bug.id %]">
[% END %]
[% ELSE %]
[% bug.count %]