|
i make my work arrond! it's not beautiful but i can insert the reporter.
in the file bug_update_advanced_page.php
if ( $tpl_show_reporter ) {
echo '<tr ', helper_alternate_class(), '>';
$t_spacer = 4;
if ( $tpl_show_reporter ) {
# Reporter
echo '<td class="category">', lang_get( 'reporter' ), '</td>';
echo '<td>';
# my change
#if ( ON == config_get( 'use_javascript' ) ) {
# $t_username = prepare_user_name( $tpl_bug->reporter_id );
# echo ajax_click_to_edit( $t_username, 'reporter_id', 'entrypoint=issue_reporter_combobox&issue_id=' . $tpl_bug_id );
#} else {
echo '<select ', helper_get_tab_index(), ' name="reporter_id">';
print_reporter_option_list( $tpl_bug->reporter_id, $tpl_bug->project_id );
echo '</select>';
#}
echo '</td>';
} else {
$t_spacer += 2;
} |
|
In the fix above, every user will be able to change the reporter,
this is better if you want to set permission or not to edit the reporter :
if ( $tpl_show_reporter ) {
Reporter
echo '<td class="category">', lang_get( 'reporter' ), '</td>';
echo '<td>';
#if ( ON == config_get( 'use_javascript' ) ) {
# $t_username = prepare_user_name( $tpl_bug->reporter_id );
# echo ajax_click_to_edit( $t_username, 'reporter_id', 'entrypoint=issue_reporter_combobox&issue_id=' . $tpl_bug_id );
#} else {
$t_current_user_access_level = current_user_get_access_level();
if ( $t_current_user_access_level == (ADMINISTRATOR)XOR (MANAGER) XOR (DEVELOPER) ) {
echo '<select ', helper_get_tab_index(), ' name="reporter_id">';
print_reporter_option_list( $tpl_bug->reporter_id, $tpl_bug->project_id );
echo '</select>';
} else {
$t_username = prepare_user_name( $tpl_bug->reporter_id );
print ($t_username);
} |
|
thx for your sugestion. i prefer a version more similar to the original one:
#if ( ON == config_get( 'use_javascript' ) ) {
$t_current_user_access_level = current_user_get_access_level();
if ( $t_current_user_access_level != (ADMINISTRATOR)XOR (MANAGER) XOR (DEVELOPER) ) {
$t_username = prepare_user_name( $tpl_bug->reporter_id );
echo ajax_click_to_edit( $t_username, 'reporter_id', 'entrypoint=issue_reporter_combobox&issue_id=' . $tpl_bug_id );
#print ($t_username);
} else {
echo '<select ', helper_get_tab_index(), ' name="reporter_id">';
print_reporter_option_list( $tpl_bug->reporter_id, $tpl_bug->project_id );
echo '</select>';
} |