/** * Print the consumable type form * * @param $ID integer ID of the item * @param $options array * - target filename : where to go when done. * - withtemplate boolean : template or basic item * * @return Nothing (display) * **/ function showForm($ID, $options = array()) { global $CFG_GLPI; $this->initForm($ID, $options); $this->showTabs($options); $this->showFormHeader($options); echo "<tr class='tab_bg_1'>"; echo "<td>" . __('Name') . "</td>"; echo "<td>"; Html::autocompletionTextField($this, "name"); echo "</td>"; echo "<td>" . __('Type') . "</td>"; echo "<td>"; ConsumableItemType::dropdown(array('value' => $this->fields["consumableitemtypes_id"])); echo "</td></tr>"; echo "<tr class='tab_bg_1'>"; echo "<td>" . __('Reference') . "</td>\n"; echo "<td>"; Html::autocompletionTextField($this, "ref"); echo "</td>"; echo "<td>" . __('Manufacturer') . "</td>"; echo "<td>"; Manufacturer::dropdown(array('value' => $this->fields["manufacturers_id"])); echo "</td></tr>\n"; echo "<tr class='tab_bg_1'>"; echo "<td>" . __('Technician in charge of the hardware') . "</td>"; echo "<td>"; User::dropdown(array('name' => 'users_id_tech', 'value' => $this->fields["users_id_tech"], 'right' => 'own_ticket', 'entity' => $this->fields["entities_id"])); echo "</td>"; echo "<td rowspan='4' class='middle'>" . __('Comments') . "</td>"; echo "<td class='middle' rowspan='4'>\n <textarea cols='45' rows='9' name='comment' >" . $this->fields["comment"] . "</textarea>"; echo "</td></tr>"; echo "<tr class='tab_bg_1'>"; echo "<td>" . __('Group in charge of the hardware') . "</td>"; echo "<td>"; Group::dropdown(array('name' => 'groups_id_tech', 'value' => $this->fields['groups_id_tech'], 'entity' => $this->fields['entities_id'], 'condition' => '`is_assign`')); echo "</td></tr>\n"; echo "<tr class='tab_bg_1'>"; echo "<td>" . __('Stock location') . "</td>"; echo "<td>"; Location::dropdown(array('value' => $this->fields["locations_id"], 'entity' => $this->fields["entities_id"])); echo "</td></tr>"; echo "<tr class='tab_bg_1'>"; echo "<td>" . __('Alert threshold') . "</td>"; echo "<td>"; Dropdown::showInteger('alarm_threshold', $this->fields["alarm_threshold"], 0, 100, 1, array('-1' => __('Never'))); Alert::displayLastAlert('ConsumableItem', $ID); echo "</td></tr>"; $this->showFormButtons($options); $this->addDivForTabs(); return true; }