Commit c91a0fda authored by Frédéric Buclin's avatar Frédéric Buclin

Fixes on checkin for bug 769134

parent 93236b38
......@@ -2508,6 +2508,7 @@ sub _set_product {
my @idlist = ($self->id);
push(@idlist, map {$_->id} @{ $params->{other_bugs} })
if $params->{other_bugs};
@idlist = uniq @idlist;
# Get the ID of groups which are no longer valid in the new product.
my $gids = $dbh->selectcol_arrayref(
'SELECT bgm.group_id
......@@ -2526,7 +2527,7 @@ sub _set_product {
# Did we come here from editing multiple bugs? (affects how we
# show optional group changes)
$vars{multiple_bugs} = Bugzilla->cgi->param('id') ? 0 : 1;
$vars{multiple_bugs} = (@idlist > 1) ? 1 : 0;
}
if (%vars) {
......
......@@ -141,7 +141,6 @@
<p>These groups are optional. You can decide to restrict [% terms.bugs %] to
one or more of the following groups:<br>
[% IF multiple_bugs %]
[% USE Bugzilla %]
<script type="text/javascript">
function turn_off(myself, id) {
var other_checkbox = document.getElementById(id);
......@@ -164,24 +163,21 @@
<input type="checkbox" name="defined_groups"
id="defined_group_[% group.group.id FILTER html %]"
value="[% group.group.name FILTER html %]"
[% IF Bugzilla.cgi.param("defined_groups").contains(group.group.name) %] checked="checked"[% END %]
[% IF cgi.param("defined_groups").contains(group.group.name) %] checked="checked"[% END %]
onchange="turn_off(this, 'group_[% group.group.id FILTER html %]')">
</td>
<td align="center">
<input type="checkbox" name="groups"
id="group_[% group.group.id FILTER html %]"
value="[% group.group.name FILTER html %]"
[% IF Bugzilla.cgi.param("groups").contains(group.group.name) %] checked="checked"[% END %]
[% IF cgi.param("groups").contains(group.group.name) %] checked="checked"[% END %]
onchange="turn_off(this, 'defined_group_[% group.group.id FILTER html %]')">
</td>
<td>
[% group.group.description FILTER html %]
</td>
</tr>
[% END %]
</table>
[% ELSE %]
[% FOREACH group = optional_groups %]
......
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