예제 #1
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "import_email":
             Entity::dropdown();
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Import') . "'>";
             return true;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
예제 #2
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;
 }
예제 #3
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "add_contact_supplier":
             $contactsupplier = new Contact_Supplier();
             return $contactsupplier->showSpecificMassiveActionsParameters($input);
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
예제 #4
0
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "Install":
             Dropdown::showAllItems("item_item", 0, 0, -1, self::getTypes());
             echo "<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value='" . _sx('button', 'Post') . "'>";
             return true;
             break;
         case "Desinstall":
             Dropdown::showAllItems("item_item", 0, 0, -1, self::getTypes());
             echo "<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value='" . _sx('button', 'Post') . "'>";
             return true;
             break;
         case "Duplicate":
             Dropdown::show('Entity');
             echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value='" . _sx('button', 'Post') . "'>";
             return true;
             break;
         case "Transfert":
             Dropdown::show('Entity');
             echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value='" . _sx('button', 'Post') . "'>";
             return true;
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
             break;
     }
     return false;
 }
예제 #5
0
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "Transfert":
             Dropdown::show('Entity');
             echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value='" . __s('Post') . "'>";
             return true;
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
             break;
     }
     return false;
 }
예제 #6
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "connect":
         case "disconnect":
             $ci = new Computer_Item();
             return $ci->showSpecificMassiveActionsParameters($input);
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
예제 #7
0
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "Send":
             echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value='" . _sx('button', 'Post') . "'>";
             return true;
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
             break;
     }
     return false;
 }
예제 #8
0
 function showSpecificMassiveActionsParameters($input = array())
 {
     $PluginResourcesChecklist = new PluginResourcesChecklist();
     $PluginResourcesContractType = new PluginResourcesContractType();
     switch ($input['action']) {
         case "Generate_Rule":
             $PluginResourcesChecklist->dropdownChecklistType("checklist_type", $_SESSION["glpiactive_entity"]);
             echo "&nbsp;";
             RuleCriteria::dropdownConditions("PluginResourcesRuleChecklist", array('criterion' => 'plugin_resources_contracttypes_id', 'allow_conditions' => array(Rule::PATTERN_IS, Rule::PATTERN_IS_NOT)));
             echo "&nbsp;";
             $PluginResourcesContractType->dropdownContractType("plugin_resources_contracttypes_id");
             echo "&nbsp;";
             echo "<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value='" . _sx('button', 'Post') . "'>";
             return true;
             break;
         case "Transfert":
             Dropdown::show('Entity');
             echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value='" . _sx('button', 'Post') . "'>";
             return true;
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
             break;
     }
     return false;
 }
예제 #9
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     global $CFG_GLPI;
     switch ($input['action']) {
         case "add_task":
             $tasktype = $input['itemtype'] . "Task";
             if ($ttype = getItemForItemtype($tasktype)) {
                 $ttype->showFormMassiveAction();
                 return true;
             }
             break;
         case "add_actor":
             $types = array(0 => Dropdown::EMPTY_VALUE, CommonITILActor::REQUESTER => __('Requester'), CommonITILActor::OBSERVER => __('Watcher'), CommonITILActor::ASSIGN => __('Assigned to'));
             $rand = Dropdown::showFromArray('actortype', $types);
             $paramsmassaction = array('actortype' => '__VALUE__');
             Ajax::updateItemOnSelectEvent("dropdown_actortype{$rand}", "show_massiveaction_field", $CFG_GLPI["root_doc"] . "/ajax/dropdownMassiveActionAddActor.php", $paramsmassaction);
             echo "<span id='show_massiveaction_field'>&nbsp;</span>\n";
             return true;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
예제 #10
0
 /**
  * @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;
 }
예제 #11
0
 /**
  * @since version 0.84
  *
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     global $CFG_GLPI;
     switch ($input['action']) {
         case "give":
             if (isset($input["entities_id"])) {
                 Dropdown::showAllItems("give_items_id", 0, 0, $input["entities_id"], $CFG_GLPI["consumables_types"], false, false, 'give_itemtype');
                 echo "<br><br><input type='submit' class='submit' name='massiveaction' value='" . _sx('button', 'Give') . "'>";
                 return true;
             }
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
예제 #12
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     global $CFG_GLPI;
     switch ($input['action']) {
         case "add_document_item":
             Dropdown::showAllItems("items_id", 0, 0, -1, $CFG_GLPI["document_types"], false, true, 'item_itemtype');
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Add') . "'>";
             return true;
         case "remove_document_item":
             Dropdown::showAllItems("items_id", 0, 0, -1, $CFG_GLPI["document_types"], false, true, 'item_itemtype');
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Delete permanently') . "'>";
             return true;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
예제 #13
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "install":
             Software::dropdownSoftwareToInstall("softwareversions_id", $_SESSION["glpiactive_entity"], 1);
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . __s('Install') . "'>";
             return true;
         case "connect":
             $ci = new Computer_Item();
             return $ci->showSpecificMassiveActionsParameters($input);
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
예제 #14
0
 /**
  * Display specific options add action button for massive actions
  *
  * Parameters must not be : itemtype, action, is_deleted, check_itemtype or check_items_id
  * @param $input array of input datas
  * @since version 0.84
  *
  * @return boolean if parameters displayed ?
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     global $CFG_GLPI;
     switch ($input['action']) {
         case "deleteAll":
             echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"" . __s('Post') . "\" >";
             return true;
             break;
         case "updateAll":
             echo "&nbsp;<select name='field' id='field'>";
             echo "<option value='0' selected>" . Dropdown::EMPTY_VALUE . "</option>";
             echo "<option value='is_active'>" . __('Active') . "</option>";
             echo "</select>";
             $params = array('field' => '__VALUE__', 'action' => $_POST["action"]);
             Ajax::updateItemOnSelectEvent("field", "show_massiveaction_field", $CFG_GLPI["root_doc"] . "/plugins/typology/ajax/dropdownMassiveActionField.php", $params);
             echo "&nbsp;<span id='show_massiveaction_field'>&nbsp;</span>\n";
             return true;
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
             break;
     }
     return false;
 }
예제 #15
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case 'merge':
             echo "&nbsp;" . $_SESSION['glpiactive_entity_shortname'];
             echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Merge') . "'>\n";
             return true;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
예제 #16
0
 /**
  * Display specific options add action button for massive actions
  *
  * Parameters must not be : itemtype, action, is_deleted, check_itemtype or check_items_id
  * @param $input array of input datas
  * @since version 0.84
  * 
  * @return boolean if parameters displayed ?
  **/
 public function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "InstallTEST":
             Dropdown::showItemTypes("item_item", self::getTypes(true));
             echo "<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"" . __('Post') . "\" >";
             return true;
             break;
         case "Desinstall":
             Dropdown::showItemTypes("item_item", self::getTypes(true));
             echo "<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"" . __('Post') . "\" >";
             return true;
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
             break;
     }
     return false;
 }