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
21 * This file is part of GForge.
23 * GForge is free software; you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation; either version 2 of the License, or
26 * (at your option) any later version.
28 * GForge is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
33 * You should have received a copy of the GNU General Public License
34 * along with GForge; if not, write to the Free Software
35 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 require_once('../env.inc.php');
40 require_once $gfwww.'include/pre.php';
41 require_once $gfcommon.'include/license.php';
42 require_once $gfcommon.'scm/SCMFactory.class.php';
44 // Test if restricted project registration
46 if ($sys_project_reg_restricted) {
47 session_require(array('group'=>'1','admin_flags'=>'A'));
48 } elseif (!session_loggedin()) {
52 if (getStringFromRequest('submit')) {
53 if (!form_key_is_valid(getStringFromRequest('form_key'))) {
54 exit_form_double_submit();
57 $full_name = trim(getStringFromRequest('full_name'));
58 $purpose = trim(getStringFromRequest('purpose'));
59 $license = trim(getStringFromRequest('license'));
60 $license_other = trim(getStringFromRequest('license_other'));
61 $description = trim(getStringFromRequest('description'));
62 $unix_name = strtolower(getStringFromRequest('unix_name'));
63 $scm = getStringFromRequest('scm');
64 $is_public = getIntFromRequest('is_public');
67 if ($sys_use_scm && !$scm) {
68 form_release_key(getStringFromRequest("form_key"));
69 // $feedback .= _('Site has SCM enabled, but no SCM was chosen.');
71 $scm_host = $sys_cvs_host;
72 if ($sys_use_scm && $scm) {
73 $plugin = plugin_get_object($scm);
74 $scm_host = $plugin->getDefaultServer();
75 } else if ($sys_use_scm && isset($sys_cvs_host)) {
76 $scm_host = $sys_cvs_host;
82 $u =& session_get_user();
83 $res = $group->create(
95 if ($res && $sys_use_scm) {
96 $res = $group->setPluginUse($scm,true);
99 form_release_key(getStringFromRequest("form_key"));
100 $feedback .= $group->getErrorMessage();
102 $HTML->header(array('title'=>_('Registration complete')));
106 <p><?php printf(_('Your project has been submitted to the %1$s administrators. Within 72 hours, you will receive notification of their decision and further instructions.<p/>Thank you for choosing %1$s'), $GLOBALS['sys_name'])?>
111 $HTML->footer(array());
115 } else if (getStringFromRequest('i_disagree')) {
116 session_redirect("/");
128 site_header(array('title'=>_('Project Information')));
131 <p><?php echo _('To apply for project registration, you should fill in basic information about it. Please read descriptions below carefully and provide complete and comprehensive data. All fields below are mandatory.') ?>
134 <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
135 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>
136 <?php echo _('<h3>1. Project full name</h3>You should start with specifying the name of your project. The "Full Name" is descriptive, and has no arbitrary restrictions (except a 40 character limit).<p/>Full Name:<br/>') ?>
138 <input size="40" maxlength="40" type="text" name="full_name" value="<?php echo htmlspecialchars(stripslashes($full_name)); ?>"/>
140 <?php printf(_('<h3>2. Project Purpose And Summarization</h3><strong> Please provide detailed, accurate description of your project and what %1$s resources and in which way you plan to use. This description will be the basis for the approval or rejection of your project\'s hosting on %1$s, and later, to ensure that you are using the services in the intended way. This description will not be used as a public description of your project. It must be written in English.</strong>'), $GLOBALS['sys_name'])?>
142 <textarea name="purpose" cols="70" rows="10">
143 <?php echo htmlspecialchars(stripslashes($purpose)); ?>
146 <?php printf(_('<h3>3. License</h3>'), $GLOBALS['sys_name']) ?>
149 echo license_selectbox('license',$license);
151 <?php echo _('<p>If you selected "other", please provide an explanation along with a description of your license. Realize that other licenses may not be approved. Also, it may take additional time to make a decision for such project, since we will need to check that license is compatible with the OpenSource definition.</p>') ?>
153 <textarea name="license_other" cols="60" rows="5">
154 <?php echo htmlspecialchars(stripslashes($license_other)); ?>
157 <?php echo _('<h3>4. Project Public Description</h3><p>This is the description of your project which will be shown on the Project Summary page, in search results, etc. It should not be as comprehensive and formal as Project Purpose description (step 2), so feel free to use concise and catchy wording. Maximum length is 255 chars.</p>')?>
160 <textarea name="description" cols="70" rows="5">
161 <?php echo htmlspecialchars(stripslashes($description)); ?>
164 <?php printf(_('<h3>5. Project Unix Name</h3>In addition to full project name, you will need to choose short,"Unix" name for your project.<p/> The "Unix Name" has several restrictions because it is used in so many places around the site. They are:<ul><li>Cannot match the unix name of any other project</li><li>Must be between 3 and 15 characters in length</li><li>Must be in lower case</li><li>Can only contain characters, numbers, and dashes</li><li>Must be a valid unix username</li><li>Cannot match one of our reserved domains</li><li>Unix name will never change for this project</li></ul><p/>Your unix name is important, however, because it will be used for many things, including:<ul><li>A web site at <tt>unixname.%1$s</tt></li><li>A CVS Repository root of <tt>/cvsroot/unixname</tt> at <tt>cvs.unixname.%1$s</tt></li><li>Shell access to <tt>unixname.%1$s</tt></li><li>Search engines throughout the site</li></ul><p/>Unix Name:<br/>'), $GLOBALS['sys_default_domain']) ?>
166 <input type="text" maxlength="15" size="15" name="unix_name" value="<?php echo htmlspecialchars(stripslashes($unix_name)); ?>"/>
170 $SCMFactory=new SCMFactory();
171 $scm_plugins=$SCMFactory->getSCMs();
172 if (count($scm_plugins)!=0) {
173 if (count($scm_plugins)==1) {
174 printf(_('As there is only one SCM system, then this will be selected automatically. <strong>%1$s</strong> will be selected.'), $scm_plugins[0]).'<br /><br />';
175 echo '<input type="hidden" name="scm" value="'. $scm_plugins[0].'">';
177 echo _('<h3>6. SCM</h3><p>You can choose among different SCM for your project, but just one. Please select the SCM system you want to use.</p>')."\n";
178 echo '<table><tbody><tr><td><strong>'._('SCM Repository').':</strong></td>';
180 foreach($scm_plugins as $plugin) {
181 $myPlugin= plugin_get_object($plugin);
182 echo '<td><input type="radio" name="scm" ';
183 echo 'value="'.$myPlugin->name.'"';
184 if (isset($scm) && strcmp($scm, $myPlugin->name) == 0) {
185 echo ' checked="checked"';
186 } elseif (!isset($scm) && $checked) {
187 echo ' checked="checked"';
190 echo '>'.$myPlugin->text.'</td>';
192 echo '</tr></tbody></table>'."\n";
195 echo 'Error - Site has SCM but no plugins registered';
201 if ($sys_use_private_project) {
202 echo "<p><input type=\"radio\" name=\"is_public\" value=\"1\" ";
203 if (!isset($is_public) || $is_public) {
206 echo ">". _('Public')."</p>";
208 echo "<p><input type=\"radio\" name=\"is_public\" value=\"0\" ";
209 if (isset ($is_public) && !$is_public) {
212 echo ">". _('Private')."</p>";
214 echo "<input type=\"hidden\" name=\"is_public\" value=\"1\">";
219 <input type="submit" name="submit" value="<?php echo _('Submit') ?>"/> <input type="submit" name="i_disagree" value="<?php echo _('Cancel') ?>"/>
226 site_footer(array());