Skip to content

Commit c680ec6

Browse files
committed
Merge branch '24.0' of git@github.com:Dolibarr/dolibarr.git into develop
2 parents 423d760 + a9a0e51 commit c680ec6

6 files changed

Lines changed: 30 additions & 18 deletions

File tree

htdocs/commande/card.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
$cancel = GETPOST('cancel', 'alpha');
100100
$confirm = GETPOST('confirm', 'alpha');
101101
$backtopage = GETPOST('backtopage', 'alpha');
102+
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
102103

103104
$lineid = GETPOSTINT('lineid');
104105
$contactid = GETPOSTINT('contactid');

htdocs/compta/facture/class/facture.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2817,6 +2817,7 @@ public function update(User $user, $notrigger = 0)
28172817
}
28182818

28192819
// Update request
2820+
// TODO Use the invoice->update() method.
28202821
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET";
28212822
$sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").",";
28222823
$sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").",";
@@ -2829,7 +2830,7 @@ public function update(User $user, $notrigger = 0)
28292830
$sql .= " datef=".(strval($this->date) != '' ? "'".$this->db->idate($this->date)."'" : 'null').",";
28302831
$sql .= " date_pointoftax=".(strval($this->date_pointoftax) != '' ? "'".$this->db->idate($this->date_pointoftax)."'" : 'null').",";
28312832
$sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').",";
2832-
$sql .= " paye=".(isset($this->paye) ? $this->db->escape((string) $this->paye) : 0).",";
2833+
$sql .= " paye=".(isset($this->paye) ? ((int) $this->paye) : 0).",";
28332834
$sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").",";
28342835
$sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").",";
28352836
$sql .= " total_tva=".((float) $this->total_tva).",";

htdocs/core/class/html.formother.class.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,22 +1335,23 @@ public static function getBoxesArea($user, $areacode)
13351335
//var_dump($boxidactivatedforuser);
13361336

13371337
// Class Form must have been already loaded
1338+
$widthforwidget = 'width200';
13381339
$selectboxlist .= '<!-- Form with select box list -->'."\n";
1339-
$selectboxlist .= '<form id="addbox" name="addbox" method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
1340+
$selectboxlist .= '<form id="addbox" class="parentonrightofpage" name="addbox" method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
13401341
$selectboxlist .= '<input type="hidden" name="token" value="'.newToken().'">';
13411342
$selectboxlist .= '<input type="hidden" name="addbox" value="addbox">';
13421343
$selectboxlist .= '<input type="hidden" name="userid" value="'.$user->id.'">';
13431344
$selectboxlist .= '<input type="hidden" name="areacode" value="'.$areacode.'">';
13441345
$selectboxlist .= '<input type="hidden" name="boxorder" value="'.$boxorder.'">';
1345-
$selectboxlist .= Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'noborderfocus selectwidget maxwidth300 hideonprint', 0, 'hidden selected', 0, 0);
1346+
$selectboxlist .= Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'noborderfocus selectwidget max'.$widthforwidget.' hideonprint onrightofpage', 0, 'hidden selected', 0, 0);
1347+
if (!empty($conf->use_javascript_ajax)) {
1348+
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
1349+
$selectboxlist .= ajax_combobox("boxcombo", array(), 0, 0, 'resolve', '-1', 'onrightofpage '.$widthforwidget);
1350+
}
13461351
if (empty($conf->use_javascript_ajax)) {
13471352
$selectboxlist .= ' <input type="submit" class="button" value="'.$langs->trans("AddBox").'">';
13481353
}
13491354
$selectboxlist .= '</form>';
1350-
if (!empty($conf->use_javascript_ajax)) {
1351-
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
1352-
$selectboxlist .= ajax_combobox("boxcombo");
1353-
}
13541355
}
13551356

13561357
// Javascript code for dynamic actions

htdocs/core/lib/ajax.lib.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,13 +503,16 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete =
503503
$moreselect2theme = preg_replace('/widthcentpercentminus[^\s]*/', '', $moreselect2theme);
504504

