diff options
author | jocuri%softhome.net <> | 2003-11-10 06:07:25 +0100 |
---|---|---|
committer | jocuri%softhome.net <> | 2003-11-10 06:07:25 +0100 |
commit | f8aa7c37e231bb36d36305696f7bd3794674b211 (patch) | |
tree | a909c11fbec60d15c18467454719cafa5ee60fce | |
parent | 5f61a3d84eef44c09244996a5787bfc24621f60c (diff) | |
download | bugzilla-f8aa7c37e231bb36d36305696f7bd3794674b211.tar.gz bugzilla-f8aa7c37e231bb36d36305696f7bd3794674b211.tar.xz |
Bug 207211: Editgroups.cgi - template for add a group page; r=myk; a=myk.
-rwxr-xr-x | editgroups.cgi | 51 | ||||
-rwxr-xr-x | template/en/default/admin/add-group.html.tmpl | 82 |
2 files changed, 89 insertions, 44 deletions
diff --git a/editgroups.cgi b/editgroups.cgi index e793f296a..937056512 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -21,6 +21,7 @@ # Contributor(s): Dave Miller <justdave@syndicomm.com> # Joel Peshkin <bugreport@peshkin.net> # Jacob Steenhagen <jake@bugzilla.org> +# Vlad Dascalu <jocuri@softhome.net> # Code derived from editowners.cgi and editusers.cgi @@ -30,6 +31,8 @@ use lib "."; use Bugzilla::Constants; require "CGI.pl"; +use vars qw($template $vars); + ConnectToDatabase(); confirm_login(); @@ -282,51 +285,11 @@ if ($action eq 'changeform') { # if ($action eq 'add') { - PutHeader("Add group"); - - print "<FORM METHOD=POST ACTION=editgroups.cgi>\n"; - print "<TABLE BORDER=1 CELLPADDING=4 CELLSPACING=0><TR>\n"; - print "<th>New Name</th>"; - print "<th>New Description</th>"; - print "<th>New User RegExp</th>"; - print "<th>Use For Bugs</th>"; - print "</tr><tr>"; - print "<td><input size=20 name=\"name\"></td>\n"; - print "<td><input size=40 name=\"desc\"></td>\n"; - print "<td><input size=30 name=\"regexp\"></td>\n"; - print "<td><input type=\"checkbox\" name=\"isactive\" value=\"1\" checked></td>\n"; - print "</TR></TABLE>\n<HR>\n"; - print "<input type=\"checkbox\" name=\"insertnew\" value=\"1\""; - print " checked" if Param("makeproductgroups"); - print ">\n"; - print "Insert new group into all existing products.<P>\n"; - print "<INPUT TYPE=SUBMIT VALUE=\"Add\">\n"; - print "<INPUT TYPE=HIDDEN NAME=\"action\" VALUE=\"new\">\n"; - print "</FORM>"; + print Bugzilla->cgi->header(); - print "<p>"; - print "<b>Name</b> is what is used with the UserInGroup() function in any -customized cgi files you write that use a given group. It can also be used by -people submitting bugs by email to limit a bug to a certain set of groups. It -may not contain any spaces.<p>"; - print "<b>Description</b> is what will be shown in the bug reports to -members of the group where they can choose whether the bug will be restricted -to others in the same group.<p>"; - print "The <b>Use For Bugs</b> flag determines whether or not the group is eligible to be used for bugs. -If you clear this, it will no longer be possible for users to add bugs -to this group, although bugs already in the group will remain in the group. -Doing so is a much less drastic way to stop a group from growing -than deleting the group would be. <b>Note: If you are creating a group, you -probably want it to be usable for bugs, in which case you should leave this checked.</b><p>"; - print "<b>User RegExp</b> is optional, and if filled in, will "; - print "automatically grant membership to this group to anyone with an "; - print "email address that matches this regular expression.<p>\n"; - print "By default, the new group will be associated with existing "; - print "products. Unchecking the \"Insert new group into all existing "; - print "products\" option will prevent this and make the group become "; - print "visible only when its controls have been added to a product.<P>\n"; - - PutTrailer("back to the <a href=\"editgroups.cgi\">group list</a>"); + $template->process("admin/add-group.html.tmpl", $vars) + || ThrowTemplateError($template->error()); + exit; } diff --git a/template/en/default/admin/add-group.html.tmpl b/template/en/default/admin/add-group.html.tmpl new file mode 100755 index 000000000..5adb53599 --- /dev/null +++ b/template/en/default/admin/add-group.html.tmpl @@ -0,0 +1,82 @@ +<!-- 1.0@bugzilla.org --> +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Dave Miller <justdave@syndicomm.com> + # Joel Peshkin <bugreport@peshkin.net> + # Jacob Steenhagen <jake@bugzilla.org> + # Vlad Dascalu <jocuri@softhome.net> + + #%] + +[% PROCESS global/header.html.tmpl + title = "Add group" + h2 = "This page allows you to define a new user group." +%] + +<form method="post" action="editgroups.cgi"> + <table border="1" cellpadding="4" cellspacing="0"><tr> + <th>New Name</th> + <th>New Description</th> + <th>New User RegExp</th> + <th>Use For [% terms.Bugs %]</th> + </tr><tr> + <td><input size="20" name="name"></td> + <td><input size="40" name="desc"></td> + <td><input size="30" name="regexp"></td> + <td><input type="checkbox" name="isactive" value="1" checked></td> + </tr></table><hr> + + <input type="checkbox" name="insertnew" value="1" + [% IF Param("makeproductgroups") %] checked[% END %]> + Insert new group into all existing products.<p> + <input type="submit" value="Add"> + <input type="hidden" name="action" value="new"> +</form> + +<p><b>Name</b> is what is used with the UserInGroup() function in any +customized cgi files you write that use a given group. It can also be used +by people submitting [% terms.bugs %] by email to limit a [% terms.bug %] to +a certain set of groups. It may not contain any spaces.</p> + +<p><b>Description</b> is what will be shown in the [% terms.bug %] reports +to members of the group where they can choose whether +the [% terms.bug %] will be restricted to others in the same group.</p> + +<p>The <b>Use For [% terms.Bugs %]</b> flag determines whether or not the +group is eligible to be used for [% terms.bugs %]. If you clear this, it will +no longer be possible for users to add [% terms.bugs %] to this group, +although [% terms.bugs %] already in the group will remain in the group. +Doing so is a much less drastic way to stop a group from growing +than deleting the group would be. <b>Note: If you are creating +a group, you probably want it to be usable for [% terms.bugs %], in which +case you should leave this checked.</b></p> + +<p><b>User RegExp</b> is optional, and if filled in, will +automatically grant membership to this group to anyone with an +email address that matches this regular expression.</p> + +<p>By default, the new group will be associated with existing +products. Unchecking the "Insert new group into all existing +products" option will prevent this and make the group become +visible only when its controls have been added to a product.</p> + +<p>Back to the <a href="./">main [% terms.bugs %] page</a> + +or to the <a href="editgroups.cgi">group list</a>. + +[% PROCESS global/footer.html.tmpl %] |