Fix #11417: Allow EVENT_MENU_MAIN plugin events to return null
[mantis/radio.git] / manage_proj_create_page.php
blob57a8a34ea91d7049173005439e1ceb3c7156ca53
1 <?php
2 # MantisBT - A PHP based bugtracking system
4 # MantisBT is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
9 # MantisBT is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
17 /**
18 * @package MantisBT
19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
20 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
23 * @uses core.php
24 * @uses access_api.php
25 * @uses authentication_api.php
26 * @uses config_api.php
27 * @uses current_user_api.php
28 * @uses event_api.php
29 * @uses form_api.php
30 * @uses gpc_api.php
31 * @uses html_api.php
32 * @uses lang_api.php
33 * @uses print_api.php
36 require_once( 'core.php' );
37 require_api( 'access_api.php' );
38 require_api( 'authentication_api.php' );
39 require_api( 'config_api.php' );
40 require_api( 'current_user_api.php' );
41 require_api( 'event_api.php' );
42 require_api( 'form_api.php' );
43 require_api( 'gpc_api.php' );
44 require_api( 'html_api.php' );
45 require_api( 'lang_api.php' );
46 require_api( 'print_api.php' );
48 auth_reauthenticate();
50 access_ensure_global_level( config_get( 'create_project_threshold' ) );
52 html_page_top();
54 print_manage_menu( 'manage_proj_create_page.php' );
56 $f_parent_id = gpc_get( 'parent_id', null );
59 <br />
60 <div align="center">
61 <form method="post" action="manage_proj_create.php">
62 <?php
63 echo form_security_field( 'manage_proj_create' );
64 if ( null !== $f_parent_id ) {
65 $f_parent_id = (int) $f_parent_id;
67 <input type="hidden" name="parent_id" value="<?php echo $f_parent_id ?>">
68 <?php } ?>
69 <table class="width75" cellspacing="1">
70 <tr>
71 <td class="form-title" colspan="2">
72 <?php
73 if ( null !== $f_parent_id ) {
74 echo lang_get( 'add_subproject_title' );
75 } else {
76 echo lang_get( 'add_project_title' );
79 </td>
80 </tr>
81 <tr class="row-1">
82 <td class="category" width="25%">
83 <span class="required">*</span><?php echo lang_get( 'project_name' )?>
84 </td>
85 <td width="75%">
86 <input type="text" name="name" size="64" maxlength="128" />
87 </td>
88 </tr>
89 <tr class="row-2">
90 <td class="category">
91 <?php echo lang_get( 'status' ) ?>
92 </td>
93 <td>
94 <select name="status">
95 <?php print_enum_string_option_list( 'project_status' ) ?>
96 </select>
97 </td>
98 </tr>
99 <tr class="row-1">
100 <td class="category">
101 <?php echo lang_get( 'view_status' ) ?>
102 </td>
103 <td>
104 <select name="view_state">
105 <?php print_enum_string_option_list( 'view_state' ) ?>
106 </select>
107 </td>
108 </tr>
109 <tr class="row-2">
110 <td class="category">
111 <?php echo lang_get( 'inherit_global' ) ?>
112 </td>
113 <td>
114 <input type="checkbox" name="inherit_global" checked="checked" />
115 </td>
116 </tr>
117 <?php if ( !is_null( $f_parent_id ) ) { ?>
118 <tr class="row-1">
119 <td class="category">
120 <?php echo lang_get( 'inherit_parent' ) ?>
121 </td>
122 <td>
123 <input type="checkbox" name="inherit_parent" checked="checked" />
124 </td>
125 </tr>
126 <?php
129 if ( config_get( 'allow_file_upload' ) ) {
130 $t_default_upload_path = '';
131 # Don't reveal the absolute path to non-administrators for security reasons
132 if ( current_user_is_administrator() ) {
133 $t_default_upload_path = config_get( 'absolute_path_default_upload_folder' );
136 <tr class="row-2">
137 <td class="category">
138 <?php echo lang_get( 'upload_file_path' ) ?>
139 </td>
140 <td>
141 <input type="text" name="file_path" size="70" maxlength="250" value="<?php echo $t_default_upload_path ?>" />
142 </td>
143 </tr>
144 <?php
147 <tr class="row-1">
148 <td class="category">
149 <?php echo lang_get( 'description' ) ?>
150 </td>
151 <td>
152 <textarea name="description" cols="60" rows="5"></textarea>
153 </td>
154 </tr>
156 <?php event_signal( 'EVENT_MANAGE_PROJECT_CREATE_FORM' ) ?>
158 <tr>
159 <td class="center" colspan="2">
160 <input type="submit" class="button" value="<?php echo lang_get( 'add_project_button' ) ?>" />
161 </td>
162 </tr>
163 </table>
164 </form>
165 </div>
167 <?php
168 html_page_bottom();