summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorolav%bkor.dhs.org <>2006-10-17 04:22:57 +0200
committerolav%bkor.dhs.org <>2006-10-17 04:22:57 +0200
commit1b2d1898e86b19f73b88ea0f2d52ce137446c564 (patch)
tree4791f0ebb85133c51e0d145a67404ffc5d0e656d
parent155b6f827f45feae82602c8010625408285b382d (diff)
downloadbugzilla-1b2d1898e86b19f73b88ea0f2d52ce137446c564.tar.gz
bugzilla-1b2d1898e86b19f73b88ea0f2d52ce137446c564.tar.xz
Bug 314789: 'Leave as {CURRENT STATE}' should not appear unless there is another radio button
Patch By Olav Vitters <olav@bkor.dhs.org> r=timeless a=myk
-rw-r--r--template/en/default/bug/knob.html.tmpl28
1 files changed, 21 insertions, 7 deletions
diff --git a/template/en/default/bug/knob.html.tmpl b/template/en/default/bug/knob.html.tmpl
index 00ffcb053..02b5bed8a 100644
--- a/template/en/default/bug/knob.html.tmpl
+++ b/template/en/default/bug/knob.html.tmpl
@@ -25,16 +25,12 @@
[%# *** Knob *** %]
<br>
- <input type="radio" id="knob-leave" name="knob" value="none" checked="checked">
- <label for="knob-leave">
- Leave as <b>[% status_descs.${bug.bug_status} FILTER html %]&nbsp;
- [% get_resolution(bug.resolution) FILTER html %]</b>
- </label>
- <br>
[% knum = 1 %]
+ [% initial_action_shown = 0 %]
[% IF bug.isunconfirmed && bug.user.canconfirm %]
+ [% PROCESS initial_action %]
<input type="radio" id="knob-confirm" name="knob" value="confirm">
<label for="knob-confirm">
Confirm [% terms.bug %] (change status to <b>[% status_descs.NEW FILTER html %]</b>)
@@ -45,6 +41,7 @@
[% IF bug.isopened && bug.bug_status != "ASSIGNED" && bug.user.canedit
&& (!bug.isunconfirmed || bug.user.canconfirm) %]
+ [% PROCESS initial_action %]
<input type="radio" id="knob-accept" name="knob" value="accept">
<label for="knob-accept">
Accept [% terms.bug %] (
@@ -58,6 +55,7 @@
[% IF bug.user.canedit || bug.user.isreporter %]
[% IF bug.isopened %]
[% IF bug.resolution %]
+ [% PROCESS initial_action %]
<input type="radio" id="knob-clear" name="knob" value="clearresolution">
<label for="knob-clear">
Clear the resolution (remove the current resolution of
@@ -67,6 +65,7 @@
[% knum = knum + 1 %]
[% END %]
+ [% PROCESS initial_action %]
<input type="radio" id="knob-resolve" name="knob" value="resolve">
<label for="knob-resolve">
Resolve [% terms.bug %], changing
@@ -120,6 +119,7 @@
[% ELSE %]
[% IF bug.resolution != "MOVED" ||
(bug.resolution == "MOVED" && bug.user.canmove) %]
+ [% PROCESS initial_action %]
<input type="radio" id="knob-change-resolution" name="knob" value="change_resolution">
<label for="knob-change-resolution">
Change <a href="page.cgi?id=fields.html#resolution">resolution</a> to
@@ -136,6 +136,7 @@
[% knum = knum + 1 %]
[% END %]
[% IF bug.bug_status == "RESOLVED" %]
+ [% PROCESS initial_action %]
<input type="radio" id="knob-verify" name="knob" value="verify">
<label for="knob-verify">
Mark [% terms.bug %] as <b>[% status_descs.VERIFIED FILTER html %]</b>
@@ -144,6 +145,7 @@
[% knum = knum + 1 %]
[% END %]
[% IF bug.bug_status != "CLOSED" %]
+ [% PROCESS initial_action %]
<input type="radio" id="knob-close" name="knob" value="close">
<label for="knob-close">
Mark [% terms.bug %] as <b>[% status_descs.CLOSED FILTER html %]</b>
@@ -178,9 +180,21 @@
[% END %]
</p>
-
[%# Common actions %]
+[% BLOCK initial_action %]
+ [%# Only show 'Leave as' action in combination with another knob %]
+ [% IF !initial_action_shown %]
+ <input type="radio" id="knob-leave" name="knob" value="none" checked="checked">
+ <label for="knob-leave">
+ Leave as <b>[% status_descs.${bug.bug_status} FILTER html %]&nbsp;
+ [% get_resolution(bug.resolution) FILTER html %]</b>
+ </label>
+ <br>
+ [% initial_action_shown = 1 %]
+ [% END %]
+[% END %]
+
[% BLOCK select_resolution %]
<select name="resolution"
onchange="document.changeform.knob[[% knum %]].checked=true">