/** * @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 ". " . _n('Profile', 'Profiles', 1) . " "; Profile::dropdownUnder(); echo ". " . __('Recursive') . " "; 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; }
/** * @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; }