Fix #11417: Allow EVENT_MENU_MAIN plugin events to return null
[mantis/radio.git] / manage_proj_cat_edit_page.php
blob24021ec04b5ce2dfde259f1f862a38b5be12df15
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 category_api.php
27 * @uses config_api.php
28 * @uses form_api.php
29 * @uses gpc_api.php
30 * @uses helper_api.php
31 * @uses html_api.php
32 * @uses lang_api.php
33 * @uses print_api.php
34 * @uses string_api.php
37 require_once( 'core.php' );
38 require_api( 'access_api.php' );
39 require_api( 'authentication_api.php' );
40 require_api( 'category_api.php' );
41 require_api( 'config_api.php' );
42 require_api( 'form_api.php' );
43 require_api( 'gpc_api.php' );
44 require_api( 'helper_api.php' );
45 require_api( 'html_api.php' );
46 require_api( 'lang_api.php' );
47 require_api( 'print_api.php' );
48 require_api( 'string_api.php' );
50 auth_reauthenticate();
52 $f_category_id = gpc_get_int( 'id' );
53 $f_project_id = gpc_get_int( 'project_id' );
55 access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id );
57 $t_row = category_get_row( $f_category_id );
58 $t_assigned_to = $t_row['user_id'];
59 $t_project_id = $t_row['project_id'];
60 $t_name = $t_row['name'];
62 html_page_top();
64 print_manage_menu( 'manage_proj_cat_edit_page.php' );
67 <br />
68 <div align="center">
69 <form method="post" action="manage_proj_cat_update.php">
70 <?php echo form_security_field( 'manage_proj_cat_update' ) ?>
71 <input type="hidden" name="project_id" value="<?php echo $f_project_id ?>"/>
72 <table class="width50" cellspacing="1">
73 <tr>
74 <td class="form-title" colspan="2">
75 <?php echo lang_get( 'edit_project_category_title' ) ?>
76 </td>
77 </tr>
78 <tr <?php echo helper_alternate_class() ?>>
79 <td class="category">
80 <input type="hidden" name="category_id" value="<?php echo string_attribute( $f_category_id ) ?>" />
81 <?php echo lang_get( 'category' ) ?>
82 </td>
83 <td>
84 <input type="text" name="name" size="32" maxlength="128" value="<?php echo string_attribute( $t_name ) ?>" />
85 </td>
86 </tr>
87 <tr <?php echo helper_alternate_class() ?>>
88 <td class="category">
89 <?php echo lang_get( 'assigned_to' ) ?>
90 </td>
91 <td>
92 <select name="assigned_to">
93 <option value="0"></option>
94 <?php print_assign_to_option_list( $t_assigned_to, $t_project_id ) ?>
95 </select>
96 </td>
97 </tr>
98 <tr>
99 <td>
100 &nbsp;
101 </td>
102 <td>
103 <input type="submit" class="button" value="<?php echo lang_get( 'update_category_button' ) ?>" />
104 </td>
105 </tr>
106 </table>
107 </form>
108 </div>
110 <br />
112 <div class="border center">
113 <form method="post" action="manage_proj_cat_delete.php">
114 <?php echo form_security_field( 'manage_proj_cat_delete' ) ?>
115 <input type="hidden" name="category_id" value="<?php echo string_attribute( $f_category_id ) ?>" />
116 <input type="submit" class="button" value="<?php echo lang_get( 'delete_category_button' ) ?>" />
117 </form>
118 </div>
120 <?php
121 html_page_bottom();