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 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
21 * @link http://www.mantisbt.org
24 * @uses access_api.php
25 * @uses authentication_api.php
27 * @uses columns_api.php
28 * @uses config_api.php
29 * @uses constant_inc.php
30 * @uses custom_field_api.php
35 * @uses helper_api.php
38 * @uses last_visited_api.php
39 * @uses prepare_api.php
41 * @uses project_api.php
42 * @uses string_api.php
44 * @uses version_api.php
50 require_once( 'core.php' );
51 require_api( 'access_api.php' );
52 require_api( 'authentication_api.php' );
53 require_api( 'bug_api.php' );
54 require_api( 'columns_api.php' );
55 require_api( 'config_api.php' );
56 require_api( 'constant_inc.php' );
57 require_api( 'custom_field_api.php' );
58 require_api( 'error_api.php' );
59 require_api( 'event_api.php' );
60 require_api( 'form_api.php' );
61 require_api( 'gpc_api.php' );
62 require_api( 'helper_api.php' );
63 require_api( 'html_api.php' );
64 require_api( 'lang_api.php' );
65 require_api( 'last_visited_api.php' );
66 require_api( 'prepare_api.php' );
67 require_api( 'print_api.php' );
68 require_api( 'project_api.php' );
69 require_api( 'string_api.php' );
70 require_api( 'user_api.php' );
71 require_api( 'version_api.php' );
73 require_css( 'status_config.php' );
75 $g_allow_browser_cache = 1;
77 $f_bug_id = gpc_get_int( 'bug_id' );
79 $tpl_bug = bug_get( $f_bug_id, true );
81 if ( $tpl_bug->project_id
!= helper_get_current_project() ) {
82 # in case the current project is not the same project of the bug we are viewing...
83 # ... override the current project. This to avoid problems with categories and handlers lists etc.
84 $g_project_override = $tpl_bug->project_id
;
85 $tpl_changed_project = true;
87 $tpl_changed_project = false;
90 if ( bug_is_readonly( $f_bug_id ) ) {
91 error_parameters( $f_bug_id );
92 trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED
, ERROR
);
95 access_ensure_bug_level( config_get( 'update_bug_threshold' ), $f_bug_id );
97 $t_fields = config_get( 'bug_update_page_fields' );
98 $t_fields = columns_filter_disabled( $t_fields );
100 $tpl_bug_id = $f_bug_id;
102 $t_action_button_position = config_get( 'action_button_position' );
104 $tpl_top_buttons_enabled = $t_action_button_position == POSITION_TOP ||
$t_action_button_position == POSITION_BOTH
;
105 $tpl_bottom_buttons_enabled = $t_action_button_position == POSITION_BOTTOM ||
$t_action_button_position == POSITION_BOTH
;
107 $tpl_show_id = in_array( 'id', $t_fields );
108 $tpl_show_project = in_array( 'project', $t_fields );
109 $tpl_show_category = in_array( 'category_id', $t_fields );
110 $tpl_show_view_state = in_array( 'view_state', $t_fields );
111 $tpl_view_state = $tpl_show_view_state ?
string_display_line( get_enum_element( 'view_state', $tpl_bug->view_state
) ) : '';
112 $tpl_show_date_submitted = in_array( 'date_submitted', $t_fields );
113 $tpl_show_last_updated = in_array( 'last_updated', $t_fields );
114 $tpl_show_reporter = in_array( 'reporter', $t_fields );
115 $tpl_show_handler = in_array( 'handler', $t_fields );
116 $tpl_show_priority = in_array( 'priority', $t_fields );
117 $tpl_show_severity = in_array( 'severity', $t_fields );
118 $tpl_show_reproducibility = in_array( 'reproducibility', $t_fields );
119 $tpl_show_status = in_array( 'status', $t_fields );
120 $tpl_show_resolution = in_array( 'resolution', $t_fields );
121 $tpl_show_projection = in_array( 'projection', $t_fields ) && config_get( 'enable_projection' ) == ON
;
122 $tpl_show_eta = in_array( 'eta', $t_fields ) && config_get( 'enable_eta' ) == ON
;
123 $t_show_profiles = config_get( 'enable_profiles' ) == ON
;
124 $tpl_show_platform = $t_show_profiles && in_array( 'platform', $t_fields );
125 $tpl_show_os = $t_show_profiles && in_array( 'os', $t_fields );
126 $tpl_show_os_version = $t_show_profiles && in_array( 'os_version', $t_fields );
127 $tpl_show_versions = version_should_show_product_version( $tpl_bug->project_id
);
128 $tpl_show_product_version = $tpl_show_versions && in_array( 'product_version', $t_fields );
129 $tpl_show_product_build = $tpl_show_versions && in_array( 'product_build', $t_fields ) && ( config_get( 'enable_product_build' ) == ON
);
130 $tpl_product_build_attribute = $tpl_show_product_build ?
string_attribute( $tpl_bug->build
) : '';
131 $tpl_show_target_version = $tpl_show_versions && in_array( 'target_version', $t_fields ) && access_has_bug_level( config_get( 'roadmap_update_threshold' ), $tpl_bug_id );
132 $tpl_show_fixed_in_version = $tpl_show_versions && in_array( 'fixed_in_version', $t_fields );
133 $tpl_show_due_date = in_array( 'due_date', $t_fields ) && access_has_bug_level( config_get( 'due_date_view_threshold' ), $tpl_bug_id );
134 $tpl_show_summary = in_array( 'summary', $t_fields );
135 $tpl_summary_attribute = $tpl_show_summary ?
string_attribute( $tpl_bug->summary
) : '';
136 $tpl_show_description = in_array( 'description', $t_fields );
137 $tpl_description_textarea = $tpl_show_description ?
string_textarea( $tpl_bug->description
) : '';
138 $tpl_show_additional_information = in_array( 'additional_info', $t_fields );
139 $tpl_additional_information_textarea = $tpl_show_additional_information ?
string_textarea( $tpl_bug->additional_information
) : '';
140 $tpl_show_steps_to_reproduce = in_array( 'steps_to_reproduce', $t_fields );
141 $tpl_steps_to_reproduce_textarea = $tpl_show_steps_to_reproduce ?
string_textarea( $tpl_bug->steps_to_reproduce
) : '';
142 $tpl_handler_name = string_display_line( user_get_name( $tpl_bug->handler_id
) );
144 $tpl_can_change_view_state = $tpl_show_view_state && access_has_project_level( config_get( 'change_view_status_threshold' ) );
146 if ( $tpl_show_product_version ) {
147 $tpl_product_version_released_mask = VERSION_RELEASED
;
149 if ( access_has_project_level( config_get( 'report_issues_for_unreleased_versions_threshold' ) ) ) {
150 $tpl_product_version_released_mask = VERSION_ALL
;
154 $tpl_formatted_bug_id = $tpl_show_id ?
bug_format_id( $f_bug_id ) : '';
155 $tpl_project_name = $tpl_show_project ?
string_display_line( project_get_name( $tpl_bug->project_id
) ) : '';
157 if ( $tpl_show_due_date ) {
158 require_js( 'jscalendar/calendar.js' );
159 require_js( 'jscalendar/lang/calendar-en.js' );
160 require_js( 'jscalendar/calendar-setup.js' );
161 require_css( 'calendar-blue.css' );
164 html_page_top( bug_format_summary( $f_bug_id, SUMMARY_CAPTION
) );
166 print_recently_visited();
169 echo '<form name="update_bug_form" method="post" action="bug_update.php">';
170 echo form_security_field( 'bug_update' );
171 echo '<table class="width100" cellspacing="1">';
173 echo '<td class="form-title" colspan="3">';
174 echo '<input type="hidden" name="bug_id" value="', $tpl_bug_id, '" />';
175 echo lang_get( 'updating_bug_advanced_title' );
176 echo '</td><td class="right" colspan="3">';
177 print_bracket_link( string_get_bug_view_url( $tpl_bug_id ), lang_get( 'back_to_bug_link' ) );
181 if ( $tpl_top_buttons_enabled ) {
182 echo '<tr><td class="center" colspan="6">';
183 echo '<input ', helper_get_tab_index(), ' type="submit" class="button" value="', lang_get( 'update_information_button' ), '" />';
188 event_signal( 'EVENT_UPDATE_BUG_FORM_TOP', array( $tpl_bug_id, true ) );
190 if ( $tpl_show_id ||
$tpl_show_project ||
$tpl_show_category ||
$tpl_show_view_state ||
$tpl_show_date_submitted |
$tpl_show_last_updated ) {
192 # Titles for Bug Id, Project Name, Category, View State, Date Submitted, Last Updated
196 echo '<td width="15%" class="category">', $tpl_show_id ?
lang_get( 'id' ) : '', '</td>';
197 echo '<td width="20%" class="category">', $tpl_show_project ?
lang_get( 'email_project' ) : '', '</td>';
198 echo '<td width="15%" class="category">', $tpl_show_category ?
'<label for="category_id">' . lang_get( 'category' ) . '</label>' : '', '</td>';
199 echo '<td width="20%" class="category">', $tpl_show_view_state ?
'<label for="view_state">' . lang_get( 'view_status' ) . '</label>' : '', '</td>';
200 echo '<td width="15%" class="category">', $tpl_show_date_submitted ?
lang_get( 'date_submitted' ) : '', '</td>';
201 echo '<td width="15%" class="category">', $tpl_show_last_updated ?
lang_get( 'last_update' ) : '', '</td>';
205 # Values for Bug Id, Project Name, Category, View State, Date Submitted, Last Updated
208 echo '<tr ', helper_alternate_class(), '>';
211 echo '<td>', $tpl_formatted_bug_id, '</td>';
214 echo '<td>', $tpl_project_name, '</td>';
219 if ( $tpl_show_category ) {
220 echo '<select ' . helper_get_tab_index() . ' id="category_id" name="category_id">';
221 print_category_option_list( $tpl_bug->category_id
, $tpl_bug->project_id
);
230 if ( $tpl_can_change_view_state ) {
231 echo '<select ' . helper_get_tab_index() . ' id="view_state" name="view_state">';
232 print_enum_string_option_list( 'view_state', $tpl_bug->view_state
);
234 } else if ( $tpl_show_view_state ) {
235 echo $tpl_view_state;
241 echo '<td>', $tpl_show_date_submitted ?
date( config_get( 'normal_date_format' ), $tpl_bug->date_submitted
) : '', '</td>';
244 echo '<td>', $tpl_show_last_updated ?
date( config_get( 'normal_date_format' ), $tpl_bug->last_updated
) : '', '</td>';
249 echo '<tr class="spacer"><td colspan="6"></td></tr>';
256 if ( $tpl_show_reporter ) {
257 echo '<tr ', helper_alternate_class(), '>';
261 if ( $tpl_show_reporter ) {
263 echo '<th class="category"><label for="reporter_id">' . lang_get( 'reporter' ) . '</label></th>';
266 echo '<select ' . helper_get_tab_index() . ' id="reporter_id" name="reporter_id">';
267 print_reporter_option_list( $tpl_bug->reporter_id
, $tpl_bug->project_id
);
276 echo '<td colspan="', $t_spacer, '"> </td>';
282 # Assigned To, Due Date
285 if ( $tpl_show_handler ||
$tpl_show_due_date ) {
286 echo '<tr ', helper_alternate_class(), '>';
291 echo '<th class="category"><label for="handler_id">' . lang_get( 'assigned_to' ) . '</label></th>';
294 if ( access_has_project_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ) ) ) {
295 echo '<select ' . helper_get_tab_index() . ' id="handler_id" name="handler_id">';
296 echo '<option value="0"></option>';
297 print_assign_to_option_list( $tpl_bug->handler_id
, $tpl_bug->project_id
);
300 echo $tpl_handler_name;
305 if ( $tpl_show_due_date ) {
307 echo '<th class="category"><label for="due_date">' . lang_get( 'due_date' ) . '</label></th>';
309 if ( bug_is_overdue( $tpl_bug_id ) ) {
310 echo '<td class="overdue">';
315 if ( access_has_bug_level( config_get( 'due_date_update_threshold' ), $tpl_bug_id ) ) {
316 $t_date_to_display = '';
318 if ( !date_is_null( $tpl_bug->due_date
) ) {
319 $t_date_to_display = date( config_get( 'calendar_date_format' ), $tpl_bug->due_date
);
321 echo "<input " . helper_get_tab_index() . " type=\"text\" id=\"due_date\" name=\"due_date\" class=\"datetime\" size=\"20\" maxlength=\"16\" value=\"" . $t_date_to_display . "\" />";
323 if ( !date_is_null( $tpl_bug->due_date
) ) {
324 echo date( config_get( 'short_date_format' ), $tpl_bug->due_date
);
334 echo '<td colspan="', $t_spacer, '"> </td>';
340 # Priority, Severity, Reproducibility
343 if ( $tpl_show_priority ||
$tpl_show_severity ||
$tpl_show_reproducibility ) {
344 echo '<tr ', helper_alternate_class(), '>';
348 if ( $tpl_show_priority ) {
350 echo '<th class="category"><label for="priority">' . lang_get( 'priority' ) . '</label></th>';
351 echo '<td><select ' . helper_get_tab_index() . ' id="priority" name="priority">';
352 print_enum_string_option_list( 'priority', $tpl_bug->priority
);
353 echo '</select></td>';
358 if ( $tpl_show_severity ) {
360 echo '<th class="category"><label for="severity">' . lang_get( 'severity' ) . '</label></th>';
361 echo '<td><select ' . helper_get_tab_index() . ' id="severity" name="severity">';
362 print_enum_string_option_list( 'severity', $tpl_bug->severity
);
363 echo '</select></td>';
368 if ( $tpl_show_reproducibility ) {
370 echo '<th class="category"><label for="reproducibility">' . lang_get( 'reproducibility' ) . '</label></th>';
371 echo '<td><select ' . helper_get_tab_index() . ' id="reproducibility" name="reproducibility">';
372 print_enum_string_option_list( 'reproducibility', $tpl_bug->reproducibility
);
373 echo '</select></td>';
379 if ( $t_spacer > 0 ) {
380 echo '<td colspan="', $t_spacer, '"> </td>';
390 if ( $tpl_show_status ||
$tpl_show_resolution ) {
391 echo '<tr ', helper_alternate_class(), '>';
395 if ( $tpl_show_status ) {
397 echo '<th class="category"><label for="status">' . lang_get( 'status' ) . '</label></th>';
399 # choose color based on status
400 $status_label = html_get_status_css_class( $tpl_bug->status
);
402 echo '<td class="' . $status_label . '">';
403 print_status_option_list( 'status', $tpl_bug->status
,
404 ( $tpl_bug->reporter_id
== auth_get_current_user_id() &&
405 ( ON
== config_get( 'allow_reporter_close' ) ) ), $tpl_bug->project_id
);
411 if ( $tpl_show_resolution ) {
413 echo '<th class="category"><label for="resolution">' . lang_get( 'resolution' ) . '</label></th>';
414 echo '<td><select ' . helper_get_tab_index() . ' id="resolution" name="resolution">';
415 print_enum_string_option_list( 'resolution', $tpl_bug->resolution
);
416 echo '</select></td>';
422 if ( $t_spacer > 0 ) {
423 echo '<td colspan="', $t_spacer, '"> </td>';
433 if ( $tpl_show_projection ||
$tpl_show_eta ) {
434 echo '<tr ', helper_alternate_class(), '>';
438 if ( $tpl_show_projection ) {
440 echo '<th class="category"><label for="projection">' . lang_get( 'projection' ) . '</label></th>';
441 echo '<td><select ' . helper_get_tab_index() . ' id="projection" name="projection">';
442 print_enum_string_option_list( 'projection', $tpl_bug->projection
);
443 echo '</select></td>';
449 if ( $tpl_show_eta ) {
450 echo '<th class="category"><label for="eta">' . lang_get( 'eta' ) . '</label></th>';
451 echo '<td><select ' . helper_get_tab_index() . ' id="eta" name="eta">';
452 print_enum_string_option_list( 'eta', $tpl_bug->eta
);
453 echo '</select></td>';
459 echo '<td colspan="', $t_spacer, '"> </td>';
465 # Platform, OS, OS Version
468 if ( $tpl_show_platform ||
$tpl_show_os ||
$tpl_show_os_version ) {
469 echo '<tr ', helper_alternate_class(), '>';
473 if ( $tpl_show_platform ) {
475 echo '<th class="category"><label for="platform">' . lang_get( 'platform' ) . '</label></th>';
478 if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF
) {
479 echo '<select ' . helper_get_tab_index() . ' id="platform" name="platform"><option value=""></option>';
480 print_platform_option_list( $tpl_bug->platform
);
483 echo '<input type="text" id="platform" name="platform" class="autocomplete" size="16" maxlength="32" tabindex="' . helper_get_tab_index_value() . '" value="' . string_attribute( $tpl_bug->platform
) . '" />';
491 if ( $tpl_show_os ) {
493 echo '<th class="category"><label for="os">' . lang_get( 'os' ) . '</label></th>';
496 if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF
) {
497 echo '<select ' . helper_get_tab_index() . ' id="os" name="os"><option value=""></option>';
498 print_os_option_list( $tpl_bug->os
);
501 echo '<input type="text" id="os" name="os" class="autocomplete" size="16" maxlength="32" tabindex="' . helper_get_tab_index_value() . '" value="' . string_attribute( $tpl_bug->os
) . '" />';
509 if ( $tpl_show_os_version ) {
511 echo '<th class="category"><label for="os_build">' . lang_get( 'os_version' ) . '</label></th>';
514 if ( config_get( 'allow_freetext_in_profile_fields' ) == OFF
) {
515 echo '<select ' . helper_get_tab_index() . ' id="os_build" name="os_build"><option value=""></option>';
516 print_os_build_option_list( $tpl_bug->os_build
);
519 echo '<input type="text" id="os_build" name="os_build" class="autocomplete" size="16" maxlength="16" tabindex="' . helper_get_tab_index_value() . '" value="' . string_attribute( $tpl_bug->os_build
) . '" />';
528 if ( $t_spacer > 0 ) {
529 echo '<td colspan="', $t_spacer, '"> </td>';
536 # Product Version, Product Build
539 if ( $tpl_show_product_version ||
$tpl_show_product_build ) {
540 echo '<tr ', helper_alternate_class(), '>';
544 # Product Version or Product Build, if version is suppressed
545 if ( $tpl_show_product_version ) {
546 echo '<th class="category"><label for="version">' . lang_get( 'product_version' ) . '</label></th>';
547 echo '<td>', '<select ', helper_get_tab_index(), ' id="version" name="version">';
548 print_version_option_list( $tpl_bug->version
, $tpl_bug->project_id
, $tpl_product_version_released_mask );
549 echo '</select></td>';
554 if ( $tpl_show_product_build ) {
555 echo '<th class="category"><label for="build">' . lang_get( 'product_build' ) . '</label></th>';
557 echo '<input type="text" id="build" name="build" size="16" maxlength="32" ' . helper_get_tab_index() . ' value="' . $tpl_product_build_attribute . '" />';
564 echo '<td colspan="', $t_spacer, '"> </td>';
570 # Target Version, Fixed in Version
573 if ( $tpl_show_target_version ||
$tpl_show_fixed_in_version ) {
574 echo '<tr ', helper_alternate_class(), '>';
579 if ( $tpl_show_target_version ) {
580 echo '<th class="category"><label for="target_version">' . lang_get( 'target_version' ) . '</label></th>';
581 echo '<td><select ' . helper_get_tab_index() . ' id="target_version" name="target_version">';
582 print_version_option_list( $tpl_bug->target_version
, $tpl_bug->project_id
, VERSION_ALL
);
583 echo '</select></td>';
589 if ( $tpl_show_fixed_in_version ) {
590 echo '<th class="category"><label for="fixed_in_version">' . lang_get( 'fixed_in_version' ) . '</label></th>';
592 echo '<select ' . helper_get_tab_index() . ' id="fixed_in_version" name="fixed_in_version">';
593 print_version_option_list( $tpl_bug->fixed_in_version
, $tpl_bug->project_id
, VERSION_ALL
);
601 echo '<td colspan="', $t_spacer, '"> </td>';
606 event_signal( 'EVENT_UPDATE_BUG_FORM', array( $tpl_bug_id, true ) );
609 echo '<tr class="spacer"><td colspan="6"></td></tr>';
612 if ( $tpl_show_summary ) {
613 echo '<tr ', helper_alternate_class(), '>';
614 echo '<th class="category"><label for="summary">' . lang_get( 'summary' ) . '</label></th>';
615 echo '<td colspan="5">', '<input ', helper_get_tab_index(), ' type="text" id="summary" name="summary" size="105" maxlength="128" value="', $tpl_summary_attribute, '" />';
620 if ( $tpl_show_description ) {
621 echo '<tr ', helper_alternate_class(), '>';
622 echo '<th class="category"><label for="description">' . lang_get( 'description' ) . '</label></th>';
623 echo '<td colspan="5">';
624 echo '<textarea ', helper_get_tab_index(), ' cols="80" rows="10" id="description" name="description">', $tpl_description_textarea, '</textarea>';
629 if ( $tpl_show_steps_to_reproduce ) {
630 echo '<tr ', helper_alternate_class(), '>';
631 echo '<th class="category"><label for="steps_to_reproduce">' . lang_get( 'steps_to_reproduce' ) . '</label></th>';
632 echo '<td colspan="5">';
633 echo '<textarea ', helper_get_tab_index(), ' cols="80" rows="10" id="steps_to_reproduce" name="steps_to_reproduce">', $tpl_steps_to_reproduce_textarea, '</textarea>';
637 # Additional Information
638 if ( $tpl_show_additional_information ) {
639 echo '<tr ', helper_alternate_class(), '>';
640 echo '<th class="category"><label for="additional_information">' . lang_get( 'additional_information' ) . '</label></th>';
641 echo '<td colspan="5">';
642 echo '<textarea ', helper_get_tab_index(), ' cols="80" rows="10" id="additional_information" name="additional_information">', $tpl_additional_information_textarea, '</textarea>';
646 echo '<tr class="spacer"><td colspan="6"></td></tr>';
649 $t_custom_fields_found = false;
650 $t_related_custom_field_ids = custom_field_get_linked_ids( $tpl_bug->project_id
);
652 foreach ( $t_related_custom_field_ids as $t_id ) {
653 $t_def = custom_field_get_definition( $t_id );
654 if ( ( $t_def['display_update'] ||
$t_def['require_update'] ) && custom_field_has_write_access( $t_id, $tpl_bug_id ) ) {
655 $t_custom_fields_found = true;
657 echo '<tr ', helper_alternate_class(), '>';
658 echo '<td class="category">';
659 if ( $t_def['require_update'] ) {
660 echo '<span class="required">*</span>';
662 if ( $t_def['type'] != CUSTOM_FIELD_TYPE_RADIO
&& $t_def['type'] != CUSTOM_FIELD_TYPE_CHECKBOX
) {
663 echo '<label for="custom_field_' . string_attribute( $t_def['id'] ) . '">' . string_display( lang_get_defaulted( $t_def['name'] ) ) . '</label>';
665 echo string_display( lang_get_defaulted( $t_def['name'] ) );
667 echo '</td><td colspan="5">';
668 print_custom_field_input( $t_def, $tpl_bug_id );
671 } # foreach( $t_related_custom_field_ids as $t_id )
673 if ( $t_custom_fields_found ) {
675 echo '<tr class="spacer"><td colspan="6"></td></tr>';
676 } # custom fields found
679 echo '<tr ', helper_alternate_class(), '>';
680 echo '<th class="category"><label for="bugnote_text">' . lang_get( 'add_bugnote_title' ) . '</label></th>';
681 echo '<td colspan="5"><textarea ', helper_get_tab_index(), ' id="bugnote_text" name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
683 # Bugnote Private Checkbox (if permitted)
684 if ( access_has_bug_level( config_get( 'private_bugnote_threshold' ), $tpl_bug_id ) ) {
685 echo '<tr ', helper_alternate_class(), '>';
686 echo '<th class="category">' . lang_get( 'private' ) . '</th>';
687 echo '<td colspan="5">';
689 $t_default_bugnote_view_status = config_get( 'default_bugnote_view_status' );
690 if ( access_has_bug_level( config_get( 'set_view_status_threshold' ), $tpl_bug_id ) ) {
691 echo '<input ', helper_get_tab_index(), ' type="checkbox" id="private" name="private" ', check_checked( config_get( 'default_bugnote_view_status' ), VS_PRIVATE
), ' />';
692 echo lang_get( 'private' );
694 echo get_enum_element( 'view_state', $t_default_bugnote_view_status );
700 # Time Tracking (if permitted)
701 if ( config_get('time_tracking_enabled') ) {
702 if ( access_has_bug_level( config_get( 'time_tracking_edit_threshold' ), $tpl_bug_id ) ) {
703 echo '<tr ', helper_alternate_class(), '>';
704 echo '<th class="category"><label for="time_tracking">' . lang_get( 'time_tracking' ) . ' (HH:MM)</label></th>';
705 echo '<td colspan="5"><input type="text" id="time_tracking" name="time_tracking" size="5" value="0:00" /></td></tr>';
709 event_signal( 'EVENT_BUGNOTE_ADD_FORM', array( $tpl_bug_id ) );
712 if ( $tpl_bottom_buttons_enabled ) {
713 echo '<tr><td class="center" colspan="6">';
714 echo '<input ', helper_get_tab_index(), ' type="submit" class="button" value="', lang_get( 'update_information_button' ), '" />';
718 echo '</table></form>';
720 define( 'BUGNOTE_VIEW_INC_ALLOW', true );
721 include( dirname( __FILE__
) . DIRECTORY_SEPARATOR
. 'bugnote_view_inc.php' );
724 last_visited_issue( $tpl_bug_id );