/**
  * Show consumable request
  */
 function showConsumableRequest()
 {
     global $CFG_GLPI;
     if (!$this->canView()) {
         return false;
     }
     $request = new PluginConsumablesRequest();
     $request->getEmpty();
     // Wizard title
     echo "<form name='wizard_form' id='consumables_wizardForm' method='post'>";
     echo "<div class='consumables_wizard_title'><p>";
     echo "<img class='consumables_wizard_img' src='" . $CFG_GLPI['root_doc'] . "/plugins/consumables/pics/consumablerequest.png' alt='consumablerequest'/>&nbsp;";
     _e("Consumable request", "consumables");
     echo "</p></div>";
     // Add consumables request
     echo "<table class='tab_cadre_fixe consumables_wizard_rank'>";
     echo "<tr>";
     echo "<th colspan='4'>" . __("Consumable request", "consumables") . "</th>";
     echo "</tr>";
     echo "<tr>";
     echo "<td>" . __('Requester') . "</td>";
     echo "<td>";
     echo getUserName(Session::getLoginUserID());
     echo "</td>";
     echo "</tr>";
     echo "<tr>";
     echo "<td>" . _n('Consumable type', 'Consumable types', 1) . " <span class='red'>*</span></td>";
     echo "<td>";
     $rand = Dropdown::show("ConsumableItemType", array('entity' => $_SESSION['glpiactive_entity'], 'on_change' => 'loadAvailableConsumables(this);'));
     $script = "function loadAvailableConsumables(object){this.consumableTypeID = object.value; consumables_reloadAvailableConsumables();}";
     echo Html::scriptBlock($script);
     echo "</td>";
     echo "</tr>";
     echo "<tr>";
     echo "<td>" . _n('Consumable', 'Consumables', 1) . " <span class='red'>*</span></td>";
     echo "<td id='loadAvailableConsumables'>";
     $this->loadAvailableConsumables();
     echo "</td>";
     echo "</tr>";
     echo "<tr>";
     echo "<td>" . __('Number', 'consumables') . " <span class='red'>*</span></td>";
     echo "<td id='loadAvailableConsumablesNumber'>";
     $this->loadAvailableConsumablesNumber();
     echo "</td>";
     echo "</tr>";
     if (self::canRequestGroup() || self::canRequestUser()) {
         $itemtypes = array();
         if (self::canRequestGroup()) {
             $itemtypes[] = "Group";
         }
         if (self::canRequestUser()) {
             $itemtypes[] = "User";
         }
         echo "<tr>";
         echo "<td>" . __("Give to") . "</td>";
         echo "<td>";
         self::showSelectItemFromItemtypes(array('itemtype_name' => 'give_itemtype', 'items_id_name' => 'give_items_id', 'entity_restrict' => $_SESSION['glpiactive_entity'], 'itemtypes' => $itemtypes));
         echo "</td>";
         echo "</tr>";
     }
     if ($this->canCreate() && $this->canRequest()) {
         echo "<tr>";
         echo "<td class='center' colspan='4'>";
         echo "<input type=\"button\" class=\"submit\" name=\"addToCart\" onclick=\"consumables_addToCart('addToCart','consumables_wizardForm', 'consumables_cart');\" value=\"" . __('Add to cart', 'consumables') . "\">";
         echo "</td>";
         echo "</tr>";
     }
     echo "</table>";
     // Cart
     echo "<br><div class='center'>";
     echo "<table class='tab_cadre_fixe consumables_wizard_rank' id='consumables_cart' style='display:none'>";
     echo "<tr><th colspan='7'>" . __("Cart", "consumables") . "</th></tr>";
     echo "<tr>";
     echo "<th>" . __('Requester') . "</th>";
     echo "<th>" . _n('Consumable type', 'Consumable types', 1) . "</th>";
     echo "<th>" . _n('Consumable', 'Consumables', 1) . "</th>";
     echo "<th>" . __('Number', 'consumables') . "</th>";
     echo "<th>" . __("Give to") . "</th>";
     echo "<th></th>";
     echo "</tr>";
     echo "</table>";
     echo "</div>";
     // Footer
     if ($this->canCreate() && $this->canRequest()) {
         echo "<br/><table width='100%'>";
         echo "<tr>";
         echo "<td class='consumables_wizard_button'>";
         echo "<div id='dialog-confirm'></div>";
         echo "<input type=\"button\" class=\"submit consumable_next_button\" name=\"addConsumables\" value=\"" . _sx('button', 'Post') . "\" onclick=\"consumables_addConsumables('addConsumables','consumables_wizardForm');\">";
         echo "<input type=\"button\" class=\"consumable_previous_button submit\" name=\"previous\" value=\"" . _sx('button', 'Cancel') . "\" onclick=\"consumables_cancel('" . $CFG_GLPI['root_doc'] . "/plugins/consumables/front/wizard.php');\">";
         echo "</td>";
         echo "</tr>";
         echo "</table>";
     }
     // Init consumable cart javascript
     echo "<script type='text/javascript'>";
     echo "consumables_initJs('" . $CFG_GLPI['root_doc'] . "', 'dropdown_consumable_itemtypes_id{$rand}');";
     echo "</script>";
     Html::closeForm();
 }