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
This commit is contained in:
olav%bkor.dhs.org 2006-10-16 19:22:57 +00:00
Родитель 924df2c0bf
Коммит 1af07f5be8
1 изменённых файлов: 21 добавлений и 7 удалений

Просмотреть файл

@ -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">