diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index f24467b8c59..1c21140b12a 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -152,6 +152,7 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +//var_dump($_POST);exit; /* * Actions @@ -301,7 +302,7 @@ if ($user->rights->agenda->allactions->delete) { $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); } - +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $sql = "SELECT"; @@ -441,7 +442,6 @@ if ($resql) if ($optioncss != '') print ''; print ''; - print ''; print ''; print ''; print ''; @@ -546,7 +546,6 @@ if ($resql) if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); $i = 0; - print '
'; print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); print '
'; diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 067b92bfc38..612f988305f 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1173,6 +1173,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissio } } +//var_dump($_POST);var_dump($massaction);exit; // Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before) if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete) diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index a25c374c11b..444c14c41c4 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -51,6 +51,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh { global $conf, $user, $langs, $db, $hookmanager; global $begin_h, $end_h, $begin_d, $end_d; + global $massaction; $langs->load("companies"); @@ -63,50 +64,35 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print ''; print ''; print ''; - print ''; + if ($massaction != 'predelete') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system. + print ''; + } print ''; - //print '
'; - - //if ($conf->browser->layout == 'phone') print '
'; - //else print ''; - - /* - if ($conf->browser->layout == 'phone') print '
'; - else print '
'; - */ - //if ($conf->browser->layout != 'phone') print '
'; - - //print ''; - if ($canedit) { print '
'; // Type - //print '
'; - //print ''; print ''; // Assigned to print '
'; - //print '
'; - //print ''; print ''; if ($conf->resource->enabled) @@ -116,13 +102,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh // Resource print '
'; - //print '
'; - //print ''; print ''; } } @@ -130,13 +112,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh if (!empty($conf->societe->enabled) && $user->rights->societe->lire) { print '
'; - //print '
'; - //print ''; print ''; } @@ -146,13 +124,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh $formproject = new FormProjets($db); print '
'; - //print '
'; - //print ''; print ''; } @@ -160,13 +134,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh { // Status print '
'; - //print '
'; - //print ''; print ''; } @@ -174,12 +144,8 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh { print '
'; // Filter on hours - //print '
'; - //print ''; - //print "'; print ''; // Filter on days print '
'; - //print '
'; - //print ''; - //print "'; print ''; } // Hooks $parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid); + $object = null; $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been - //print '
'; print ''; print ''.$langs->trans("Type").''; - //print ''; $multiselect = 0; if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list" { $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE)); } print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500'); - //print '
'; print img_picto('', 'user', 'class="fawidth30 inline-block"'); print ''.$langs->trans("ActionsToDoBy").''; - //print ''; print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500'); print ''; print '
'; - //if (empty($conf->dol_optimize_smallscreen)) print ' '.$langs->trans("ToUserOfGroup").'   '; - //else print '
'; print img_picto('', 'object_group', 'class="fawidth30 inline-block"'); print ''.$langs->trans("ToUserOfGroup").''; print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500'); - //print '
'; print img_picto('', 'object_resource', 'class="fawidth30 inline-block"'); print ''.$langs->trans("Resource").''; - //print ''; print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500'); - //print '
'; print img_picto('', 'company', 'class="fawidth30 inline-block"'); print ''.$langs->trans("ThirdParty").''; - //print ''; print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0, 'minwidth100 maxwidth500'); - //print '
'; print img_picto('', 'project', 'class="fawidth30 inline-block"'); print ''.$langs->trans("Project").''; - //print ''; print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500'); - //print '
'; print img_picto('', 'setup', 'class="fawidth30 inline-block"'); print ''.$langs->trans("Status").''; - //print ''; $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100'); - //print '
'; print img_picto('', 'clock', 'class="fawidth30 inline-block"'); print ''.$langs->trans("VisibleTimeRange").''; - //print '"; print "\n".'
'; print ''; if (empty($conf->dol_use_jmobile)) print ' - '; @@ -187,56 +153,27 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print ''; if (empty($conf->dol_use_jmobile)) print ' '.$langs->trans("H"); print '
'; - //print '
'; print img_picto('', 'clock', 'class="fawidth30 inline-block"'); print ''.$langs->trans("VisibleDaysRange").''; - //print '"; print "\n".'
'; print ''; if (empty($conf->dol_use_jmobile)) print ' - '; else print '
'; print ''; print '
'; - //print '
'; - - //if ($conf->browser->layout == 'phone') print ''; - //else print '
'; - - print ''; - print '
'; - print '
'; - print ''; - print '
'; - print '
'; - - if ($conf->browser->layout == 'phone') print ''; - else print '
'; - - //print '
'; // Close fichecenter print '
'; - - //print ''; }