3 * Site Admin group properties editing page
5 * Copyright 1999-2001 (c) VA Linux Systems
7 * This file is part of GForge.
9 * GForge is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * GForge is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with GForge; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 require_once('../env.inc.php');
25 require_once $gfcommon.'include/pre.php';
26 require_once $gfwww.'admin/admin_utils.php';
27 require_once $gfwww.'project/admin/project_admin_utils.php';
29 session_require_global_perm ('forge_admin');
31 $group_id = getIntFromRequest('group_id');
32 $group =& group_get_object($group_id);
33 if (!$group || !is_object($group)) {
35 } elseif ($group->isError()) {
36 exit_error('Error',$group->getErrorMessage());
39 // This function performs very update
40 function do_update(&$group, $is_public, $status,
41 $group_type, $unix_box, $http_domain, $scm_box='') {
46 if (!$group->setStatus(session_get_user(), $status)) {
47 $feedback .= $group->getErrorMessage();
52 if (!$group->updateAdmin(session_get_user(), $is_public, $group_type, $unix_box, $http_domain)) {
53 $feedback .= $group->getErrorMessage();
58 if($group->usesSCM() && !$group->setSCMBox($scm_box)) {
59 $feedback .= $group->getErrorMessage();
65 $feedback .= _('Updated').'<br /> ';
71 if (getStringFromRequest('submit')) {
72 $form_public = getStringFromRequest('form_public');
73 $form_status = getStringFromRequest('form_status');
74 $form_box = getStringFromRequest('form_box');
75 $form_domain = getStringFromRequest('form_domain');
76 $form_scm_box = getStringFromRequest('form_scm_box');
78 do_update($group, $form_public, $form_status,
79 1, $form_box, $form_domain, $form_scm_box);
81 } else if (getStringFromRequest('resend')) {
83 $group->sendApprovalEmail();
84 $feedback .= _('Instruction email sent').'<br /> ';
88 site_admin_header(array('title'=>_('Site Admin: Group Info')));
90 echo '<h2>'.$group->getPublicName().'</h2>' ;?>
92 <h3><?php echo util_make_link("/project/admin/?group_id=$group_id", _('[Project Admin]')); ?></h3>
93 <h3><?php echo util_make_link("/admin/groupdelete.php?group_id=$group_id", _('Permanently Delete Project')); ?></h3>
95 <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
101 <?php echo _('Status') ?>
104 <?php // PLEASE DONT TRANSLATE THIS, THIS IS DATABASE INFO THAT CANT BE DIFFERENT AMONG LANGUAGES
105 $status = $group->getStatus();
107 // we cannot update the status of a pending project
108 echo '<input type="hidden" name="form_status" value="P" />';
109 echo _('Pending (P)').' ';
111 echo html_build_select_box_from_arrays(
124 'form_status', $status, false
131 <?php echo _('Public?') ?>:
134 <?php // PLEASE DONT TRANSLATE THIS, THIS IS DATABASE INFO THAT CANT BE DIFFERENT AMONG LANGUAGES
135 echo html_build_select_box_from_arrays(
144 'form_public', $group->isPublic(), false
151 <?php echo _('Unix Group Name:'); ?>
154 <?php echo $group->getUnixName(); ?>
160 if (forge_get_config('use_shell')) {
164 <?php echo _('Home Box:'); ?>
167 <input type="text" name="form_box" value="<?php echo $group->getUnixBox(); ?>" />
170 <?php } //end sus_use_shell condition ?>
174 <?php echo _('HTTP Domain:') ?>
177 <input size="40" type="text" name="form_domain" value="<?php echo $group->getDomain(); ?>" />
183 <?php echo _('Registration Application:'); ?>
186 <?php echo $group->getRegistrationPurpose(); ?>
190 if ($group->usesSCM()) {
193 <td><?php echo _('SCM Box:'); ?></td>
194 <td><input size="40" type="text" name="form_scm_box" value="<?php echo $group->getSCMBox(); ?>"/></td>
202 <input type="hidden" name="group_id" value="<?php print $group_id; ?>" />
204 <br /><input type="submit" name="submit" value="<?php echo _('Update'); ?>" />
205 <input type="submit" name="resend" value="<?php echo _('Resend New Project Instruction Email'); ?>" />
210 echo show_grouphistory($group->getID());
212 site_admin_footer(array());
216 // c-file-style: "bsd"