Exemplo n.º 1
0
$table->data[0][2] .= print_select($types, 'id_incident_type', $id_incident_type, '', $select, '', true, 0, true, false, $disabled_itype);
$disabled = false;
if ($disabled) {
    $table->data[1][0] = print_label(__('Priority'), '', '', true, $priority);
} else {
    $table->data[1][0] = print_select(get_priorities(), 'priority_form', $priority, '', '', '', true, false, false, __('Priority'), $blocked_incident);
}
$table->data[1][0] .= ' ' . print_priority_flag_image($priority, true);
if (!$create_incident) {
    if ($incident["estado"] != STATUS_CLOSED) {
        $table->data[1][1] = "<div id='div_incident_resolution' style='display: none;'>";
    } else {
        $table->data[1][1] = "<div id='div_incident_resolution'>";
    }
    if ($has_im) {
        $table->data[1][1] .= combo_incident_resolution($resolution, $blocked_incident, true);
    } else {
        $table->data[1][1] .= print_label(__('Resolution'), '', '', true, render_resolution($resolution));
        $table->data[1][1] .= print_input_hidden('incident_resolution', $resolution, true);
    }
    $table->data[1][1] .= "</div>";
}
$table->data[1][2] = combo_incident_status($estado, $blocked_incident, 0, true, false, '', '', 0);
if ($incident["estado"] != STATUS_CLOSED) {
    $table->data[1][3] = "<div id='div_incident_block' style='display: none;'>";
} else {
    $table->data[1][3] = "<div id='div_incident_block'>";
}
$table->data[1][3] .= print_checkbox("blocked", 1, $blocked, true, __('Blocked'), $blocked_incident);
$table->data[1][3] .= "</div>";
//If IW creator enabled flag is enabled, the user can change the creator
         $params_assigned['input_name'] = 'owner_editor';
         $params_assigned['input_value'] = $owner;
         $params_assigned['title'] = __('Owner');
         $params_assigned['help_message'] = __("User assigned here is user that will be responsible to manage tickets. If you are opening a ticket and want to be resolved by someone different than yourself, please assign to other user");
         $params_assigned['return'] = true;
         $params_assigned['return_help'] = true;
         $ticket_editor .= user_print_autocomplete_input($params_assigned);
     } else {
         $ticket_editor .= print_label(__('Owner'), 'id_user', '', true, '<div id="plain-id_user">' . dame_nombre_real($owner) . '</div>');
     }
     $ticket_editor .= "</td>";
     $ticket_editor .= "</tr>";
     $ticket_editor .= "<tr>";
     $ticket_editor .= "<td>";
     if ($has_im) {
         $ticket_editor .= combo_incident_resolution($resolution, false, true, false, "");
     } else {
         $ticket_editor .= print_label(__('Resolution'), '', '', true, render_resolution($resolution));
     }
     $ticket_editor .= "</td>";
     $ticket_editor .= "<td>";
     $ticket_editor .= combo_incident_status($status, false, 0, true, false, "");
     $ticket_editor .= "</td>";
     $ticket_editor .= "<td>";
     $img = print_image("images/accept.png", true, array("title" => __("Update")));
     $ticket_editor .= "<a onfocus='JavaScript: this.blur()' href='javascript: setParams({$id});'>" . $img . "</a>";
     $ticket_editor .= "</td>";
     $ticket_editor .= "</tr>";
     $ticket_editor .= "</table>";
     $right_side .= print_container('ticket_editor', __('Quick edit'), $ticket_editor);
 }
