当前位置: 首页>>代码示例>>PHP>>正文


PHP Rule::dropdown方法代码示例

本文整理汇总了PHP中Rule::dropdown方法的典型用法代码示例。如果您正苦于以下问题:PHP Rule::dropdown方法的具体用法?PHP Rule::dropdown怎么用?PHP Rule::dropdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Rule的用法示例。


在下文中一共展示了Rule::dropdown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showSpecificMassiveActionsParameters

 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "move_rule":
             echo "<select name='move_type'>";
             echo "<option value='after' selected>" . __('After') . "</option>";
             echo "<option value='before'>" . __('Before') . "</option>";
             echo "</select>&nbsp;";
             if (isset($input['entity_restrict'])) {
                 $condition = $input['entity_restrict'];
             } else {
                 $condition = "";
             }
             Rule::dropdown(array('sub_type' => $input['itemtype'], 'name' => "ranking", 'entity_restrict' => $condition));
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Move') . "'>\n";
             return true;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:24,代码来源:rule.class.php

示例2: showMassiveActionsSubForm

 /**
  * @since version 0.85
  *
  * @see CommonDBTM::showMassiveActionsSubForm()
  **/
 static function showMassiveActionsSubForm(MassiveAction $ma)
 {
     switch ($ma->getAction()) {
         case 'duplicate':
             $entity_assign = False;
             foreach ($ma->getitems() as $itemtype => $ids) {
                 if ($item = getItemForItemtype($itemtype)) {
                     if ($item->isEntityAssign()) {
                         $entity_assign = true;
                         break;
                     }
                 }
             }
             if ($entity_assign) {
                 Entity::dropdown();
             }
             echo "<br><br>" . Html::submit(_x('button', 'Duplicate'), array('name' => 'massiveaction'));
             return true;
         case 'move_rule':
             $input = $ma->getInput();
             $values = array('after' => __('After'), 'before' => __('Before'));
             Dropdown::showFromArray('move_type', $values, array('width' => '20%'));
             if (isset($input['entity'])) {
                 $entity = $input['entity'];
             } else {
                 $entity = "";
             }
             if (isset($input['condition'])) {
                 $condition = $input['condition'];
             } else {
                 $condition = 0;
             }
             echo Html::hidden('rule_class_name', array('value' => $input['rule_class_name']));
             Rule::dropdown(array('sub_type' => $input['rule_class_name'], 'name' => "ranking", 'condition' => $condition, 'entity' => $entity, 'width' => '50%'));
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Move') . "'>\n";
             return true;
     }
     return parent::showMassiveActionsSubForm($ma);
 }
开发者ID:pvasener,项目名称:glpi,代码行数:44,代码来源:rule.class.php

示例3: array

     break;
 case 'merge':
     echo "&nbsp;" . $_SESSION['glpiactive_entity_shortname'];
     echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>\n";
     break;
 case "move_rule":
     echo "<select name='move_type'>";
     echo "<option value='after' selected>" . $LANG['buttons'][47] . "</option>";
     echo "<option value='before'>" . $LANG['buttons'][46] . "</option>";
     echo "</select>&nbsp;";
     if (isset($_POST['entity_restrict'])) {
         $condition = $_POST['entity_restrict'];
     } else {
         $condition = "";
     }
     Rule::dropdown(array('sub_type' => $_POST['sub_type'], 'name' => "ranking", 'entity_restrict' => $condition));
     echo "<input type='submit' name='massiveaction' class='submit' value='" . $LANG['buttons'][2] . "'>\n";
     break;
 case "add_followup":
     TicketFollowup::showFormMassiveAction();
     break;
 case "add_task":
     TicketTask::showFormMassiveAction();
     break;
 case "add_actor":
     $types = array(0 => DROPDOWN_EMPTY_VALUE, Ticket::REQUESTER => $LANG['job'][4], Ticket::OBSERVER => $LANG['common'][104], Ticket::ASSIGN => $LANG['job'][5]);
     $rand = Dropdown::showFromArray('actortype', $types);
     $paramsmassaction = array('actortype' => '__VALUE__');
     ajaxUpdateItemOnSelectEvent("dropdown_actortype{$rand}", "show_massiveaction_field", $CFG_GLPI["root_doc"] . "/ajax/dropdownMassiveActionAddActor.php", $paramsmassaction);
     echo "<span id='show_massiveaction_field'>&nbsp;</span>\n";
     break;
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:dropdownMassiveAction.php


注:本文中的Rule::dropdown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。