Exemplo n.º 1
0
 function showForm($ID, $options = array())
 {
     global $CFG_GLPI, $LANG;
     if ($ID > 0) {
         $this->check($ID, 'r');
     } else {
         // Create item
         $this->check(-1, 'w');
     }
     $this->showTabs($options);
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_1'>";
     echo "<td>";
     echo __('Name');
     echo "&nbsp;:</td>";
     echo "<td>";
     echo '<input type="text" name="name" value="' . $this->fields["name"] . '" size="54"/>';
     echo "</td>";
     echo "</td><td>";
     echo __('Active');
     echo "&nbsp;:</td><td>";
     Dropdown::showYesNo("is_active", $this->fields["is_active"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>";
     echo __('Description');
     echo "&nbsp;:</td>";
     echo "<td>";
     echo "<textarea name='content' cols='55' rows='6'>";
     echo $this->fields["content"];
     echo "</textarea>";
     echo "</td></td>";
     echo "<td>";
     echo __('Select Language');
     echo "</td><td>";
     if ($this->fields["language"]) {
         Dropdown::showLanguages("language", array('value' => $this->fields["language"]));
     } else {
         Dropdown::showLanguages("language", array('value' => $_SESSION['glpilanguage']));
     }
     echo "</td></tr>";
     echo '<tr><td>' . $LANG['plugin_formcreator']["cat"][3] . '</td><td>';
     PluginFormcreatorCat::getSelectCat($ID, $this->fields["cat"]);
     echo '</td></tr>';
     $this->showFormButtons($options);
     $this->addDivForTabs();
 }