';
echo '
'.__('Incident').' |
';
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR
($usuario == $config["id_user"])) {
html_print_input_text ("titulo", $titulo,'', 70);
}
else {
html_print_input_text_extended ("titulo", $titulo, "", "", 70, "", false, "", "readonly");
}
echo ' |
';
echo '
'.__('Opened at').' |
'.date ($config['date_format'], $inicio).' |
'.__('Updated at').' |
'.date ($config['date_format'], $actualizacion).' |
';
echo '
'.__('Owner').' |
';
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135");
}
else {
html_print_select (users_get_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135", true);
}
echo ' |
'.__('Status').' |
';
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
html_print_select (incidents_get_status (), "estado_form", $estado, '', '', '', false, false, false, 'w135');
}
else {
html_print_select (incidents_get_status (), "estado_form", $estado, '', '', '', false, false, false, 'w135', true);
}
echo ' |
';
echo '
'.__('Source').' |
';
$fields = array ();
$return = db_get_all_rows_sql ("SELECT origen FROM torigen ORDER BY origen");
if ($return === false)
$return[0] = $estado; //Something must be displayed
foreach ($return as $row) {
$fields[$row["origen"]] = $row["origen"];
}
// Only owner could change source or user with Incident management privileges
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
html_print_select ($fields, "origen_form", $origen, '', '', '', false, false, false, 'w135');
}
else {
html_print_select ($fields, "origen_form", $origen, '', '', '', false, false, false, 'w135', true);
}
echo ' | '.__('Group').' | ';
// Group combo
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, false, 'w135');
}
else {
html_print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, true, 'w135', true);
}
echo ' |
'.__('Priority').' | ';
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
html_print_select (incidents_get_priorities (), "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135');
}
else {
html_print_select (incidents_get_priorities (), "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135', true);
}
echo ' | '.__('Creator').' | ';
if (empty ($id_creator)) {
echo 'SYSTEM';
}
else {
echo $id_creator.' ('.get_user_fullname($id_creator).')';
}
$agents_incidents = agents_get_agents(false, array('id_agente', 'nombre'));
if ($agents_incidents === false) {
$agents_incidents = array();
}
foreach ($agents_incidents as $agent_incident) {
$result_agent_incidents[$agent_incident['id_agente']] = $agent_incident['nombre'];
}
echo ' | ';
echo '
';
echo '';
echo '' . __('Agent') . ' | ';
echo '';
$params = array();
$params['show_helptip'] = true;
$params['input_name'] = 'agent';
$params['value'] = agents_get_name ($id_agent);
$params['print_hidden_input_idagent'] = true;
$params['hidden_input_idagent_value'] = $id_agent;
$params['hidden_input_idagent_name'] = 'id_agent';
ui_print_agent_autocomplete_input($params);
echo ' | ';
echo '
';
//////////
echo '';
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
html_print_textarea ("descripcion", 15, 80, $texto, 'style="height:200px;"');
}
else {
html_print_textarea ("descripcion", 15, 80, $texto, 'style="height:200px;" disabled');
}
echo ' |
';
// Only if user is the used who opened incident or (s)he is admin
if (isset ($id_inc) AND ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"]))) {
html_print_submit_button (__('Update incident'), "accion", false, 'class="sub upd"');
}
elseif (check_acl ($config["id_user"], $id_grupo, "IW")) {
html_print_submit_button (__('Create'), "accion", false, 'class="sub wand"');
}
else {
html_print_submit_button (__('Submit'), "accion", true, 'class="sub upd"');
}
echo "