Example #1
0
    function reportBugFormTop($p_event, $p_project_id)
    {
        # allow to change reporter_id (if access level is higher than defined)
        $t_user_id = auth_get_current_user_id();
        $t_access_level = user_get_access_level($t_user_id, $p_project_id);
        if ($t_access_level >= plugin_config_get('select_threshold')) {
            ?>
		    
			<tr <?php 
            echo helper_alternate_class();
            ?>
>
				<td class="category" width="30%">
					<?php 
            echo lang_get('reporter');
            ?>
				</td>
				<td width="70%">
					<select <?php 
            echo helper_get_tab_index();
            ?>
 name="reporter_id">
						<?php 
            print_reporter_option_list($t_user_id, $p_project_id);
            ?>
					</select>
				</td>
			</tr>
<?php 
        }
    }
function xmlhttprequest_issue_reporter_combobox()
{
    $f_bug_id = gpc_get_int('issue_id');
    access_ensure_bug_level(config_get('update_bug_threshold'), $f_bug_id);
    $t_reporter_id = bug_get_field($f_bug_id, 'reporter_id');
    $t_project_id = bug_get_field($f_bug_id, 'project_id');
    echo '<select name="reporter_id">';
    print_reporter_option_list($t_reporter_id, $t_project_id);
    echo '</select>';
}
Example #3
0
/**
 * Print the user monitor field
 * @return void
 */
function print_filter_user_monitor()
{
    global $g_select_modifier, $g_filter;
    ?>
	<!-- Monitored by -->
		<select<?php 
    echo $g_select_modifier;
    ?>
 name="<?php 
    echo FILTER_PROPERTY_MONITOR_USER_ID;
    ?>
[]">
			<option value="<?php 
    echo META_FILTER_ANY;
    ?>
"<?php 
    check_selected($g_filter[FILTER_PROPERTY_MONITOR_USER_ID], META_FILTER_ANY);
    ?>
>[<?php 
    echo lang_get('any');
    ?>
]</option>
			<?php 
    if (access_has_project_level(config_get('monitor_bug_threshold'))) {
        echo '<option value="' . META_FILTER_MYSELF . '" ';
        check_selected($g_filter[FILTER_PROPERTY_MONITOR_USER_ID], META_FILTER_MYSELF);
        echo '>[' . lang_get('myself') . ']</option>';
    }
    $t_threshold = config_get('show_monitor_list_threshold');
    $t_has_project_level = access_has_project_level($t_threshold);
    if ($t_has_project_level) {
        print_reporter_option_list($g_filter[FILTER_PROPERTY_MONITOR_USER_ID]);
    }
    ?>
		</select>
		<?php 
}
Example #4
0
# Reporter
#
if ($t_show_reporter) {
    echo '<tr>';
    $t_spacer = 4;
    if ($t_show_reporter) {
        # Reporter
        echo '<th class="category"><label for="reporter_id">' . lang_get('reporter') . '</label></th>';
        echo '<td>';
        # Do not allow the bug's reporter to edit the Reporter field
        # when limit_reporters is ON
        if (ON == config_get('limit_reporters') && !access_has_project_level(REPORTER + 1, $t_bug->project_id)) {
            echo string_attribute(user_get_name($t_bug->reporter_id));
        } else {
            echo '<select ' . helper_get_tab_index() . ' id="reporter_id" name="reporter_id">';
            print_reporter_option_list($t_bug->reporter_id, $t_bug->project_id);
            echo '</select>';
        }
        echo '</td>';
    } else {
        $t_spacer += 2;
    }
    # spacer
    echo '<td colspan="', $t_spacer, '">&#160;</td>';
    echo '</tr>';
}
#
# Assigned To, Due Date
#
if ($t_show_handler || $t_show_due_date) {
    echo '<tr>';
Example #5
0
function print_filter_user_monitor()
{
    global $t_select_modifier, $t_filter;
    ?>
	<!-- Monitored by -->
		<select <?php 
    print $t_select_modifier;
    ?>
 name="user_monitor[]">
			<option value="<?php 
    echo META_FILTER_ANY;
    ?>
" <?php 
    check_selected($t_filter['user_monitor'], META_FILTER_ANY);
    ?>
>[<?php 
    echo lang_get('any');
    ?>
]</option>
			<?php 
    if (access_has_project_level(config_get('monitor_bug_threshold'))) {
        print '<option value="' . META_FILTER_MYSELF . '" ';
        check_selected($t_filter['user_monitor'], META_FILTER_MYSELF);
        print '>[' . lang_get('myself') . ']</option>';
    }
    ?>
			<?php 
    print_reporter_option_list($t_filter['user_monitor']);
    ?>
		</select>
		<?php 
}