?> </th> <th><?php echo gettext("Custom"); ?> </th> <th><?php echo gettext("Actions"); ?> </th> </tr> <?php foreach ($inctype_list as $inctype) { $custom = preg_match("/custom/", $inctype->get_keywords()) ? "tick.png" : "cross.png"; $custom_fields = Incident_custom::get_custom_types($conn, $inctype->get_id()); $alt = preg_match("/custom/", $inctype->get_keywords()) ? implode(",", $custom_fields) : ""; $class = $i % 2 == 0 ? 'class="odd"' : 'class="even"'; $id = urlencode($inctype->get_id()); $tr_id = 'tr_' . $id; ?> <tr <?php echo $class; ?> id='<?php echo $tr_id; ?> '> <td id='loading_<?php
Util::print_succesful(_($var_tmp)); } } $inctype_id = GET('id'); ossim_valid($inctype_id, OSS_ALPHA, OSS_SPACE, OSS_PUNC, 'illegal:' . _("Incident type")); if (ossim_error()) { die(ossim_error()); } $db = new ossim_db(); $conn = $db->connect(); // $custom_fields = array(); if ($inctype_list = Incident_type::get_list($conn, "WHERE id = '{$inctype_id}'")) { $inctype = $inctype_list[0]; $custom = preg_match("/custom/", $inctype->get_keywords()) ? 1 : 0; $custom_fields = Incident_custom::get_custom_types($conn, $inctype_id); } ?> <form method="post" id="crt" action="modifyincidenttype.php"> <div id='info_error' class='ct_error'></div> <input type="hidden" id="modify" name="modify" value="modify"/> <input type="hidden" name="id" id='id_crt' value="<?php echo $inctype->get_id(); ?> " /> <input type="hidden" id="oldpos" name="oldpos" value="0"/> <input type="hidden" id="newpos" name="newpos" value="0"/>
<tr> <th class='thr'><?php echo _("Description"); ?> </th> <td class='left' style="border-width: 0px;"> <div class='wf3'><textarea name="description" rows="10" cols="80" wrap="hard"><?php echo $description; ?> </textarea></div> </td> </tr> <?php } elseif ($ref == "Custom") { $fields = Incident_custom::get_custom_types($conn, $type); $form_builder = new Form_builder(); $params = array(); $cont = 1; if (empty($fields)) { echo "<tr><td class='nobborder' colspan='2'>"; $error = new OssimNotice(); $info = array(_("You don't have added any custom types or your custom types have been deleted")); $error->display(_("DEFAULT"), $info, false); echo "</td></tr>"; } else { foreach ($fields as $field) { echo "<tr id='item_" . $cont . "'><th id='name_" . $cont . "' class='thr'><span>" . utf8_decode($field['name']) . "</span></th>"; echo "<td style='border-width: 0px;text-align:left'>"; $params = get_params_field($field, $map_key); $form_builder->set_attributes($params);