Exemplo n.º 1
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     global $CFG_GLPI;
     switch ($input['action']) {
         case "change_authtype":
             $rand = Auth::dropdown(array('name' => 'authtype'));
             $paramsmassaction = array('authtype' => '__VALUE__');
             Ajax::updateItemOnSelectEvent("dropdown_authtype{$rand}", "show_massiveaction_field", $CFG_GLPI["root_doc"] . "/ajax/dropdownMassiveActionAuthMethods.php", $paramsmassaction);
             echo "<span id='show_massiveaction_field'><br><br>";
             echo "<input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Post') . "'>";
             echo "</span>\n";
             return true;
         case "add_user_group":
             $gu = new Group_User();
             return $gu->showSpecificMassiveActionsParameters($input);
         case "add_userprofile":
             Entity::dropdown(array('entity' => $_SESSION['glpiactiveentities']));
             echo ".&nbsp;" . _n('Profile', 'Profiles', 1) . "&nbsp;";
             Profile::dropdownUnder();
             echo ".&nbsp;" . __('Recursive') . "&nbsp;";
             Dropdown::showYesNo("is_recursive", 0);
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Add') . "'>";
             return true;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     global $CFG_GLPI;
     switch ($input['action']) {
         case "add_user_group":
         case "add_supervisor_group":
         case "add_delegatee_group":
             $gu = new Group_User();
             return $gu->showSpecificMassiveActionsParameters($input);
         case "changegroup":
             if (isset($input['is_tech']) && isset($input['check_items_id']) && isset($input['check_itemtype'])) {
                 if ($group = getItemForItemtype($input['check_itemtype'])) {
                     if ($group->getFromDB($input['check_items_id'])) {
                         self::dropdown(array('entity' => $group->fields["entities_id"], 'used' => array($group->fields["id"]), 'condition' => $input['is_tech'] ? '`is_assign`' : '`is_itemgroup`'));
                         echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Move') . "'>";
                         return true;
                     }
                 }
             }
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }