function displayCriteriaSelectPattern($name, $ID, $condition, $value = "", $test = false)
 {
     $PluginResourcesChecklist = new PluginResourcesChecklist();
     $PluginResourcesContractType = new PluginResourcesContractType();
     $crit = $this->getCriteria($ID);
     $display = false;
     if (isset($crit['type']) && ($test || $condition == Rule::PATTERN_IS || $condition == Rule::PATTERN_IS_NOT)) {
         switch ($crit['type']) {
             case "dropdownChecklistType":
                 $PluginResourcesChecklist->dropdownChecklistType($name);
                 $display = true;
                 break;
             case "dropdownContractType":
                 $PluginResourcesContractType->dropdownContractType($name);
                 $display = true;
                 break;
         }
     }
     if ($condition == Rule::PATTERN_EXISTS || $condition == Rule::PATTERN_DOES_NOT_EXISTS) {
         echo "<input type='hidden' name='{$name}' value='1'>";
         $display = true;
     }
     if (!$display) {
         $rc = new $this->rulecriteriaclass();
         Html::autocompletionTextField($rc, "pattern", array('name' => $name, 'value' => $value, 'size' => 70));
     }
 }
 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;
 }
 function displayCriteriaSelectPattern($name, $ID, $condition, $value = "", $test = false)
 {
     $PluginResourcesContractType = new PluginResourcesContractType();
     $crit = $this->getCriteria($ID);
     $display = false;
     if (isset($crit['type']) && ($test || $condition == Rule::PATTERN_IS || $condition == Rule::PATTERN_IS_NOT)) {
         switch ($crit['type']) {
             case "dropdownContractType":
                 $PluginResourcesContractType->dropdownContractType($name);
                 $display = true;
                 break;
         }
     }
 }