Ejemplo n.º 1
0
     }
 }
 //if employee right : next step
 if ($newID) {
     $wizard_employee = PluginResourcesContractType::checkWizardSetup($newID, "use_employee_wizard");
     $wizard_need = PluginResourcesContractType::checkWizardSetup($newID, "use_need_wizard");
     $wizard_picture = PluginResourcesContractType::checkWizardSetup($newID, "use_picture_wizard");
     if ($employee->canCreate()) {
         if ($wizard_employee) {
             $employee->wizardThirdForm($newID);
         } elseif ($wizard_need) {
             $choice->wizardFourForm($newID);
         } elseif ($wizard_picture) {
             $values = array();
             $values['target'] = Toolbox::getItemTypeFormURL('PluginResourcesWizard');
             $resource->wizardFiveForm($newID, $values);
         } else {
             $resource->fields['resources_step'] = 'second_step';
             Plugin::doHook('item_show', $resource);
             $resource->redirectToList();
         }
     } else {
         if ($wizard_need) {
             $choice->wizardFourForm($newID);
         } elseif ($wizard_picture) {
             $values = array();
             $values['target'] = Toolbox::getItemTypeFormURL('PluginResourcesWizard');
             $resource->wizardFiveForm($newID, $values);
         } else {
             $resource->fields['resources_step'] = 'second_step';
             Plugin::doHook('item_show', $resource);