diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index e85f5aa51ea..83e8c3f8dbf 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -193,24 +193,29 @@ print '
'; print '
'; print ''; +print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; + print ''; print ''; print ''; print ''; -print ''; + +print ''; print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans("NewRSS").''.$langs->trans("Example").'
'.$langs->trans("Title").''.$langs->trans('RSSUrlExample').'
'.$langs->trans('RSSUrl').'http://news.google.com/news?ned=us&topic=h&output=rss
http://www.dolibarr.org/rss
'; +print '
'; + print $form->buttonsSaveCancel("Add", ''); print ''; print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 4ac22405287..c6ad77c7475 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1889,7 +1889,7 @@ class Account extends CommonObject $return .= ''.$langs->trans("Balance").' : '.price(price2num($this->solde(1), 'MT'), 0, $langs, 1, -1, -1, $this->currency_code).''; } if (method_exists($this, 'getLibStatut')) { - $return .= '
'.$this->getLibStatut(3).'
'; + $return .= '
'.$this->getLibStatut(3).'
'; } $return .= ''; $return .= ''; diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php index 1ef36091082..49afbcc0953 100644 --- a/htdocs/core/ajax/onlineSign.php +++ b/htdocs/core/ajax/onlineSign.php @@ -70,6 +70,12 @@ $type = $mode; $securekeyseed = ''; if ($type == 'proposal') { $securekeyseed = getDolGlobalString('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN'); +} elseif ($type == 'contract') { + $securekeyseed = getDolGlobalString('CONTRACT_ONLINE_SIGNATURE_SECURITY_TOKEN'); +} elseif ($type == 'fichinter') { + $securekeyseed = getDolGlobalString('FICHINTER_ONLINE_SIGNATURE_SECURITY_TOKEN'); +} else { + $securekeyseed = getDolGlobalString(strtoupper($type).'_ONLINE_SIGNATURE_SECURITY_TOKEN'); } if (empty($SECUREKEY) || !dol_verifyHash($securekeyseed . $type . $ref . (!isModEnabled('multicompany') ? '' : $entity), $SECUREKEY, '0')) { @@ -152,6 +158,10 @@ if ($action == "importSignature") { //$pdf->Open(); $pagecount = $pdf->setSourceFile($sourcefile); // original PDF + $param = array(); + $param['online_sign_name'] = $online_sign_name; + $param['pathtoimage'] = $upload_dir . $filename; + $s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297); for ($i = 1; $i < ($pagecount + 1); $i++) { try { @@ -159,6 +169,17 @@ if ($action == "importSignature") { $s = $pdf->getTemplatesize($tppl); $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); $pdf->useTemplate($tppl); + + if (getDolGlobalString("PROPAL_SIGNATURE_ON_ALL_PAGES")) { + // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF + // TODO Get position of box from PDF template + + $param['xforimgstart'] = (empty($s['w']) ? 120 : round($s['w'] / 2) + 15); + $param['yforimgstart'] = (empty($s['h']) ? 240 : $s['h'] - 60); + $param['wforimg'] = $s['w'] - 20 - $param['xforimgstart']; + + dolPrintSignatureImage($pdf, $langs, $param); + } } catch (Exception $e) { dol_syslog("Error when manipulating the PDF " . $sourcefile . " by onlineSign: " . $e->getMessage(), LOG_ERR); $response = $e->getMessage(); @@ -166,19 +187,16 @@ if ($action == "importSignature") { } } - // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF - // TODO Get position of box from PDF template - $xforimgstart = (empty($s['w']) ? 120 : round($s['w'] / 2) + 15); - $yforimgstart = (empty($s['h']) ? 240 : $s['h'] - 60); - $wforimg = $s['w'] - 20 - $xforimgstart; + if (!getDolGlobalString("PROPAL_SIGNATURE_ON_ALL_PAGES")) { + // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF + // TODO Get position of box from PDF template - $pdf->SetXY($xforimgstart, $yforimgstart + round($wforimg / 4) - 4); - $pdf->SetFont($default_font, '', $default_font_size - 1); - $pdf->MultiCell($wforimg, 4, $langs->trans("DateSigning") . ': ' . dol_print_date(dol_now(), "daytext", false, $langs, true), 0, 'L'); - $pdf->SetXY($xforimgstart, $yforimgstart + round($wforimg / 4)); - $pdf->MultiCell($wforimg, 4, $langs->trans("Lastname") . ': ' . $online_sign_name, 0, 'L'); + $param['xforimgstart'] = (empty($s['w']) ? 120 : round($s['w'] / 2) + 15); + $param['yforimgstart'] = (empty($s['h']) ? 240 : $s['h'] - 60); + $param['wforimg'] = $s['w'] - 20 - $param['xforimgstart']; - $pdf->Image($upload_dir . $filename, $xforimgstart, $yforimgstart, $wforimg, round($wforimg / 4)); + dolPrintSignatureImage($pdf, $langs, $param); + } //$pdf->Close(); $pdf->Output($newpdffilename, "F"); @@ -294,9 +312,13 @@ if ($action == "importSignature") { $pdf->SetCompression(false); } - //$pdf->Open(); $pagecount = $pdf->setSourceFile($sourcefile); // original PDF + + $param = array(); + $param['online_sign_name'] = $online_sign_name; + $param['pathtoimage'] = $upload_dir . $filename; + $s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297); for ($i = 1; $i < ($pagecount + 1); $i++) { try { @@ -304,6 +326,17 @@ if ($action == "importSignature") { $s = $pdf->getTemplatesize($tppl); $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); $pdf->useTemplate($tppl); + + if (getDolGlobalString("CONTRACT_SIGNATURE_ON_ALL_PAGES")) { + // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF + // TODO Get position of box from PDF template + + $param['xforimgstart'] = 10; + $param['yforimgstart'] = (empty($s['h']) ? 240 : $s['h'] - 65); + $param['wforimg'] = $s['w'] / 2 - $param['xforimgstart']; + + dolPrintSignatureImage($pdf, $langs, $param); + } } catch (Exception $e) { dol_syslog("Error when manipulating some PDF by onlineSign: " . $e->getMessage(), LOG_ERR); $response = $e->getMessage(); @@ -311,13 +344,17 @@ if ($action == "importSignature") { } } - // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF - // TODO Get position of box from PDF template - $xforimgstart = 5; - $yforimgstart = (empty($s['h']) ? 240 : $s['h'] - 65); - $wforimg = $s['w'] / 2 - $xforimgstart; + if (!getDolGlobalString("CONTRACT_SIGNATURE_ON_ALL_PAGES")) { + // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF + // TODO Get position of box from PDF template + + $param['xforimgstart'] = 10; + $param['yforimgstart'] = (empty($s['h']) ? 240 : $s['h'] - 65); + $param['wforimg'] = $s['w'] / 2 - $param['xforimgstart']; + + dolPrintSignatureImage($pdf, $langs, $param); + } - $pdf->Image($upload_dir . $filename, $xforimgstart, $yforimgstart, $wforimg, round($wforimg / 4)); //$pdf->Close(); $pdf->Output($newpdffilename, "F"); @@ -388,9 +425,13 @@ if ($action == "importSignature") { $pdf->SetCompression(false); } - //$pdf->Open(); $pagecount = $pdf->setSourceFile($sourcefile); // original PDF + + $param = array(); + $param['online_sign_name'] = $online_sign_name; + $param['pathtoimage'] = $upload_dir . $filename; + $s = array(); // Array with size of each page. Exemple array(w'=>210, 'h'=>297); for ($i = 1; $i < ($pagecount + 1); $i++) { try { @@ -398,6 +439,17 @@ if ($action == "importSignature") { $s = $pdf->getTemplatesize($tppl); $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); $pdf->useTemplate($tppl); + + if (getDolGlobalString("FICHINTER_SIGNATURE_ON_ALL_PAGES")) { + // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF + // TODO Get position of box from PDF template + + $param['xforimgstart'] = 111; + $param['yforimgstart'] = (empty($s['h']) ? 250 : $s['h'] - 60); + $param['wforimg'] = $s['w'] - ($param['xforimgstart'] + 16); + + dolPrintSignatureImage($pdf, $langs, $param); + } } catch (Exception $e) { dol_syslog("Error when manipulating some PDF by onlineSign: " . $e->getMessage(), LOG_ERR); $response = $e->getMessage(); @@ -405,23 +457,17 @@ if ($action == "importSignature") { } } - // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF + if (!getDolGlobalString("FICHINTER_SIGNATURE_ON_ALL_PAGES")) { + // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF + // TODO Get position of box from PDF template + $param['xforimgstart'] = 111; + $param['yforimgstart'] = (empty($s['h']) ? 250 : $s['h'] - 60); + $param['wforimg'] = $s['w'] - ($param['xforimgstart'] + 16); + dolPrintSignatureImage($pdf, $langs, $param); + } - // TODO Get position of box from PDF template - $xforimgstart = 105; - $yforimgstart = (empty($s['h']) ? 250 : $s['h'] - 57); - - $wforimg = $s['w'] / 1 - ($xforimgstart + 16); - - $pdf->SetXY(111, 235 +25); - $pdf->SetFont($default_font, '', $default_font_size - 1); - $pdf->MultiCell($wforimg, 4, $langs->trans("DateSigning").': '.dol_print_date(dol_now(), "daytext", false, $langs, true), 0, 'L'); - $pdf->SetXY(111, $pdf->GetY()); - $pdf->MultiCell($wforimg, 4, $langs->trans("Lastname").': '.$online_sign_name, 0, 'L'); - - $pdf->Image($upload_dir.$filename, $xforimgstart, $yforimgstart, $wforimg, round($wforimg / 4)); //$pdf->Close(); $pdf->Output($newpdffilename, "F"); @@ -450,8 +496,7 @@ if ($action == "importSignature") { $object->fetch_thirdparty(); - $upload_dir = $conf->societe->multidir_output[$object->thirdparty->entity] . '/' - . dol_sanitizeFileName($object->thirdparty->id) . '/'; + $upload_dir = $conf->societe->multidir_output[$object->thirdparty->entity] . '/' . dol_sanitizeFileName($object->thirdparty->id) . '/'; $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance $default_font = pdf_getPDFFont($langs); // Must be after pdf_getInstance @@ -563,11 +608,18 @@ if ($action == "importSignature") { $yforimgstart = $yForDate - 5; $wforimg = $s['w'] - 20 - $xforimgstart; - $pdf->SetXY($xforimgstart, $yforimgstart + round($wforimg / 4)); - $pdf->MultiCell($wforimg, 4, $langs->trans("Lastname") . ': ' . $online_sign_name, 0, 'L'); + $param = array(); + $param['online_sign_name'] = $online_sign_name; + $param['pathtoimage'] = $upload_dir . $filename; // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF - $pdf->Image($upload_dir . $filename, $xforimgstart, $yforimgstart, $wforimg, round($wforimg / 4)); + // TODO Get position of box from PDF template + + $param['xforimgstart'] = $xforimgstart; + $param['yforimgstart'] = $yforimgstart; + $param['wforimg'] = $wforimg; + + dolPrintSignatureImage($pdf, $langs, $param); } //$pdf->Close(); $pdf->Output($newpdffilename, "F"); @@ -639,3 +691,32 @@ if ($error) { } echo $response; + + +/** + * Output the signature file + * + * @param TCPDF $pdf PDF handler + * @param Translate $langs Language + * @param array $params Array of params + * @return void + */ +function dolPrintSignatureImage(TCPDF $pdf, $langs, $params) +{ + $default_font_size = pdf_getPDFFontSize($langs); // Must be after pdf_getInstance + $default_font = pdf_getPDFFont($langs); // Must be + $xforimgstart = $params['xforimgstart']; + $yforimgstart = $params['yforimgstart']; + $wforimg = $params['wforimg']; + + $pdf->SetXY($xforimgstart, $yforimgstart + round($wforimg / 4) - 4); + $pdf->SetFont($default_font, '', $default_font_size - 1); + $pdf->SetTextColor(80, 80, 80); + $pdf->MultiCell($wforimg, 4, $langs->trans("Signature") . ': ' . dol_print_date(dol_now(), "day", false, $langs, true). ' - '.$params['online_sign_name'], 0, 'L'); + //$pdf->SetXY($xforimgstart, $yforimgstart + round($wforimg / 4)); + //$pdf->MultiCell($wforimg, 4, $langs->trans("Lastname") . ': ' . $online_sign_name, 0, 'L'); + + $pdf->Image($params['pathtoimage'], $xforimgstart, $yforimgstart, $wforimg, round($wforimg / 4)); + + return; +} diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e65226b13d1..b4e6eb4a02b 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5628,7 +5628,9 @@ abstract class CommonObject $file = $prefix."_".$modele.".modules.php"; } - // On verifie l'emplacement du modele + $file = dol_sanitizeFileName($file); + + // We chack if file exists $file = dol_buildpath($reldir.$modelspath.$file, 0); if (file_exists($file)) { $filefound = $file; @@ -5648,10 +5650,13 @@ abstract class CommonObject return -1; } - // If generator was found - global $db; // Required to solve a conception default making an include of code using $db instead of $this->db just after. + // Sanitize $filefound + $filefound = dol_sanitizePathName($filefound); - require_once $file; + // If generator was found + global $db; // Required to solve a conception default making an include of some code that uses $db instead of $this->db just after. + + require_once $filefound; $obj = new $classname($this->db); diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index 6df394cc8a3..69ee72acb2c 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -262,7 +262,7 @@ class RssParser libxml_use_internal_errors(false); libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only if LIBXML_VERSION < 20900 - $rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA|LIBXML_NOCDATA); + $rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA|LIBXML_NOENT); } else { if (!function_exists('xml_parser_create')) { $this->error = 'Function xml_parser_create are not supported by your PHP'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 375233024e4..f270ca3743a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1357,7 +1357,7 @@ function dol_sanitizeFileName($str, $newstr = '_', $unaccent = 1) } /** - * Clean a string to use it as a path name. + * Clean a string to use it as a path name. Similare to dol_sanitizeFileName but accept / and \ chars. * Replace also '--' and ' -' strings, they are used for parameters separation (Note: ' - ' is allowed). * * @param string $str String to clean diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index fd7fa66ba78..1449fb333f5 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -46,7 +46,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; */ function pdf_admin_prepare_head() { - global $langs, $conf, $user; + global $langs, $conf; $h = 0; $head = array(); diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index 81d90ec0edb..4eaaacb8cbb 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -159,8 +159,8 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1, $o } else { $out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.(isModEnabled('multicompany') ? (empty($obj->entity) ? '' : (int) $obj->entity) : ''), '0'); } - } else { - $securekeyseed = getDolGlobalString(dol_strtoupper($type).'ONLINE_SIGNATURE_SECURITY_TOKEN'); + } else { // For example $type = 'societe_rib' + $securekeyseed = getDolGlobalString(dol_strtoupper($type).'_ONLINE_SIGNATURE_SECURITY_TOKEN'); $out = $urltouse.'/public/onlinesign/newonlinesign.php?source='.$type.'&ref='.($mode ? '' : ''); if ($mode == 1) { $out .= $type.'_ref'; diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 62f8a74be14..bfbbb5e1b2e 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -549,14 +549,13 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->SetFont('', '', $default_font_size - 2); - $pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("DateOfSignature"), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("DateSigning"), 0, 'L', 0); $pdf->MultiCell(100, 3, ' '); $pdf->MultiCell(100, 3, '______________________', 0, 'L', 0); $posx = $this->xPosSignArea; $largcol = ($this->page_largeur - $this->marge_droite - $posx); - $useborder = 0; - $index = 0; + // Total HT $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($posx, $tab_top); diff --git a/htdocs/core/modules/modMrp.class.php b/htdocs/core/modules/modMrp.class.php index caf221bfd83..2139c2f0a91 100644 --- a/htdocs/core/modules/modMrp.class.php +++ b/htdocs/core/modules/modMrp.class.php @@ -135,7 +135,7 @@ class modMrp extends DolibarrModules // 2 => array('MRP_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1) // ); $this->const = array( - 1=>array('MRP_MO_ADDON_PDF', 'chaine', 'alpha', 'Name of PDF model of MO', 0), + //1=>array('MRP_MO_ADDON_PDF', 'chaine', 'vinci', 'Name of default PDF model of MO', 0), 2=>array('MRP_MO_ADDON', 'chaine', 'mod_mo_standard', 'Name of numbering rules of MO', 0), 3=>array('MRP_MO_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/mrps', '', 0) ); @@ -454,8 +454,8 @@ class modMrp extends DolibarrModules } $sql = array( - //"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape('standard')."' AND type = 'mo' AND entity = ".((int) $conf->entity), - //"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape('standard')."', 'mo', ".((int) $conf->entity).")" + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape('vinci')."' AND type = 'mrp' AND entity = ".((int) $conf->entity), + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape('vinci')."','mrp',".((int) $conf->entity).")" ); return $this->_init($sql, $options); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 5cec649c2dc..0f83b667b95 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1738,15 +1738,13 @@ class pdf_azur extends ModelePDFPropales protected function _signature_area(&$pdf, $object, $posy, $outputlangs) { // phpcs:enable - global $conf; $default_font_size = pdf_getPDFFontSize($outputlangs); $tab_top = $posy + 4; $tab_hl = 4; $posx = 120; $largcol = ($this->page_largeur - $this->marge_droite - $posx); - $useborder = 0; - $index = 0; + // Total HT $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($posx, $tab_top); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index db9f4da3703..1cda855a095 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1804,15 +1804,13 @@ class pdf_cyan extends ModelePDFPropales */ protected function drawSignatureArea(&$pdf, $object, $posy, $outputlangs) { - global $conf; $default_font_size = pdf_getPDFFontSize($outputlangs); $tab_top = $posy + 4; $tab_hl = 4; $posx = 120; $largcol = ($this->page_largeur - $this->marge_droite - $posx); - $useborder = 0; - $index = 0; + // Total HT $pdf->SetFillColor(255, 255, 255); $pdf->SetXY($posx, $tab_top); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index f274e22ad79..8c40379b67b 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -769,7 +769,6 @@ DisabledModules=Disabled modules For=For ForCustomer=For customer Signature=Signature -DateOfSignature=Date of signature HidePassword=Show command with password hidden UnHidePassword=Show real command with clear password Root=Root diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index 194e2ca0dcd..c50f6d27c3c 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -114,6 +114,7 @@ RefusePropal=Refuse proposal Sign=Sign SignContract=Sign contract SignFichinter=Sign intervention +SignSociete_rib=Sign mandate SignPropal=Accept proposal Signed=signed SignedOnly=Signed only diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index c78a27a646f..7495c44d4a0 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -160,7 +160,7 @@ if ($source == 'proposal') { $object = new CompanyBankAccount($db); $result= $object->fetch($ref); } else { - httponly_accessforbidden($langs->trans('ErrorBadParameters')." - Bad value for source", 400, 1); + httponly_accessforbidden($langs->trans('ErrorBadParameters')." - Bad value for source. Value not supported.", 400, 1); } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index fc7e4a23f10..f3974f89023 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2074,7 +2074,7 @@ td.showDragHandle { /*display: block; float: left; */ display: table-cell; - border-: 1px solid #E0E0E0; + border-: 1px solid #ECECEC; box-shadow: 3px 0 6px -2px #eee; background: var(--colorbackvmenu1); transition: left 0.5s ease; diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 9dc7bffff3f..5fa3ae5b937 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -201,33 +201,58 @@ if (!is_array($user_arbo) && $user_arbo < 0) { print ''; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } print ''; print ''; // Status print ''; - print ''; + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } print ''; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', '', '', 'maxwidthsearch '); + } print_liste_field_titre("HierarchicView"); print_liste_field_titre('', $_SERVER['PHP_SELF'], "", '', "", 'align="center"'); - print_liste_field_titre("Status", $_SERVER['PHP_SELF'], "", '', "", 'align="right"'); - print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', '', '', 'maxwidthsearch '); + print_liste_field_titre("Status", $_SERVER['PHP_SELF'], "", '', "", '', '', '', 'right '); + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', '', '', 'maxwidthsearch '); + } print ''; $nbofentries = (count($data) - 1); if ($nbofentries > 0) { - print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } + print ''; - print ''; + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } print ''; } else { print '';
'; + $searchpicto = $form->showFilterAndCheckAddButtons(0); + print $searchpicto; + print '  '; print $form->selectarray('search_statut', array('-1'=>'', '1'=>$langs->trans('Enabled')), $search_statut, 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); print ''; - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; - print ''; + $searchpicto = $form->showFilterAndCheckAddButtons(0); + print $searchpicto; + print '
'; + print '
'; tree_recur($data, $data[0], 0); print '