$incident_adv_details .= "<tr>";
$incident_adv_details .= $obj_table;
$incident_adv_details .= "<tr>";
$incident_adv_details .= "<td class='advanced_details_icons'>" . print_image('images/email.png', true) . "</td>";
$incident_adv_details .= "<td><table><tr><td>" . __("Notify changes by email") . ":</td><td align='right'><b>" . $email_notify_text . "</b></td></tr></table></td>";
$incident_adv_details .= "</tr>";
$incident_adv_details .= $email_table;
$incident_adv_details .= "</table>";
$left_side .= print_container('incident_adv_details', __('Advanced details'), $incident_adv_details);
if ($incident["id_incident_type"]) {
    $type_name = get_db_value("name", "tincident_type", "id", $incident["id_incident_type"]);
    $incident_custom_fields = "<table class='advanced_details_table alternate'>";
    $incident_custom_fields .= "<tr>";
    $incident_custom_fields .= "<td><table><tr><td><b>" . $type_name . "</b></td></tr></table></td>";
    $incident_custom_fields .= "</tr>";
    $fields = incidents_get_all_type_field($incident["id_incident_type"], $id);
    foreach ($fields as $f) {
        if ($f["type"] != "textarea") {
            $incident_custom_fields .= "<tr>";
            $incident_custom_fields .= "<td>";
            $incident_custom_fields .= "<table>";
            $incident_custom_fields .= "<tr>";
            $incident_custom_fields .= "<td>" . $f["label"] . ":</td><td align='right'><b>" . $f["data"] . "</b></td>";
            $incident_custom_fields .= "</tr>";
            $incident_custom_fields .= "</table>";
            $incident_custom_fields .= "</td>";
            $incident_custom_fields .= "</tr>";
        } else {
            $incident_custom_fields .= "<tr>";
            $incident_custom_fields .= "<td>";
            $incident_custom_fields .= "<table>";
Example #2
0
if (defined('AJAX')) {
    global $config;
    $show_type_fields = (bool) get_parameter('show_type_fields', 0);
    $get_data_child = (bool) get_parameter('get_data_child', 0);
    $upload_file = (bool) get_parameter('upload_file');
    $remove_tmp_file = (bool) get_parameter('remove_tmp_file');
    $get_owner = (bool) get_parameter('get_owner', 0);
    $get_owner = (bool) get_parameter('get_owner', 0);
    $reopen_ticket = (bool) get_parameter('reopen_ticket', 0);
    $get_initial_status = (bool) get_parameter('get_initial_status', 0);
    $get_allowed_status = (bool) get_parameter('get_allowed_status', 0);
    $get_allowed_resolution = (bool) get_parameter('get_allowed_resolution', 0);
    if ($show_type_fields) {
        $id_incident_type = get_parameter('id_incident_type');
        $id_incident = get_parameter('id_incident');
        $fields = incidents_get_all_type_field($id_incident_type, $id_incident);
        $blocked = get_db_value_filter('blocked', 'tincidencia', array('id_incidencia' => $id_incident));
        $fields_final = array();
        foreach ($fields as $f) {
            $f["data"] = safe_output($f["data"]);
            $f["blocked"] = $blocked;
            if ($f["type"] == "linked") {
                // Label parent
                $label_parent = get_db_value('label', 'tincident_type_field', 'id', $f['parent']);
                $f['label_parent'] = !empty($label_parent) ? $label_parent : '';
                $f['label_parent_enco'] = base64_encode($f['label_parent']);
                // Label childs
                if (empty($f['global_id'])) {
                    $filter = array('parent' => $f['id']);
                } else {
                    // Search for the childrem items created under the incident type
Example #3
0
 public function ajax($method = false)
 {
     $system = System::getInstance();
     if (!$this->permission) {
         return;
     } else {
         switch ($method) {
             case 'getIncidentTypeFields':
                 $id_incident_type = $system->getRequest('id_incident_type');
                 $id_incident = $system->getRequest('id_incident');
                 $fields = incidents_get_all_type_field($id_incident_type, $id_incident);
                 $fields_final = array();
                 foreach ($fields as $f) {
                     $f["data"] = safe_output($f["data"]);
                     array_push($fields_final, $f);
                 }
                 echo json_encode($fields_final);
                 return;
         }
     }
 }