4 * Project Registration: Project Information.
6 * This page is used to request data required for project registration:
7 * o Project Public Name
8 * o Project Registartion Purpose
10 * o Project Public Description
12 * All these data are more or less strictly validated.
14 * This is last page in registartion sequence. Its successful subsmission
15 * leads to creation of new group with Pending status, suitable for approval.
17 * Portions Copyright 1999-2001 (c) VA Linux Systems
18 * The rest Copyright 2002-2004 (c) GForge Team
23 * This file is part of GForge.
25 * GForge is free software; you can redistribute it and/or modify
26 * it under the terms of the GNU General Public License as published by
27 * the Free Software Foundation; either version 2 of the License, or
28 * (at your option) any later version.
30 * GForge is distributed in the hope that it will be useful,
31 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 * GNU General Public License for more details.
35 * You should have received a copy of the GNU General Public License
36 * along with GForge; if not, write to the Free Software
37 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
41 require_once('pre.php');
42 require_once('common/include/license.php');
43 require_once('common/scm/SCMFactory.class');
45 // Test if restricted project registration
47 if ($sys_project_reg_restricted) {
48 session_require(array('group'=>'1','admin_flags'=>'A'));
51 session_require(array('isloggedin'=>'1'));
54 $full_name = trim($full_name);
55 $purpose = trim($purpose);
56 $license_other = trim($license_other);
57 $description = trim($description);
58 $unix_name = strtolower($unix_name);
60 if ($sys_use_scm && !$scm) {
61 $feedback .= $Language->getText('register','scm_not_selected');
64 $u =& session_get_user();
65 $res = $group->create(
77 $res = $res && $group->setPluginUse($scm,true);
80 $feedback .= $group->getErrorMessage();
82 $HTML->header(array('title'=>$Language->getText('register','registration_complete'),'pagename'=>'register_complete'));
86 <p><?php echo $Language->getText('register','project_submitted',array($GLOBALS['sys_name']))?>
91 $HTML->footer(array());
95 } else if ($i_disagree) {
96 session_redirect("/");
99 site_header(array('title'=>$Language->getText('register','project_information'),'pagename'=>'register_projectinfo'));
102 <p><?php echo $Language->getText('register','apply_for_registration') ?>
105 <form action="<?php echo $PHP_SELF; ?>" method="post">
107 <?php echo $Language->getText('register','project_full_name') ?>
109 <input size="40" maxlength="40" type=text name="full_name" value="<?php echo stripslashes($full_name); ?>">
111 <?php echo $Language->getText('register','purpose_and_summarization', array($GLOBALS['sys_name']))?>
114 <textarea name="purpose" wrap="virtual" cols="70" rows="10">
115 <?php echo stripslashes($purpose); ?>
119 <?php echo $Language->getText('register','project_license', array($GLOBALS['sys_name'])) ?>
122 echo license_selectbox('license',$license);
125 <?php echo $Language->getText('register','other_license') ?>
127 <textarea name="license_other" wrap=virtual cols=60 rows=5>
128 <?php echo stripslashes($license_other); ?>
132 <?php echo $Language->getText('register','project_description')?>
135 <textarea name="description" wrap="virtual" cols="70" rows="5">
136 <?php echo stripslashes($description); ?>
140 <?php echo $Language->getText('register','project_unix_name',array($GLOBALS['sys_default_domain'])) ?>
142 <input type=text maxlength="15" SIZE="15" name="unix_name" value="<?php echo $unix_name; ?>">
145 $SCMFactory=new SCMFactory();
147 $scm_plugins=$SCMFactory->getSCMs();
148 if(count($scm_plugins)!=0) {
149 echo $Language->getText('register','choose_scm');
150 if(count($scm_plugins)==1) {
151 echo $Language->getText('register','one_scm',$scm_plugins[0]).'<br /><br />';
152 echo '<input type=\'hidden\' name=\'scm\' value=\''. $scm_plugins[0].'\'/>';
155 foreach($scm_plugins as $scm) {
156 $myPlugin= plugin_get_object($scm);
157 echo '<p><input type=\'radio\' name=\'scm\' ';
161 echo 'value='.$myPlugin->name;
162 echo '>'.$myPlugin->text.'</input></p>';
167 echo "Error - Site has SCM but no plugins registered";
175 <input type=submit name="submit" value="<?php echo $Language->getText('register','i_agree') ?>"> <input type=submit name="i_disagree" value="<?php echo $Language->getText('register','i_disagree') ?>">
182 site_footer(array());