本文整理汇总了PHP中Software::dropdown方法的典型用法代码示例。如果您正苦于以下问题:PHP Software::dropdown方法的具体用法?PHP Software::dropdown怎么用?PHP Software::dropdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Software
的用法示例。
在下文中一共展示了Software::dropdown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showAdditionalInformation
/**
* @param $info array
* @param $option array
**/
function showAdditionalInformation($info = array(), $option = array())
{
$name = "info[" . $option['linkfield'] . "]";
switch ($option['displaytype']) {
case 'computer':
Computer::dropdown(array('name' => $name, 'entity' => $_SESSION['glpiactive_entity'], 'entity_sons' => false));
break;
case 'software':
Software::dropdown(array('name' => $name, 'entity' => $_SESSION['glpiactive_entity'], 'entity_sons' => false));
break;
default:
break;
}
}
示例2: showForm
/**
* Print the Software form
*
* @param $ID integer ID of the item
* @param $options array of possible options:
* - target filename : where to go when done.
* - withtemplate boolean : template or basic item
*
*@return boolean item found
**/
function showForm($ID, $options = array())
{
$this->initForm($ID, $options);
$this->showTabs($options);
$this->showFormHeader($options);
$canedit = $this->can($ID, 'w');
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Name') . "</td>";
echo "<td>";
Html::autocompletionTextField($this, "name");
echo "</td>";
echo "<td>" . __('Publisher') . "</td><td>";
Manufacturer::dropdown(array('value' => $this->fields["manufacturers_id"]));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Location') . "</td><td>";
Location::dropdown(array('value' => $this->fields["locations_id"], 'entity' => $this->fields["entities_id"]));
echo "</td>";
echo "<td>" . __('Category') . "</td><td>";
SoftwareCategory::dropdown(array('value' => $this->fields["softwarecategories_id"]));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Technician in charge of the hardware') . "</td><td>";
User::dropdown(array('name' => 'users_id_tech', 'value' => $this->fields["users_id_tech"], 'right' => 'own_ticket', 'entity' => $this->fields["entities_id"]));
echo "</td>";
echo "<td>" . __('Associable to a ticket') . "</td><td>";
Dropdown::showYesNo('is_helpdesk_visible', $this->fields['is_helpdesk_visible']);
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Group in charge of the hardware') . "</td>";
echo "<td>";
Group::dropdown(array('name' => 'groups_id_tech', 'value' => $this->fields['groups_id_tech'], 'entity' => $this->fields['entities_id'], 'condition' => '`is_assign`'));
echo "</td>";
echo "<td rowspan='5' class='middle'>" . __('Comments') . "</td>";
echo "<td class='center middle' rowspan='5'>";
echo "<textarea cols='45' rows='8' name='comment' >" . $this->fields["comment"] . "</textarea>";
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td >" . __('User') . "</td>";
echo "<td >";
User::dropdown(array('value' => $this->fields["users_id"], 'entity' => $this->fields["entities_id"], 'right' => 'all'));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Group') . "</td><td>";
Group::dropdown(array('value' => $this->fields["groups_id"], 'entity' => $this->fields["entities_id"], 'condition' => '`is_itemgroup`'));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>";
if ((!isset($options['withtemplate']) || $options['withtemplate'] == 0) && !empty($this->fields['template_name'])) {
echo "<span class='small_space'>";
printf(__('Created from the template %s'), $this->fields['template_name']);
echo "</span>";
} else {
echo " ";
}
echo "</td><td>";
if (isset($options['withtemplate']) && $options['withtemplate']) {
//TRANS: %s is the datetime of insertion
printf(__('Created on %s'), Html::convDateTime($_SESSION["glpi_currenttime"]));
} else {
//TRANS: %s is the datetime of insertion
printf(__('Last update on %s'), Html::convDateTime($this->fields["date_mod"]));
}
echo "</td></tr>\n";
// UPDATE
echo "<tr class='tab_bg_1'>";
//TRANS: a noun, (ex : this software is an upgrade of..)
echo "<td>" . __('Upgrade') . "</td><td>";
Dropdown::showYesNo("is_update", $this->fields['is_update']);
echo " " . __('from') . " ";
Software::dropdown(array('value' => $this->fields["softwares_id"]));
echo "</td></tr>\n";
$this->showFormButtons($options);
$this->addDivForTabs();
return true;
}
示例3: showForm
/**
* Print the Software form
*
* @param $ID integer ID of the item
* @param $options array of possible options:
* - target filename : where to go when done.
* - withtemplate boolean : template or basic item
*
*@return boolean item found
**/
function showForm($ID, $options = array())
{
$this->initForm($ID, $options);
$this->showFormHeader($options);
$canedit = $this->canEdit($ID);
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Name') . "</td>";
echo "<td>";
Html::autocompletionTextField($this, "name");
echo "</td>";
echo "<td>" . __('Publisher') . "</td><td>";
Manufacturer::dropdown(array('value' => $this->fields["manufacturers_id"]));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Location') . "</td><td>";
Location::dropdown(array('value' => $this->fields["locations_id"], 'entity' => $this->fields["entities_id"]));
echo "</td>";
echo "<td>" . __('Category') . "</td><td>";
SoftwareCategory::dropdown(array('value' => $this->fields["softwarecategories_id"]));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Technician in charge of the hardware') . "</td><td>";
User::dropdown(array('name' => 'users_id_tech', 'value' => $this->fields["users_id_tech"], 'right' => 'own_ticket', 'entity' => $this->fields["entities_id"]));
echo "</td>";
echo "<td>" . __('Associable to a ticket') . "</td><td>";
Dropdown::showYesNo('is_helpdesk_visible', $this->fields['is_helpdesk_visible']);
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Group in charge of the hardware') . "</td>";
echo "<td>";
Group::dropdown(array('name' => 'groups_id_tech', 'value' => $this->fields['groups_id_tech'], 'entity' => $this->fields['entities_id'], 'condition' => '`is_assign`'));
echo "</td>";
echo "<td rowspan='4' class='middle'>" . __('Comments') . "</td>";
echo "<td class='center middle' rowspan='4'>";
echo "<textarea cols='45' rows='8' name='comment' >" . $this->fields["comment"] . "</textarea>";
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td >" . __('User') . "</td>";
echo "<td >";
User::dropdown(array('value' => $this->fields["users_id"], 'entity' => $this->fields["entities_id"], 'right' => 'all'));
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Group') . "</td><td>";
Group::dropdown(array('value' => $this->fields["groups_id"], 'entity' => $this->fields["entities_id"], 'condition' => '`is_itemgroup`'));
echo "</td></tr>\n";
// UPDATE
echo "<tr class='tab_bg_1'>";
//TRANS: a noun, (ex : this software is an upgrade of..)
echo "<td>" . __('Upgrade') . "</td><td>";
Dropdown::showYesNo("is_update", $this->fields['is_update']);
echo " " . __('from') . " ";
Software::dropdown(array('value' => $this->fields["softwares_id"]));
echo "</td></tr>\n";
$this->showFormButtons($options);
return true;
}