505505
$tmpplugin = 'select2';
506+
$componentname = (preg_match('/^\./', $htmlname) ? $htmlname : '#'.$htmlname); // To support when htmlname is not an ID but a class
506507
$msg = "\n";
507508
$msg .= '<!-- JS CODE TO ENABLE '.$tmpplugin.' for id = '.$htmlname.' -->'."\n";
508509
$msg .= "<script>\n";
509510
$msg .= '$(document).ready(function () {
510-
$(\''.(dol_escape_js(preg_match('/^\./', $htmlname) ? $htmlname : '#'.$htmlname)).'\').'.$tmpplugin.'({';
511-
if (preg_match('/onrightofpage/', $morecss)) { // when $morecss contains 'onrightofpage', the select2 component must also be inside a parent with class="parentonrightofpage"
512-
$msg .= ' dropdownAutoWidth: true, dropdownParent: $(\'#'.$htmlname.'\').parent(), '."\n";
511+
$(\''.dol_escape_js($componentname).'\').'.$tmpplugin.'({';
512+
// when $morecss contains 'onrightofpage', the select2 component must also be inside a parent with class="parentonrightofpage"
513+
if (preg_match('/onrightofpage/', $morecss)) { // In this cas, htmlname must be an ID not a class.
514+
$msg .= ' dropdownAutoWidth: true, ';
515+
$msg .= ' dropdownParent: $(\'#'.$htmlname.'\').parent(), ';
513516
}
514517
$msg .= '
515518
dir: \'ltr\',

htdocs/theme/eldy/global.inc.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3071,12 +3071,12 @@
30713071
}
30723072
.pictofixedwidth {
30733073
text-align: start;
3074-
width: 22px; /* Do not use em unit here */
3074+
width: 22px; /* Do not use em unit here, it varies on font size */
30753075
/* padding-right: 0; */
30763076
}
30773077
img.pictofixedwidth {
3078-
width: 16px; /* Do not use em unit here */
3079-
padding-right: 6px; /* width of img + padding-right must be equal to width of .pictofixedwidth */
3078+
width: 16px; /* Do not use em unit here, it varies on font size */
3079+
padding-right: 6px; /* img width + img padding-right must be equal to width of .pictofixedwidth */
30803080
margin-right: 4px;
30813081
}
30823082

@@ -8010,11 +8010,11 @@
80108010
}
80118011
span.select2-dropdown--below {
80128012
margin-top: -1px;
8013-
min-width: 100px;
8013+
min-width: 200px;
80148014
}
80158015
span.select2-dropdown--above {
80168016
margin-bottom: -1px;
8017-
min-width: 100px;
8017+
min-width: 200px;
80188018
}
80198019

80208020
.parentonrightofpage {
@@ -9535,9 +9535,15 @@
95359535

95369536
.pictofixedwidth {
95379537
text-align: start;
9538-
width: 1.5em;
9539-
/* padding-right: 0; */
9538+
width: 1.2rem; /* Do not use em unit here, it varies on font size */
9539+
padding-right: 0.2rem;
9540+
}
9541+
img.pictofixedwidth {
9542+
width: 1.2rem; /* Do not use em unit here, it varies on font size */
9543+
padding-right: 0.2rem; /* img width + img padding-right must be equal to width + padding-right of .pictofixedwidth */
9544+
margin-right: 4px;
95409545
}
9546+
95419547
table.titlemodulehelp tr td img.widthpictotitle {
95429548
width: 1.5em;
95439549
}

htdocs/theme/eldy/info-box.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
background: var(--colorbacklineimpair2);
4646
width: 100%;
4747
<?php
48-
if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2) { ?>
48+
if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2 && empty($conf->dol_optimize_smallscreen)) { ?>
4949
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
5050
<?php } ?>
5151
border-radius: 5px;

0 commit comments

Comments
 (0)