Make a select box for device type
static public dropdownUsedItemTypes ( $name, $itemtype_ref, $options = [] ) : nothing | ||
$name | name of the select box | |
$itemtype_ref | string itemtype reference where to search in itemtype field | |
$options | array of possible options: - may be value (default value) / field (used field to search itemtype) | |
return | nothing | (print out an HTML select box) |
break; } // Standard datatype usage if (!$display && isset($searchopt['datatype'])) { switch ($searchopt['datatype']) { case "bool": Dropdown::showYesNo($inputname, $_REQUEST['value']); $display = true; break; case "right": // No access not displayed because empty not take into account for search Profile::dropdownNoneReadWrite($inputname, $_REQUEST['value'], 1, 1, 1); $display = true; break; case "itemtypename": Dropdown::dropdownUsedItemTypes($inputname, getItemTypeForTable($searchopt['table']), array('value' => $_REQUEST['value'], 'comments' => 0)); $display = true; break; } } // Standard field usage if (!$display) { switch ($searchopt['field']) { case "name": case "completename": Dropdown::show(getItemTypeForTable($searchopt['table']), array('value' => $_REQUEST['value'], 'name' => $inputname, 'comments' => 0)); $display = true; break; } } }