Fix #11417: Allow EVENT_MENU_MAIN plugin events to return null
[mantis/radio.git] / manage_proj_ver_edit_page.php
blobe589ec014ca786a0dc0263c856fa8d42e12f7d71
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 constant_inc.php
28 * @uses date_api.php
29 * @uses event_api.php
30 * @uses form_api.php
31 * @uses gpc_api.php
32 * @uses helper_api.php
33 * @uses html_api.php
34 * @uses lang_api.php
35 * @uses string_api.php
36 * @uses version_api.php
39 require_once( 'core.php' );
40 require_api( 'access_api.php' );
41 require_api( 'authentication_api.php' );
42 require_api( 'config_api.php' );
43 require_api( 'constant_inc.php' );
44 require_api( 'date_api.php' );
45 require_api( 'event_api.php' );
46 require_api( 'form_api.php' );
47 require_api( 'gpc_api.php' );
48 require_api( 'helper_api.php' );
49 require_api( 'html_api.php' );
50 require_api( 'lang_api.php' );
51 require_api( 'string_api.php' );
52 require_api( 'version_api.php' );
54 auth_reauthenticate();
56 $f_version_id = gpc_get_int( 'version_id' );
58 $t_version = version_get( $f_version_id );
60 access_ensure_project_level( config_get( 'manage_project_threshold' ), $t_version->project_id );
62 html_page_top();
64 print_manage_menu( 'manage_proj_ver_edit_page.php' );
66 <br />
67 <div align="center">
68 <form method="post" action="manage_proj_ver_update.php">
69 <?php echo form_security_field( 'manage_proj_ver_update' ) ?>
70 <input type="hidden" name="version_id" value="<?php echo string_attribute( $t_version->id ) ?>" />
71 <table class="width50" cellspacing="1">
72 <tr>
73 <td class="form-title" colspan="2">
74 <?php echo lang_get( 'edit_project_version_title' ) ?>
75 </td>
76 </tr>
77 <tr <?php echo helper_alternate_class() ?>>
78 <td class="category">
79 <?php echo lang_get( 'version' ) ?>
80 </td>
81 <td>
82 <input type="text" name="new_version" size="32" maxlength="64" value="<?php echo string_attribute( $t_version->version ) ?>" />
83 </td>
84 </tr>
85 <tr <?php echo helper_alternate_class() ?>>
86 <td class="category">
87 <?php echo lang_get( 'date_order' ) ?>
88 </td>
89 <td>
90 <input type="text" id="date_order" name="date_order" size="32" value="<?php echo (date_is_null( $t_version->date_order ) ? '' : string_attribute( date( config_get( 'calendar_date_format' ), $t_version->date_order ) ) ) ?>" />
91 <?php
92 date_print_calendar();
93 date_finish_calendar( 'date_order', 'trigger');
95 </td>
96 </tr>
97 <tr <?php echo helper_alternate_class() ?>>
98 <td class="category">
99 <?php echo lang_get( 'description' ) ?>
100 </td>
101 <td>
102 <textarea name="description" cols="60" rows="5"><?php echo string_attribute( $t_version->description ) ?></textarea>
103 </td>
104 </tr>
105 <tr <?php echo helper_alternate_class() ?>>
106 <td class="category">
107 <?php echo lang_get( 'released' ) ?>
108 </td>
109 <td>
110 <input type="checkbox" name="released" <?php check_checked( $t_version->released, VERSION_RELEASED ); ?> />
111 </td>
112 </tr>
113 <tr <?php echo helper_alternate_class() ?>>
114 <td class="category">
115 <?php echo lang_get( 'obsolete' ) ?>
116 </td>
117 <td>
118 <input type="checkbox" name="obsolete" <?php check_checked( $t_version->obsolete, true ); ?> />
119 </td>
120 </tr>
121 <?php event_signal( 'EVENT_MANAGE_VERSION_UPDATE_FORM', array( $t_version->id ) ); ?>
122 <tr>
123 <td>
124 &nbsp;
125 </td>
126 <td>
127 <input type="submit" class="button" value="<?php echo lang_get( 'update_version_button' ) ?>" />
128 </td>
129 </tr>
130 </table>
131 </form>
132 </div>
134 <br />
136 <div class="border center">
137 <form method="post" action="manage_proj_ver_delete.php">
138 <?php echo form_security_field( 'manage_proj_ver_delete' ) ?>
139 <input type="hidden" name="version_id" value="<?php echo string_attribute( $t_version->id ) ?>" />
140 <input type="submit" class="button" value="<?php echo lang_get( 'delete_version_button' ) ?>" />
141 </form>
142 </div>
144 <?php
145 html_page_bottom();