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/>.
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
25 * @uses collapse_api.php
26 * @uses config_api.php
27 * @uses constant_inc.php
30 * @uses helper_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
/>
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">
60 <td
class="form-title" colspan
="2">
62 collapse_icon( 'bugnote_add' );
63 echo lang_get( 'add_bugnote_title' ) ?
>
67 <td
class="category" width
="25%">
68 <?php
echo lang_get( 'bugnote' ) ?
>
71 <textarea name
="bugnote_text" cols
="80" rows
="10"></textarea
>
74 <?php
if ( access_has_bug_level( config_get( 'set_view_status_threshold' ), $f_bug_id ) ) { ?
>
77 <?php
echo lang_get( 'view_status' ) ?
>
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
); ?
> />
86 echo lang_get( 'private' );
88 echo get_enum_element( 'project_view_state', $t_default_bugnote_view_status );
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() ?
>>
99 <?php
echo lang_get( 'time_tracking' ) ?
> (HH
:MM
)
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' ) ?>";
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()" />
114 <input type
="text" name
="time_tracking" size
="5" value
="00:00" />
121 <?php
event_signal( 'EVENT_BUGNOTE_ADD_FORM', array( $f_bug_id ) ); ?
>
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();" />
130 collapse_closed( 'bugnote_add' );
132 <table
class="width100" cellspacing
="1">
134 <td
class="form-title" colspan
="2">
135 <?php
collapse_icon( 'bugnote_add' );
136 echo lang_get( 'add_bugnote_title' ) ?
>
141 collapse_end( 'bugnote_add' );
144 <?php
# Bugnote Add Form END ?>