Esempio n. 1
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())
 {
     switch ($input['action']) {
         case "delete_item":
             echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"" . __s('Post') . "\" >";
             return true;
             break;
         case "update_allitem":
             echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"" . __s('Post') . "\" >";
             return true;
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
             break;
     }
     return false;
 }
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  *
  * @since version 0.84
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "solveticket":
             $problem = new Problem();
             if (isset($input['problems_id']) && $problem->getFromDB($input['problems_id'])) {
                 Ticket::showMassiveSolutionForm($problem->getEntityID());
                 echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Post') . "'>";
                 return true;
             }
             return false;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
Esempio n. 3
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "add_user_group":
         case "add_supervisor_group":
         case "add_delegatee_group":
             if ($input['itemtype'] == 'User') {
                 Group::dropdown(array('condition' => '`is_usergroup`'));
                 echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Add') . "'>";
                 return true;
             }
             if ($input['itemtype'] == 'Group') {
                 User::dropdown(array('right' => "all"));
                 echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Add') . "'>";
                 return true;
             }
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
 /**
  * @since version 0.84
  *
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "move_license":
             if (isset($input['options'])) {
                 $input['options'] = Toolbox::decodeArrayFromInput($input['options']);
                 if (isset($input['options']['move'])) {
                     SoftwareLicense::dropdown(array('condition' => "`glpi_softwarelicenses`.`softwares_id`\n                                                        = '" . $input['options']['move']['softwares_id'] . "'", 'used' => $input['options']['move']['used']));
                     echo "<br><br><input type='submit' name='massiveaction' value=\"" . _sx('button', 'Move') . "\" class='submit'>&nbsp;";
                     return true;
                 }
             }
             return false;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "add_contact_supplier":
             if ($input['itemtype'] == 'Supplier') {
                 Contact::dropdown(array('name' => "contacts_id"));
                 echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Add') . "'>";
                 return true;
             }
             if ($input['itemtype'] == 'Contact') {
                 Supplier::dropdown(array('name' => "suppliers_id"));
                 echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . _sx('button', 'Add') . "'>";
                 return true;
             }
             break;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
Esempio n. 6
0
 /**
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "connect":
             if ($input['itemtype'] == 'Computer') {
                 Dropdown::showAllItems("items_id", 0, 0, $_SESSION["glpiactive_entity"], array('Monitor', 'Peripheral', 'Phone', 'Printer'), true, true, 'item_itemtype');
                 echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . __s('Connect') . "'>";
             } else {
                 Computer_Item::dropdownConnect('Computer', $input["itemtype"], "computers_id");
                 echo "<br><br><input type='submit' name='massiveaction' class='submit' value='" . __s('Connect') . "'>";
             }
             return true;
         case "disconnect":
             echo "<input type='submit' name='massiveaction' class='submit' value='" . __s('Disconnect') . "'>";
             return true;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }
 /**
  * @since version 0.84
  *
  * @see CommonDBTM::showSpecificMassiveActionsParameters()
  **/
 function showSpecificMassiveActionsParameters($input = array())
 {
     switch ($input['action']) {
         case "move_version":
             if (isset($input['options'])) {
                 $input['options'] = Toolbox::decodeArrayFromInput($input['options']);
                 if (isset($input['options']['move'])) {
                     $options = array('softwares_id' => $input['options']['move']['softwares_id']);
                     if (isset($input['options']['move']['used'])) {
                         $options['used'] = $input['options']['move']['used'];
                     }
                     SoftwareVersion::dropdown($options);
                     echo "<br><br><input type='submit' name='massiveaction' value=\"" . _sx('button', 'Move') . "\" class='submit'>&nbsp;";
                     return true;
                 }
             }
             return false;
         default:
             return parent::showSpecificMassiveActionsParameters($input);
     }
     return false;
 }