diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 86a605afa53..bf313be16c2 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -61,6 +61,28 @@ if (! $sortorder) $sortorder='ASC'; * Actions */ +/* + * Actions + */ + +if (GETPOST('cancel')) { $action='list'; $massaction=''; } +if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; } + +$parameters=array('socid'=>$socid); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + +// Purge search criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers +{ + $transkey=''; + $transvalue=''; + $toselect=''; + $search_array_options=array(); +} + if ($action == 'add' || (GETPOST('add') && $action != 'update')) { @@ -296,7 +318,7 @@ if ($mode == 'searchkey') if (empty($langcode) || $langcode == '-1') $nbempty++; if (empty($transkey)) $nbempty++; if (empty($transvalue)) $nbempty++; - if ($action == 'search' && ($nbempty > 1)) + if ($action == 'search' && ($nbempty > 999)) // 999 to disable this { setEventMessages($langs->trans("WarningAtLeastKeyOrTranslationRequired"), null, 'warnings'); } @@ -365,22 +387,22 @@ if ($mode == 'searchkey') print ''; print ''; print ''; - print ''; // Limit to superadmin if (! empty($conf->multicompany->enabled) && !$user->entity) { - print ''; + print ''; print ''; - print ''; - print ''; } else { - print ''; print ''; } - print ''; - print "\n"; + print ''; + // Action column + print ''; + $searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); + print $searchpitco; + print ''; print ''; if ($sortfield == 'transkey' && strtolower($sortorder) == 'asc') ksort($recordtoshow);