本文整理汇总了PHP中Dropdown::showYesNo方法的典型用法代码示例。如果您正苦于以下问题:PHP Dropdown::showYesNo方法的具体用法?PHP Dropdown::showYesNo怎么用?PHP Dropdown::showYesNo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dropdown
的用法示例。
在下文中一共展示了Dropdown::showYesNo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
return;
$profile = new Profile();
$found_profiles = $profile->find("`interface` = 'central'");
$tab_profile = new self();
$found_tab_profiles = $tab_profile->find("`plugin_custom_tabs_id` = " . $item->getID());
echo "<form method='POST' action='tabprofile.form.php' />";
echo "<table class='tab_cadre_fixe'>";
echo "<tr><th colspan='4'>" . __("Visibility") . "</th></tr>";
$odd = 0;
foreach ($found_profiles as $profiles_id => $profile_fields) {
if ($odd % 2 === 0) {
echo "<tr>";
}
echo "<td>" . $profile_fields['name'] . "</td>";
echo "<td>";
Dropdown::showYesNo("tab_profile[{$profiles_id}]", 0);
echo "</td>";
if ($odd % 2 === 1) {
echo "</tr>";
}
$odd++;
}
if ($odd % 2 === 0) {
echo "</tr>";
}
echo "<tr><td colspan='4'><div class='center'>";
echo "<input type='submit' name='update' value=\"" . _sx('button', 'Post') . "\" class='submit'>";
echo "</div></td></tr>";
echo "</table>";
Html::closeForm();
return true;
}
示例2: showNewRuleForm
/**
* @see Rule::showNewRuleForm()
**/
function showNewRuleForm($ID)
{
echo "<form method='post' action='" . Toolbox::getItemTypeFormURL('Entity') . "'>";
echo "<table class='tab_cadre_fixe'>";
echo "<tr><th colspan='7'>" . __('Authorizations assignment rules') . "</th></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Name') . "</td><td>";
Html::autocompletionTextField($this, "name", array('value' => '', 'size' => 33));
echo '</td><td>' . __('Description') . "</td><td>";
Html::autocompletionTextField($this, "description", array('value' => '', 'size' => 33));
echo "</td><td>" . __('Logical operator') . "</td><td>";
$this->dropdownRulesMatch();
echo "</td><td rowspan='2' class='tab_bg_2 center middle'>";
echo "<input type=hidden name='sub_type' value='" . get_class($this) . "'>";
echo "<input type=hidden name='entities_id' value='-1'>";
echo "<input type=hidden name='affectentity' value='{$ID}'>";
echo "<input type=hidden name='_method' value='AddRule'>";
echo "<input type='submit' name='execute' value=\"" . _sx('button', 'Add') . "\" class='submit'>";
echo "</td></tr>\n";
echo "<tr class='tab_bg_1'>";
echo "<td class='center'>" . _n('Profile', 'Profiles', 1) . "</td><td>";
Profile::dropdown();
echo "</td><td><span class='small_space'>" . __('Recursive') . "</span></td><td colspan='3'>";
Dropdown::showYesNo("is_recursive", 0);
echo "</td></tr>\n";
echo "</table>";
Html::closeForm();
}
示例3: showForm
function showForm($ID, $options = array())
{
global $DB;
$target = $this->getFormURL();
if (isset($options['target'])) {
$target = $options['target'];
}
if ($ID > 0) {
$this->check($ID, 'r');
} else {
$this->check(-1, 'w');
$this->getEmpty();
}
$canedit = $this->can($ID, 'w');
echo "<form action='" . $target . "' method='post'>";
echo "<table class='tab_cadre_fixe'>";
echo "<tr><th colspan='2' class='center b'>" . sprintf(__('%1$s - %2$s'), __('Print to pdf', 'pdf'), $this->fields["profile"]);
echo "</th></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Print to pdf', 'pdf') . "</td><td>";
Dropdown::showYesNo("use", isset($this->fields["use"]) ? $this->fields["use"] : '');
echo "</td></tr>\n";
if ($canedit) {
echo "<tr class='tab_bg_1'>";
echo "<td colspan='2' class='center'>";
echo "<input type='hidden' name='id' value={$ID}>";
echo "<input type='submit' name='update_user_profile' value='" . _sx('button', 'Update') . "' class='submit'> ";
echo "</td></tr>\n";
}
echo "</table>";
Html::closeForm();
}
示例4: plugin_barcode_MassiveActionsDisplay
function plugin_barcode_MassiveActionsDisplay($options = array())
{
switch ($options['itemtype']) {
case 'Computer':
case 'Monitor':
case 'Networking':
case 'Printer':
case 'Peripheral':
switch ($options['action']) {
case "plugin_barcode_barcode":
$barcode = new PluginBarcodeBarcode();
$barcode->showFormMassiveAction();
break;
case "plugin_barcode_qrcode":
$pbQRcode = new PluginBarcodeQRcode();
$pbQRcode->showFormMassiveAction();
break;
}
break;
case 'Profile':
switch ($options['action']) {
case "plugin_barcode_allow":
Dropdown::showYesNo('generate');
Dropdown::showYesNo('config');
echo "<input type='submit' name='massiveaction' class='submit' value='" . __('Save') . "'>";
break;
}
break;
}
return "";
}
示例5: showconfigForm
function showconfigForm()
{
global $CFG_GLPI;
echo "<form name='form' method='post' action='" . $CFG_GLPI["root_doc"] . "/plugins/immobilizationsheets/front/config.form.php'>";
echo "<div align=\"center\">";
echo "<table class=\"tab_cadre_fixe\" cellspacing=\"2\" cellpadding=\"2\">";
echo "<tr><th colspan=\"2\">" . __('Options', 'immobilizationsheets') . "</th></tr>";
echo "<tr class='tab_bg_1 top'>";
echo "<td>" . __('Save sheets in GLPI', 'immobilizationsheets') . ": </td>";
echo "<td>";
Dropdown::showYesNo("use_backup", $this->fields["use_backup"]);
echo "</td>";
echo "<tr class='tab_bg_1 top'><td>";
echo __('Default Heading for sheets', 'immobilizationsheets') . ": </td>";
echo "<td>";
Dropdown::show('DocumentCategory', array('name' => "documentcategories_id", 'value' => $this->fields["documentcategories_id"]));
echo "</td>";
echo "<tr><th colspan='2'>";
echo "<input type='hidden' name='id' value='1'>";
echo "<input type=\"submit\" name=\"update_config\" class=\"submit\" value=\"" . __s('Post') . "\" >";
echo "</th></tr>";
echo "</table></div>";
Html::closeForm();
echo "<br>";
}
示例6: showForm
/**
* Configuration form
**/
function showForm($id, $options = array())
{
$target = $this->getFormURL();
if (isset($options['target'])) {
$target = $options['target'];
}
if (!Session::haveRight("profile", "r")) {
return false;
}
$canedit = Session::haveRight("profile", "w");
$prof = new Profile();
if ($id) {
$this->getFromDB($id);
$prof->getFromDB($id);
}
echo "<form action='" . $target . "' method='post'>";
echo "<table class='tab_cadre_fixe'>";
echo "<tr><th colspan='2' class='center b'>" . sprintf(_('%1$s %2$s'), 'gestion Vip :', Dropdown::getDropdownName("glpi_groups", $this->fields["id"]));
echo "</th></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>Groupe Vip</td><td>";
Dropdown::showYesNo("isvip", $this->fields["isvip"]);
echo "</td></tr>";
if ($canedit) {
echo "<tr class='tab_bg_2'>";
echo "<td class='center' colspan='2'>";
echo "<input type='hidden' name='id' value={$id}>";
echo "<input type='submit' name='update_vip_group' value='Mettre à jour' class='submit'>";
echo "</td></tr>";
}
echo "</table>";
Html::closeForm();
}
示例7: showForm
function showForm($id, $options = array())
{
if (!$this->can($id, READ)) {
return false;
}
$this->showFormHeader($options);
echo "<tr>";
echo "<td><label>" . __('Name') . " :</label></td>";
echo "<td style='width:30%'>";
echo Html::autocompletionTextField($this, "name");
echo "</td>";
$rand = mt_rand();
echo "<td><label for='dropdown_is_active{$rand}'>" . __('Active') . " :</label></td>";
echo "<td style='width:30%'>";
Dropdown::showYesNo('is_active', $this->fields['is_active'], -1, array('rand' => $rand));
echo "</td></tr>";
$rand = mt_rand();
echo "<tr>";
echo "<td><label for='dropdown_itilcategories_id{$rand}'>" . __('Category') . " :</label></td>";
echo "<td>";
Dropdown::show('ITILCategory', array('value' => $this->fields['itilcategories_id'], 'rand' => $rand));
echo "</td><td colspan='2'></td></tr>";
$rand = mt_rand();
echo "<tr>";
echo "<td><label for='dropdown_is_incident{$rand}'>" . __('Visible for an incident') . " :</label></td>";
echo "<td>";
Dropdown::showYesNo('is_incident', $this->fields['is_incident'], -1, array('rand' => $rand));
echo "</td>";
$rand = mt_rand();
echo "<td><label for='dropdown_is_request{$rand}'>" . __('Visible for a request') . " :</label></td>";
echo "<td>";
Dropdown::showYesNo('is_request', $this->fields['is_request'], -1, array('rand' => $rand));
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td><label for='comment'>" . __('Comments') . " : </label></td>";
echo "<td align='left'>";
echo "<textarea name='comment' id='comment' style='width:100%; height:70px;'>";
echo $this->fields["comment"] . "</textarea>";
echo "</td></tr>";
echo "<tr><td colspan='4'><hr></td></tr>";
echo "<tr><td><label for='groups_id_level1[]'>" . ucfirst(__('Level 1', 'itilcategorygroups')) . " :</label></td>";
echo "<td>";
self::multipleDropdownGroup(1, $this->fields['itilcategories_id'], $this->fields['view_all_lvl1']);
echo "</td>";
echo "<td><label for='groups_id_level2[]'>" . ucfirst(__('Level 2', 'itilcategorygroups')) . " :</label></td>";
echo "<td>";
self::multipleDropdownGroup(2, $this->fields['itilcategories_id'], $this->fields['view_all_lvl2']);
echo "</td></tr>";
echo "<tr><td><label for='groups_id_level3[]'>" . ucfirst(__('Level 3', 'itilcategorygroups')) . " :</label></td>";
echo "<td>";
self::multipleDropdownGroup(3, $this->fields['itilcategories_id'], $this->fields['view_all_lvl3']);
echo "</td>";
echo "<td><label for='groups_id_level4[]'>" . ucfirst(__('Level 4', 'itilcategorygroups')) . " :</label></td>";
echo "<td>";
self::multipleDropdownGroup(4, $this->fields['itilcategories_id'], $this->fields['view_all_lvl4']);
echo "</td></tr>";
$this->showFormButtons($options);
Html::closeForm();
}
示例8: showForm
function showForm($ID, $options = array())
{
global $LANG;
$target = $this->getFormURL();
if (isset($options['target'])) {
$target = $options['target'];
}
if (!Session::haveRight("profile", "r")) {
return false;
}
$profil = new Profile();
if ($ID) {
$this->getFromDB($ID);
$profil->getFromDB($ID);
}
?>
<form action='<?php
echo $target;
?>
' method='post'>
<table class='tab_cadre_fixe'>
<tr>
<th colspan='2' class='center b'><?php
echo $LANG['plugin_ticketmail']['profile'][0] . " " . $profil->fields["name"];
?>
</th>
</tr>
<tr class='tab_bg_2'>
<td><?php
echo $LANG['plugin_ticketmail']['profile'][1];
?>
:</td>
<td>
<?php
Dropdown::showYesNo("show_ticketmail_onglet", $this->fields["show_ticketmail_onglet"]);
?>
</td>
</tr>
<tr class='tab_bg_1'>
<td class='center' colspan='2'>
<input type='hidden' name='id' value= '<?php
echo $ID;
?>
'>
<input type='submit' name='update_user_profile' value='<?php
echo __s('Update');
?>
' class='submit'>
</td>
</tr>
</table>
<?php
Html::closeForm();
}
示例9: plugin_talk_MassiveActionsDisplay
function plugin_talk_MassiveActionsDisplay($options = array())
{
switch ($options['itemtype']) {
case 'Profile':
switch ($options['action']) {
case "plugin_talk_edit_profile":
echo _sx('button', 'Enable') . " : ";
Dropdown::showYesNo("is_active", 1);
echo " <input type='submit' name='massiveaction' class='submit' value='" . __s('Post') . "'>";
break;
}
break;
}
return "";
}
示例10: showForm
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 " :</td>";
echo "<td>";
echo '<input type="text" name="name" value="' . $this->fields["name"] . '" size="54"/>';
echo "</td>";
echo "</td><td>";
echo __('Active');
echo " :</td><td>";
Dropdown::showYesNo("is_active", $this->fields["is_active"]);
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>";
echo __('Description');
echo " :</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();
}
示例11: showForm
function showForm()
{
$this->getFromDB('1');
$system = $this->fields["used_system"];
echo "<div class='center'>";
echo "<form method='post' action='" . $this->getFormURL() . "'>";
echo "<table class='tab_cadre_fixe' cellpadding='5'>";
echo "<tr><th colspan='4'>" . __('System for ping', 'addressing') . "</th></tr>";
echo "<tr class='tab_bg_1'><td colspan='4'><div class='center'><select name='used_system'>";
echo "<option value='0' " . ($system == 0 ? " selected " : "") . ">" . __('Linux ping', 'addressing') . "</option>";
echo "<option value='2' " . ($system == 2 ? " selected " : "") . ">" . __('Linux fping', 'addressing') . "</option>";
echo "<option value='1' " . ($system == 1 ? " selected " : "") . ">" . __('Windows', 'addressing') . "</option>";
echo "<option value='3' " . ($system == 3 ? " selected " : "") . ">" . __('BSD ping', 'addressing') . "</option>";
echo "<option value='4' " . ($system == 4 ? " selected " : "") . ">" . __('MacOSX ping', 'addressing') . "</option>";
echo "</select>";
echo "</div></td></tr>";
echo "<tr><th colspan='4'>" . __('Display', 'addressing') . "</th></tr>";
echo "<tr class='tab_bg_1'><td>" . __('Assigned IP', 'addressing') . "</td>";
echo "<td>";
Dropdown::showYesNo("alloted_ip", $this->fields["alloted_ip"]);
echo "</td>";
echo "<td>" . __('Free IP', 'addressing') . "</td>";
echo "<td>";
Dropdown::showYesNo("free_ip", $this->fields["free_ip"]);
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'><td>" . __('Same IP', 'addressing') . "</td>";
echo "<td>";
Dropdown::showYesNo("double_ip", $this->fields["double_ip"]);
echo "</td>";
echo "<td>" . __('Reserved IP', 'addressing') . "</td>";
echo "<td>";
Dropdown::showYesNo("reserved_ip", $this->fields["reserved_ip"]);
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'><td colspan='2'>" . __('Use Ping', 'addressing') . "</td>";
echo "<td colspan='2'>";
Dropdown::showYesNo("use_ping", $this->fields["use_ping"]);
echo "</td>";
echo "</tr>";
echo "<tr><th colspan='4'>";
echo "<input type='hidden' name='id' value='1'>";
echo "<div class='center'>" . "<input type='submit' name='update' value='" . _sx('button', 'Post') . "' class='submit'>" . "</div></th></tr>";
echo "</table>";
Html::closeForm();
echo "</div>";
}
示例12: showForm
function showForm()
{
echo "<form method='POST' action=\"" . $this->getFormURL() . "\">";
echo "<table class='tab_cadre_fixe'>";
echo "<tr><th colspan='2'>";
_e('Flags');
echo "</th></tr>";
echo "<tr class='tab_bg_1 top'><td>" . __('Input time on groups / users when ticket is waiting', 'timelineticket') . "</td>";
echo "<td>";
Dropdown::showYesNo("add_waiting", $this->fields["add_waiting"]);
echo "</td></tr>";
echo "<tr><th colspan='2'>";
echo "<input type='hidden' name='id' value='1'>";
echo "<input type=\"submit\" name=\"update\" class=\"submit\"\n value=\"" . _sx('button', 'Save') . "\" ></th></tr>";
echo "</table>";
Html::closeForm();
}
示例13: showForm
function showForm()
{
$this->getfromDB(1);
$target = self::getFormURL();
echo "<div align='center'><form method='post' action=\"{$target}\">";
echo "<table class='tab_cadre' cellpadding='5'><tr ><th colspan='2'>";
echo self::getTypeName(0) . "</th></tr>";
echo "<tr class='tab_bg_1'><td>" . __('Configuration of units', 'racks') . "</td><td>";
echo "<select name=\"unit\" size=\"1\"> ";
echo "<option ";
if ($this->isMetricUnit()) {
echo "selected ";
}
echo "value='" . self::METRIC_UNIT . "'>" . __('metric', 'racks') . "</option>";
echo "<option ";
if (!$this->isMetricUnit()) {
echo "selected ";
}
echo "value='" . self::NON_METRIC_UNIT . "'>" . __('English', 'racks') . "</option>";
echo "</select> ";
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>";
echo __("Copy rack's location when adding a new asset in the rack", "racks");
echo "</td>";
echo "<td style='width: 150px;'>";
Dropdown::showYesNo('add_location_on_new_item', $this->fields['add_location_on_new_item']);
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>";
echo __("Forward rack's location to linked assets on change", "racks");
echo "</td>";
echo "<td style='width: 150px;'>";
Dropdown::showYesNo('forward_location_on_change', $this->fields['forward_location_on_change']);
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td colspan='2' align='center'>";
echo Html::hidden('id', array('value' => 1));
echo Html::submit(_sx('button', 'Post'), array('name' => 'update'));
echo "</table>";
Html::closeForm();
echo "</div>";
}
示例14: showFormDisplay
/**
* Print the config form for display
*
*/
function showFormDisplay()
{
$options = self::getConfigValues(array('group_by_users'));
echo "<form name='form' action=\"" . Toolbox::getItemTypeFormURL(__CLASS__) . "\" method='post'>";
echo "<div class='center' id='tabsbody'>";
echo "<table class='tab_cadre_fixe'>";
echo "<tr><th colspan='4'>" . __('FP Software config') . "</th></tr>";
echo "<tr class='tab_bg_2'>";
echo "<td width='30%'> " . __('Calculate licenses number per user instead of per computer') . "</td><td width='20%'>";
Dropdown::showYesNo('group_by_users', $options['group_by_users']);
echo "</td></tr>";
echo "<tr class='tab_bg_2'>";
echo "<td colspan='4' class='center'>";
echo "<input type='submit' name='update' class='submit' value=\"" . _sx('button', 'Save') . "\">";
echo "</td></tr>";
echo "</table></div>";
Html::closeForm();
}
示例15: plugin_pdf_MassiveActionsDisplay
function plugin_pdf_MassiveActionsDisplay($options = array())
{
global $PLUGIN_HOOKS;
switch ($options['itemtype']) {
case 'Profile':
switch ($options['action']) {
case "plugin_pdf_allow":
Dropdown::showYesNo('use');
echo "<input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Post') . "'>";
break;
}
break;
default:
if (isset($PLUGIN_HOOKS['plugin_pdf'][$options['itemtype']]) && $options['action'] == 'plugin_pdf_DoIt') {
echo "<input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Post') . "'>";
}
}
return "";
}