Fix #11417: Allow EVENT_MENU_MAIN plugin events to return null
[mantis/radio.git] / bugnote_add_inc.php
blobf45fc4f401228b240adb5fa4c232363bcc3db266
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 access_api.php
24 * @uses bug_api.php
25 * @uses collapse_api.php
26 * @uses config_api.php
27 * @uses constant_inc.php
28 * @uses event_api.php
29 * @uses form_api.php
30 * @uses helper_api.php
31 * @uses html_api.php
32 * @uses lang_api.php
35 require_api( 'access_api.php' );
36 require_api( 'bug_api.php' );
37 require_api( 'collapse_api.php' );
38 require_api( 'config_api.php' );
39 require_api( 'constant_inc.php' );
40 require_api( 'event_api.php' );
41 require_api( 'form_api.php' );
42 require_api( 'helper_api.php' );
43 require_api( 'html_api.php' );
44 require_api( 'lang_api.php' );
47 <?php if ( ( !bug_is_readonly( $f_bug_id ) ) &&
48 ( access_has_bug_level( config_get( 'add_bugnote_threshold' ), $f_bug_id ) ) ) { ?>
49 <?php # Bugnote Add Form BEGIN ?>
50 <a name="addbugnote"></a> <br />
52 <?php
53 collapse_open( 'bugnote_add' );
55 <form name="bugnoteadd" method="post" action="bugnote_add.php">
56 <?php echo form_security_field( 'bugnote_add' ) ?>
57 <input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
58 <table class="width100" cellspacing="1">
59 <tr>
60 <td class="form-title" colspan="2">
61 <?php
62 collapse_icon( 'bugnote_add' );
63 echo lang_get( 'add_bugnote_title' ) ?>
64 </td>
65 </tr>
66 <tr class="row-2">
67 <td class="category" width="25%">
68 <?php echo lang_get( 'bugnote' ) ?>
69 </td>
70 <td width="75%">
71 <textarea name="bugnote_text" cols="80" rows="10"></textarea>
72 </td>
73 </tr>
74 <?php if ( access_has_bug_level( config_get( 'set_view_status_threshold' ), $f_bug_id ) ) { ?>
75 <tr class="row-1">
76 <td class="category">
77 <?php echo lang_get( 'view_status' ) ?>
78 </td>
79 <td>
80 <?php
81 $t_default_bugnote_view_status = config_get( 'default_bugnote_view_status' );
82 if ( access_has_bug_level( config_get( 'set_view_status_threshold' ), $f_bug_id ) ) {
84 <input type="checkbox" name="private" <?php check_checked( $t_default_bugnote_view_status, VS_PRIVATE ); ?> />
85 <?php
86 echo lang_get( 'private' );
87 } else {
88 echo get_enum_element( 'project_view_state', $t_default_bugnote_view_status );
91 </td>
92 </tr>
93 <?php } ?>
95 <?php if ( config_get('time_tracking_enabled') ) { ?>
96 <?php if ( access_has_bug_level( config_get( 'time_tracking_edit_threshold' ), $f_bug_id ) ) { ?>
97 <tr <?php echo helper_alternate_class() ?>>
98 <td class="category">
99 <?php echo lang_get( 'time_tracking' ) ?> (HH:MM)
100 </td>
101 <td>
102 <?php if ( config_get( 'time_tracking_stopwatch' ) && config_get( 'use_javascript' ) ) { ?>
103 <script language="javascript">
104 var time_tracking_stopwatch_lang_start = "<?php echo lang_get( 'time_tracking_stopwatch_start' ) ?>";
105 var time_tracking_stopwatch_lang_stop = "<?php echo lang_get( 'time_tracking_stopwatch_stop' ) ?>";
106 </script>
107 <?php
108 html_javascript_link( 'time_tracking_stopwatch.js' );
110 <input type="text" name="time_tracking" size="5" value="00:00" />
111 <input type="button" name="time_tracking_ssbutton" value="<?php echo lang_get( 'time_tracking_stopwatch_start' ) ?>" onclick="time_tracking_swstartstop()" />
112 <input type="button" name="time_tracking_reset" value="<?php echo lang_get( 'time_tracking_stopwatch_reset' ) ?>" onclick="time_tracking_swreset()" />
113 <?php } else { ?>
114 <input type="text" name="time_tracking" size="5" value="00:00" />
115 <?php } ?>
116 </td>
117 </tr>
118 <?php } ?>
119 <?php } ?>
121 <?php event_signal( 'EVENT_BUGNOTE_ADD_FORM', array( $f_bug_id ) ); ?>
122 <tr>
123 <td class="center" colspan="2">
124 <input type="submit" class="button" value="<?php echo lang_get( 'add_bugnote_button' ) ?>" onclick="this.disabled=1;document.bugnoteadd.submit();" />
125 </td>
126 </tr>
127 </table>
128 </form>
129 <?php
130 collapse_closed( 'bugnote_add' );
132 <table class="width100" cellspacing="1">
133 <tr>
134 <td class="form-title" colspan="2">
135 <?php collapse_icon( 'bugnote_add' );
136 echo lang_get( 'add_bugnote_title' ) ?>
137 </td>
138 </tr>
139 </table>
140 <?php
141 collapse_end( 'bugnote_add' );
144 <?php # Bugnote Add Form END ?>
145 <?php