Print the network name form
public showForm ( $ID, $options = [] ) : Nothing | ||
$ID | integer ID of the item | |
$options | array - target for the Form - withtemplate template or basic computer | |
return | Nothing | (display) |
// From NetworkPort or NetworkEquipement $nn->check($_POST['addressID'], 'w'); if (!empty($_POST['itemtype']) && !empty($_POST['items_id'])) { if ($node = getItemForItemtype($_POST['itemtype'])) { $node->check($_POST['items_id'], 'w'); } NetworkName::affectAddress($_POST['addressID'], $_POST['items_id'], $_POST['itemtype']); Event::log(0, "networkport", 5, "inventory", sprintf(__('%s associates a network name to an item'), $_SESSION["glpiname"])); Html::back(); } else { Html::displayNotFoundError(); } } else { if (!isset($_GET["id"])) { $_GET["id"] = ""; } if (empty($_GET["items_id"])) { $_GET["items_id"] = ""; } if (empty($_GET["itemtype"])) { $_GET["itemtype"] = ""; } Session::checkRight("internet", "w"); Html::header(NetworkName::getTypeName(2), $_SERVER['PHP_SELF'], 'config', 'dropdowns', 'NetworkName'); $nn->showForm($_GET["id"], $_GET); Html::footer(); } } } } }