diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index bb385e34984..fb8f92d9e12 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'bills', 'blockedlog', 'other')); @@ -154,7 +155,10 @@ if ($action === 'downloadblockchain') { $previoushash = ''; $firstid = ''; - if (!$error) { + if (! (GETPOSTINT('yeartoexport') > 0)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Year")), null, "errors"); + $error++; + } else { // Get ID of first line $sql = "SELECT rowid,date_creation,tms,user_fullname,action,amounts,element,fk_object,date_object,ref_object,signature,fk_user,object_data"; $sql .= " FROM ".MAIN_DB_PREFIX."blockedlog"; @@ -292,6 +296,7 @@ if ($action === 'downloadblockchain') { */ $form = new Form($db); +$formother = new FormOther($db); if (GETPOST('withtab', 'alpha')) { $title = $langs->trans("ModuleSetup").' '.$langs->trans('BlockedLog'); @@ -379,19 +384,9 @@ print ''; print '
| '; print ' | '; // Status -print ' | '; +print ' | '; $array = array("1" => "OnlyNonValid"); -print $form->selectarray('search_showonlyerrors', $array, $search_showonlyerrors, 1, 0, 0, '', 1, 0, 0, 'ASC', 'search_status maxwidth200 onrightofpage', 1); +print $form->selectarray('search_showonlyerrors', $array, $search_showonlyerrors, 1, 0, 0, '', 1, 0, 0, 'ASC', 'search_status width100 onrightofpage', 1); print ' | '; // Status note