예제 #1
0
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     $wizard_employee = PluginResourcesContractType::checkWizardSetup($item->getField('id'), "use_employee_wizard");
     if ($item->getType() == 'PluginResourcesResource' && $this->canView() && $wizard_employee) {
         return self::getTypeName(1);
     }
     return '';
 }
예제 #2
0
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     $wizard_need = PluginResourcesContractType::checkWizardSetup($item->getField('id'), "use_need_wizard");
     if ($item->getType() == 'PluginResourcesResource' && $this->canView() && $wizard_need) {
         if ($_SESSION['glpishow_count_on_tabs']) {
             return self::createTabEntry(self::getTypeName(2), self::countForResource($item));
         }
         return self::getTypeName(2);
     }
     return '';
 }
예제 #3
0
     $wizard_picture = PluginResourcesContractType::checkWizardSetup($_POST["plugin_resources_resources_id"], "use_picture_wizard");
     if ($wizard_need) {
         $choice->wizardFourForm($_POST["plugin_resources_resources_id"]);
     } elseif ($wizard_picture) {
         $values = array();
         $values['target'] = Toolbox::getItemTypeFormURL('PluginResourcesWizard');
         $resource->wizardFiveForm($_POST["plugin_resources_resources_id"], $values);
     } else {
         $resource->fields['plugin_resources_resources_id'] = $_POST['plugin_resources_resources_id'];
         $resource->fields['resources_step'] = 'third_step';
         Plugin::doHook('item_show', $resource);
         $resource->redirectToList();
     }
 } else {
     if (isset($_POST["four_step"])) {
         $wizard_picture = PluginResourcesContractType::checkWizardSetup($_POST["plugin_resources_resources_id"], "use_picture_wizard");
         if ($wizard_picture) {
             $values = array();
             $values['target'] = Toolbox::getItemTypeFormURL('PluginResourcesWizard');
             $resource->wizardFiveForm($_POST["plugin_resources_resources_id"], $values);
         } else {
             $resource->fields['plugin_resources_resources_id'] = $_POST['plugin_resources_resources_id'];
             $resource->fields['resources_step'] = 'four_step';
             Plugin::doHook('item_show', $resource);
             $resource->redirectToList();
         }
     } else {
         if (isset($_POST["updateneedcomment"])) {
             if ($resource->canCreate()) {
                 foreach ($_POST["updateneedcomment"] as $key => $val) {
                     $varcomment = "commentneed" . $key;