public function showGenerationForm($ID) { global $CFG_GLPI; echo "<form action='" . $CFG_GLPI["root_doc"] . "/plugins/order/front/export.php?id=" . $ID . "&display_type=" . Search::PDF_OUTPUT_LANDSCAPE . "' method=\"GET\" target='_blank'>"; echo "<div align=\"center\">"; echo "<table class='tab_cadre_fixe'>"; echo "<tr><th colspan='2'>" . __("Order Generation", "order") . "</th></tr>"; if (PluginOrderPreference::atLeastOneTemplateExists()) { if ($this->getState() > PluginOrderOrderState::DRAFT || $this->canGenerateWithoutValidation()) { $template = PluginOrderPreference::checkPreferenceTemplateValue(Session::getLoginUserID()); echo "<tr class='tab_bg_1'>"; echo "<td>" . __("Use this model", "order") . "</td>"; echo "<td>"; PluginOrderPreference::dropdownFileTemplates($template); echo "</td>"; echo "</tr>"; if (PluginOrderPreference::atLeastOneSignatureExists()) { echo "<tr class='tab_bg_1'>"; $signature = PluginOrderPreference::checkPreferenceSignatureValue(Session::getLoginUserID()); echo "<td class='center'>" . __("Use this sign", "order") . "</td>"; echo "<td class='center' >"; PluginOrderPreference::dropdownFileSignatures($signature); echo "</td>"; echo "</tr>"; } else { echo "<input type='hidden' name='sign' value='0'>"; } echo "<tr class='tab_bg_1'>"; echo "<td class='center' colspan='2'>"; echo "<input type='hidden' name='id' value='{$ID}'>"; echo "<input type='submit' value=\"" . __("Order Generation", "order") . "\" class='submit' >"; echo "</td>"; echo "</tr>"; } } else { echo "<tr class='tab_bg_1'>"; echo "<td class='center'>"; echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/preference.php?forcetab=order_1'>" . __("Thanks to select a model into your preferences", "order") . "</a>"; echo "</td>"; echo "</tr>"; } echo "</table>"; echo "</div>"; Html::closeForm(); }
Order plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GLPI; along with Order. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- @package order @author the order plugin team @copyright Copyright (c) 2010-2011 Order plugin team @license GPLv2+ http://www.gnu.org/licenses/gpl.txt @link https://forge.indepnet.net/projects/order @link http://www.glpi-project.org/ @since 2009 ---------------------------------------------------------------------- */ include "../../../inc/includes.php"; if (!isset($_GET["id"])) { $_GET["id"] = ""; } $PluginOrderPreference = new PluginOrderPreference(); if (isset($_POST["update"])) { $PluginOrderPreference->update($_POST); Html::redirect($_SERVER['HTTP_REFERER']); } else { Html::header(__("Orders management", "order"), '', "plugins", "order", "order"); $PluginOrderPreference->showForm("./preference.form.php", $_GET["id"]); Html::footer(); }