summaryrefslogtreecommitdiffstats
path: root/enter_bug.cgi
diff options
context:
space:
mode:
authorjustdave%syndicomm.com <>2001-06-27 10:44:32 +0200
committerjustdave%syndicomm.com <>2001-06-27 10:44:32 +0200
commit218999dc8b24961eb2f1e892d9eddb96d70a405f (patch)
tree0ca52ae6ef7b45d36d2d8024f396f1450c92c9c9 /enter_bug.cgi
parentb6622d0c8e5c133e84b1738f94d318816319dbc6 (diff)
downloadbugzilla-218999dc8b24961eb2f1e892d9eddb96d70a405f.tar.gz
bugzilla-218999dc8b24961eb2f1e892d9eddb96d70a405f.tar.xz
Fix for bug 80289: Group restrictions are now identified with checkboxes instead of select widgets. Also, product groups are now only offered if they are either already set, or match the current product (i.e. the option to set a product bit for a product other than the one the bug is in is no longer available) This results in much less clutter for the admin folks on sites with lots of products.
Patch by Joe Robbins <jmrobins@tgix.com> r= justdave@syndicomm.com
Diffstat (limited to 'enter_bug.cgi')
-rwxr-xr-xenter_bug.cgi43
1 files changed, 26 insertions, 17 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 62c7fc49c..c78628a6c 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -408,11 +408,21 @@ print "
";
if ($::usergroupset ne '0') {
- SendSQL("SELECT bit, description FROM groups " .
+ SendSQL("SELECT bit, name, description FROM groups " .
"WHERE bit & $::usergroupset != 0 " .
" AND isbuggroup != 0 AND isactive = 1 ORDER BY description");
- while (MoreSQLData()) {
- my ($bit, $description) = (FetchSQLData());
+ # We only print out a header bit for this section if there are any
+ # results.
+ if(MoreSQLData()) {
+ print "<br><b>Only users in the selected groups can view this bug:</b><br>\n";
+ print "<font size=\"-1\">(Leave all boxes unchecked to make this a public bug.)</font><br><br>\n";
+ }
+ while (MoreSQLData()) {
+ my ($bit, $prodname, $description) = (FetchSQLData());
+ # Don't want to include product groups other than this product.
+ unless(($prodname eq $product) || (!defined($::proddesc{$prodname}))) {
+ next;
+ }
# Rather than waste time with another Param check and another database
# access, $group_bit will only have a non-zero value if we're using
# bug groups and have one for this product, so I'll check on that
@@ -421,21 +431,20 @@ if ($::usergroupset ne '0') {
# select-box patch. Also, if $group_bit is 0, it won't match the
# current group, either, so I'll compare it to the current bit
# instead of checking for non-zero. -DDM, 3/11/00
- my $check = 0; # default selection
- if($group_bit == $bit) {
- # In addition, we need to handle the possibility that we're coming
- # from a bookmark template. We'll simply check if we've got a
- # parameter called bit-# passed. If so, then we're coming from a
- # template, and we'll use the template value.
- $check = formvalue("bit-$bit","1");
+ # Modifying this to use checkboxes instead of a select list.
+ # -JMR, 5/11/01
+ # If this is the group for this product, make it checked.
+ my $check = ($group_bit == $bit);
+ # If this is a bookmarked template, then we only want to set the bit
+ # for those bits set in the template.
+ if(formvalue("maketemplate","") eq "Remember values as bookmarkable template") {
+ $check = formvalue("bit-$bit",0);
}
- print BuildPulldown("bit-$bit",
- [["0",
- "People not in the \"$description\" group can see this bug"],
- ["1",
- "Only people in the \"$description\" group can see this bug"]],
- $check);
- print "<BR>\n";
+ my $checked = $check ? " CHECKED" : "";
+ # indent these a bit
+ print "&nbsp;&nbsp;&nbsp;&nbsp;";
+ print "<input type=checkbox name=\"bit-$bit\" value=1$checked>\n";
+ print "$description<br>\n";
}
}