Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
ldestailleur
2025-08-09 14:09:21 +02:00
19 changed files with 110 additions and 115 deletions

View File

@@ -2898,9 +2898,10 @@ function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0
* @param int $limittoshow Limit number of tabs to show. Use 0 to use automatic default value.
* @param string $moretabssuffix A suffix to use when you have several dol_get_fiche_head() in same page
* @param int $dragdropfile 0 (default) or 1. 1 enable a drop zone for file to be upload, 0 disable it
* @param string $morecssdiv More CSS on the div
* @return string
*/
function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0, $moretabssuffix = '', $dragdropfile = 0)
function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0, $moretabssuffix = '', $dragdropfile = 0, $morecssdiv = '')
{
global $conf, $langs, $hookmanager;
@@ -3060,8 +3061,9 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
}
if (!$notab || $notab == -1 || $notab == -2 || $notab == -3 || $notab == -4) {
$out .= "\n" . '<div id="dragDropAreaTabBar" class="tabBar' . ($notab == -1 ? '' : ($notab == -2 ? ' tabBarNoTop' : ((($notab == -3 || $notab == -4) ? ' noborderbottom' : '') . ($notab == -4 ? '' : ' tabBarWithBottom'))));
$out .= '">' . "\n";
$out .= "\n".'<div id="dragDropAreaTabBar" class="tabBar'.($notab == -1 ? '' : ($notab == -2 ? ' tabBarNoTop' : ((($notab == -3 || $notab == -4) ? ' noborderbottom' : '').($notab == -4 ? '' : ' tabBarWithBottom'))));
$out .= ($morecssdiv ? ' '.$morecssdiv : '');
$out .= '">'."\n";
}
if (!empty($dragdropfile)) {
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
@@ -13959,17 +13961,15 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
* @param string $label Label or tooltip of button if $text is provided. Also used as tooltip in title attribute. Can be escaped HTML content or full simple text.
* @param string $text Optional : short label on button. Can be escaped HTML content or full simple text.
* @param string $actionType 'default', 'danger', 'email', 'clone', 'cancel', 'delete', ...
*
* @param string|array<int,array{lang:string,enabled:bool,perm:bool,label:string,url:string,urlroot?:string,isDropDown?:int<0,1>}> $url Url for link or array of subbutton description
*
* Example when an array is used:
* $arrayforbutaction = array(
* 10 => array('attr' => array('class'=>''), 'lang'=>'propal', 'enabled'=>isModEnabled("propal"), 'perm'=>$user->hasRight('propal', 'creer'), 'label' => 'AddProp', 'url'=>'/comm/propal/card.php?action=create&amp;projectid='.$object->id.'&amp;socid='.$object->socid),
* 20 => array('attr' => array('class'=>''), 'lang'=>'mymodule', 'enabled'=>isModEnabled("mymodule"), 'perm'=>$user->hasRight('mymodule', 'write'), 'label' => 'MyModuleAction', 'urlroot'=>dol_build_patch('/mymodule/mypage.php?action=create')),
* 30 => array('attr' => array('class'=>''), 'lang'=>'mymodule', 'enabled'=>isModEnabled("mymodule"), 'perm'=>$user->hasRight('mymodule', 'write'), 'label' => 'MyModuleOtherAction', 'urlraw' => '# || external Url || javascript: || tel: || mailto:' ),
* ); );
* @param string|array<int,array{lang:string,enabled:bool,perm:bool|int,label:string,url:string,urlroot?:string,isDropDown?:int<0,1>}> $url Url for link or array of subbutton description
* Example when an array is used:
* $arrayforbutaction = array(
* 10 => array('attr' => array('class'=>''), 'lang'=>'propal', 'enabled'=>isModEnabled("propal"), 'perm'=>$user->hasRight('propal', 'creer'), 'label' => 'AddProp', 'url'=>'/comm/propal/card.php?action=create&amp;projectid='.$object->id.'&amp;socid='.$object->socid),
* 20 => array('attr' => array('class'=>''), 'lang'=>'mymodule', 'enabled'=>isModEnabled("mymodule"), 'perm'=>$user->hasRight('mymodule', 'write'), 'label' => 'MyModuleAction', 'urlroot'=>dol_build_patch('/mymodule/mypage.php?action=create')),
* 30 => array('attr' => array('class'=>''), 'lang'=>'mymodule', 'enabled'=>isModEnabled("mymodule"), 'perm'=>$user->hasRight('mymodule', 'write'), 'label' => 'MyModuleOtherAction', 'urlraw' => '# || external Url || javascript: || tel: || mailto:' ),
* ); );
* @param string $id Attribute id of action button. Example 'action-delete'. This can be used for full ajax confirm if this code is reused into the ->formconfirm() method.
* @param int|boolean $userRight User action right. Use 0 if user has no permission. It will add the message "No permission" on tooltip. Use -1 to have button not allowed without adding the message (because an explicit label is already set).
* @param bool|int $userRight User action right. Use 0 if user has no permission. It will add the message "No permission" on tooltip. Use -1 to have button not allowed without adding the message (because an explicit label is already set).
* // phpcs:disable
* @param array{confirm?:array{url?:string,title?:string,content?:string,use_unsecured_unescapedattr?:bool|string[],action-btn-label?:string,cancel-btn-label?:string,modal?:bool},attr?:array<string,mixed>,areDropdownButtons?:bool,backtopage?:string,lang?:string,enabled?:bool,perm?:int<0,1>,label?:string,url?:string,isDropdown?:int<0,1>,isDropDown?:int<0,1>} $params = [ // Various params for future : recommended rather than adding more function arguments
* 'attr' => [ // to add or override button attributes
@@ -13988,7 +13988,6 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
* ],
* ]
* // phpcs:enable
* Example: array('attr' => array('class' => 'reposition'))
* @return string html button
*/
function dolGetButtonAction($label, $text = '', $actionType = 'default', $url = '', $id = '', $userRight = 1, $params = array())
@@ -15104,7 +15103,7 @@ function finishSimpleTable($addLineBreak = false)
* @param integer $nbofloop (optional) The maximum count of rows thaht the table show (when it is zero (0) no summary line will show, expect "$noneWord" when $num === 0)
* @param integer $total (optional) The total value thaht is shown after when the table has minimum of one entire
* @param string $noneWord (optional) The word that is shown when the table has no entries ($num === 0)
* @param boolean $extraRightColumn (optional) Add a additional column after the summary word and total number
* @param bool $extraRightColumn (optional) Add a additional column after the summary word and total number
* @return void
*/
function addSummaryTableLine($tableColumnCount, $num, $nbofloop = 0, $total = 0, $noneWord = "None", $extraRightColumn = false)