';
diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php
index 2c7d0063905..93c495077ec 100644
--- a/htdocs/core/actions_sendmails.inc.php
+++ b/htdocs/core/actions_sendmails.inc.php
@@ -22,7 +22,7 @@
*/
-// TODO Include this include file into all class objects
+// TODO Include this include file into all element pages allowing email sending
// $id must be defined
// $actiontypecode must be defined
@@ -92,7 +92,7 @@ if(! empty($_POST['removAll']))
/*
* Send mail
*/
-if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_POST['removAll'] && ! $_POST['removedfile'] && ! $_POST['cancel'])
+if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_POST['removAll'] && ! $_POST['removedfile'] && ! $_POST['cancel'] && !$_POST['modelselected'])
{
if($conf->dolimail->enabled) $langs->load("dolimail@dolimail");
$langs->load('mails');
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 5644b3c0137..0807bbcec75 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -1422,14 +1422,16 @@ class ExtraFields
return 0;
}
}
+
/**
* return array_options array for object by extrafields value (using for data send by forms)
*
- * @param array $extralabels $array of extrafields
- * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names)
- * @return int 1 if array_options set / 0 if no value
+ * @param array $extralabels $array of extrafields
+ * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names)
+ * @param string $keysuffix Suffix string to add into name and id of field (can be used to avoid duplicate names)
+ * @return int 1 if array_options set / 0 if no value
*/
- function getOptionalsFromPost($extralabels,$keyprefix='')
+ function getOptionalsFromPost($extralabels,$keyprefix='',$keysuffix='')
{
global $_POST;
@@ -1444,24 +1446,24 @@ class ExtraFields
if (in_array($key_type,array('date','datetime')))
{
// Clean parameters
- $value_key=dol_mktime($_POST["options_".$key.$keyprefix."hour"], $_POST["options_".$key.$keyprefix."min"], 0, $_POST["options_".$key.$keyprefix."month"], $_POST["options_".$key.$keyprefix."day"], $_POST["options_".$key.$keyprefix."year"]);
+ $value_key=dol_mktime($_POST[$keysuffix."options_".$key.$keyprefix."hour"], $_POST[$keysuffix."options_".$key.$keyprefix."min"], 0, $_POST[$keysuffix."options_".$key.$keyprefix."month"], $_POST[$keysuffix."options_".$key.$keyprefix."day"], $_POST[$keysuffix."options_".$key.$keyprefix."year"]);
}
else if (in_array($key_type,array('checkbox')))
{
- $value_arr=GETPOST("options_".$key.$keyprefix);
+ $value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
$value_key=implode($value_arr,',');
}
else if (in_array($key_type,array('price','double')))
{
- $value_arr=GETPOST("options_".$key.$keyprefix);
+ $value_arr=GETPOST($keysuffix."options_".$key.$keyprefix);
$value_key=price2num($value_arr);
}
else
{
- $value_key=GETPOST("options_".$key.$keyprefix);
+ $value_key=GETPOST($keysuffix."options_".$key.$keyprefix);
}
- $array_options["options_".$key]=$value_key; // No keyprefix here. keyprefix is used only for read.
+ $array_options[$keysuffix."options_".$key]=$value_key; // No keyprefix here. keyprefix is used only for read.
}
return $array_options;
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 0ab009d9957..bc831baeddf 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4406,7 +4406,7 @@ class Form
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
* @param array $array Array with key+value
* @param string|string[] $id Preselected key or preselected keys for multiselect
- * @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' ').
+ * @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' '), <0 to add an empty value with key that is this value.
* @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value"
* @param int $value_as_key 1 to use value as key
* @param string $moreparam Add more parameters onto the select tag
@@ -4455,7 +4455,7 @@ class Form
{
$textforempty=' ';
if (! empty($conf->use_javascript_ajax)) $textforempty=' '; // If we use ajaxcombo, we need here to avoid to have an empty element that is too small.
- $out.=''."\n"; // id is -2 because -1 is already "do not contact"
+ $out.=''."\n"; // id is -2 because -1 is already "do not contact"
}
if (is_array($array))
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 807f6759c51..bb632723b0b 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -789,7 +789,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
if (empty($leftmenu) || ($leftmenu == 'suppliers_bills')) {
$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills&search_status=0", $langs->trans("BillShortStatusDraft"),2,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
- $newmenu->add("/fourn/facture/impayees.php", $langs->trans("BillShortStatusNotPaid"),2,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
+ $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills&search_status=1", $langs->trans("BillShortStatusNotPaid"),2,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills&search_status=2", $langs->trans("BillShortStatusPaid"),2,$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
}
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index d93f1c4beea..dc8adddec39 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -305,7 +305,7 @@ if ($resql)
print '