Exemplo n.º 3
0
    $table->style[0] = '';
    print_table($table);
    print_table_pager();
    unset($table);
    $table->class = 'result_table listing';
    $table->width = '99%';
    $table->id = 'incident_massive';
    $table->style = array();
    $table->head[0] = print_label(__('Status'), '', '', true);
    $table->head[1] = print_label(__('Priority'), '', '', true);
    $table->head[2] = print_label(__('Resolution'), '', '', true);
    $table->head[3] = print_label(__('Assigned user'), '', '', true);
    echo '<br><h2>&nbsp;' . print_image('images/arrow_ele_blue.png', true) . ' ' . __('Massive operations over selected items') . '</h2>';
    $table->data[0][0] = combo_incident_status(-1, 0, 0, true, true);
    $table->data[0][1] = print_select(get_priorities(), 'mass_priority', -1, '', __('Select'), -1, true);
    $table->data[0][2] = combo_incident_resolution($resolution, $disabled, true, true);
    $table->data[0][3] = print_select_from_sql('SELECT id_usuario, nombre_real FROM tusuario;', 'mass_assigned_user', '0', '', __('Select'), -1, true);
    print_table($table);
    echo "<div style='width:" . $table->width . "'>";
    print_submit_button(__('Update selected items'), 'massive_update', false, 'class="sub next" style="float:right;');
    echo "</div>";
    /* End of first tab container */
    echo '</div>';
    echo '<div id="incident-stats" style="display">TODO STATS</div>';
}
//////
echo '</div>';
/* End of tabs code */
?>

<script type="text/javascript" src="include/js/jquery.ui.datepicker.js"></script>
//Store serialize filter
serialize_in_temp($filter, $config["id_user"]);
$resolution = 0;
$parent_name = 0;
$id_parent = 0;

$table = new StdClass();
$table->class = 'search-table-button';
$table->width = '100%';
$table->id = 'incident_massive';
$table->data = array();
$table->style = array ();

$table->data[0][0] = combo_incident_status (-1, 0, 0, true, true);
$table->data[0][1] = print_select (get_priorities (),'mass_priority', -1, '', __('Select'), -1, true, 0, true, __('Priority'), false, 'min-width: 70px;');
$table->data[0][2] = combo_incident_resolution ($resolution, false, true, true);
$table->data[0][3] = print_select_from_sql('SELECT id_usuario, nombre_real FROM tusuario;', 'mass_assigned_user', '0', '', __('Select'), -1, true, false, true, __('Owner'));

//Task
$table->data[1][0] = combo_task_user (0, $config["id_user"], 0, 0, true);
//Groups
$table->data[1][1] =  print_select_from_sql('SELECT id_grupo, nombre FROM tgrupo;', 'mass_groups', '0', '', __('Select'), -1, true, false, true, __('Groups'));

if ($has_im) {
	//Parent ticket
	$table->data[1][2] = print_input_text ('search_parent', $parent_name, '', 10, 100, true, __('Parent ticket'));
	$table->data[1][2] .= print_input_hidden ('id_parent', $id_parent, true);
	$table->data[1][2] .= print_image("images/cross.png", true, array("onclick" => "clean_parent_field()", "style" => "cursor: pointer"));
	//Delete tickets
	$table->data[1][3] = "<b>" . __("Delete all tickets") . "</b>";
	$table->data[1][3] .= print_image("images/cross.png", true, array("onclick" => "delete_massive_tickets()", "style" => "cursor: pointer"));
Exemplo n.º 5
0
	    echo "<tr><td colspan='3'>";
	    echo "<h2>" . __('Advanced custom search for projects and task') . "</h2>";
	    echo "</td></tr>";

	    echo "<tr class='hide_first_fields_formulary'><td>";
	    combo_project_user ($id_project, $config["id_user"], 0, false, true, $start_date, $end_date, $user_id);
	    
	    echo "<td>";
	    echo combo_task_user_participant_full_report ($config["id_user"], false, $id_task, true, __('Task'), false, true, false, '',
	     false, false, $start_date, $end_date, $user_id);

	    echo "<tr class='hide_second_fields_formulary'><td>";
	    echo print_select (get_user_groups (), 'search_id_group', $id_group, '', __('All'), 1, true, false, false, __('Group'));

	    echo "<td>";
	    echo combo_incident_resolution ($resolution, false, true);

	    echo "<td>";
	    echo print_select (get_user_groups (), 'id_group_creator', $id_group_creator, '', __('All'), 1, true, false, false, __('Creator group'));

	    echo "<tr class='hide_second_fields_formulary'><td>";
	    
	    $params_creator['input_id'] = 'text-user_id2';
		$params_creator['input_name'] = 'author';
		$params_creator["input_value"] = $author;
		$params_creator["title"] = __("Ticket creator");
		$params_creator['return'] = false;
		$params_creator['return_help'] = true;
		
		user_print_autocomplete_input($params_creator);