';
echo ''.__('Incident').' | ';
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_input_text ("titulo", $titulo,'', 70);
} else {
print_input_text_extended ("titulo", $titulo, "", "", 70, "", false, "", "readonly");
}
echo ' |
';
echo ''.__('Opened at').' | '.date ($config['date_format'], $inicio).' | ';
echo ''.__('Updated at').' | '.date ($config['date_format'], $actualizacion).' |
';
echo ''.__('Owner').' | ';
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_select (get_users_info (), "usuario_form", $usuario, '', 'SYSTEM', '', false, false, true, "w135");
} else {
print_select (get_users_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"])) {
print_select (get_incidents_status (), "estado_form", $estado, '', '', '', false, false, false, 'w135');
} else {
print_select (get_incidents_status (), "estado_form", $estado, '', '', '', false, false, false, 'w135', true);
}
echo ' |
';
echo ''.__('Source').' | ';
$fields = array ();
$return = get_db_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"])) {
print_select ($fields, "origen_form", $estado, '', '', '', false, false, false, 'w135');
} else {
print_select ($fields, "origen_form", $estado, '', '', '', false, false, false, 'w135', true);
}
echo ' | '.__('Group').' | ';
// Group combo
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_select_groups($config["id_user"], "IR", true, "grupo_form", $id_grupo, '', '', '', false, false, false, 'w135');
} else {
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"])) {
print_select (get_incidents_priorities (), "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135');
} else {
print_select (get_incidents_priorities (), "prioridad_form", $prioridad, '', '', '', false, false, false, 'w135', true);
}
echo ' | '.__('Creator').' | ';
if (empty ($id_creator)) {
echo 'SYSTEM';
} else {
echo $id_creator.' ('.dame_nombre_real ($id_creator).')';
}
echo ' |
';
if ((check_acl ($config["id_user"], $id_grupo, "IM") == 1) OR ($usuario == $config["id_user"])) {
print_textarea ("descripcion", 15, 80, $texto, 'style="height:200px;"');
} else {
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"]))) {
print_submit_button (__('Update incident'), "accion", false, 'class="sub upd"');
} elseif (check_acl ($config["id_user"], $id_grupo, "IW")) {
print_submit_button (__('Create'), "accion", false, 'class="sub wand"');
} else {
print_submit_button (__('Submit'), "accion", true, 'class="sub upd"');
}
echo "