/**
  * @since version 0.85
  *
  * @see CommonDBTM::showMassiveActionsSubForm()
  **/
 static function showMassiveActionsSubForm(MassiveAction $ma)
 {
     global $CFG_GLPI;
     switch ($ma->getAction()) {
         case 'Generate':
             $pbQRcode = new self();
             $pbQRcode->showFormMassiveAction();
             return true;
     }
     return parent::showMassiveActionsSubForm($ma);
 }
Example #2
0
 /**
  * @since version 0.85
  *
  * @see CommonDBTM::showMassiveActionsSubForm()
  **/
 static function showMassiveActionsSubForm(MassiveAction $ma)
 {
     global $CFG_GLPI;
     switch ($ma->getAction()) {
         case 'Generate':
             $formcreator = new self();
             $formcreator->showFormMassiveAction($ma);
             return true;
             break;
         case 'Pedido':
             /*
             				Dropdown::show('PluginFormcreatorForm', array(
             'name'      => "plugin_formcreator_forms_id",
             'entity'    => $_SESSION['glpiactive_entity']
             ));
             */
             $table = getTableForItemtype('PluginFormcreatorForm');
             $sections = array();
             $sql = "SELECT `id`, `name`\n\t\t\t\t\t\t\tFROM {$table}\n\t\t\t\t\t\t\tWHERE entities_id = " . $_SESSION['glpiactive_entity'] . "\n\t\t\t\t\t\t\tORDER BY `name`";
             $result = $GLOBALS['DB']->query($sql);
             while ($section = $GLOBALS['DB']->fetch_array($result)) {
                 $sections[$section['id']] = $section['name'];
             }
             $sections = array("0" => "----") + $sections;
             Dropdown::showFromArray('plugin_formcreator_forms_id', $sections, array());
             echo Html::submit(_x('button', 'Post'), array('name' => 'massiveaction'));
             return true;
             break;
     }
     return parent::showMassiveActionsSubForm($ma);
 }