';
print ' ';
diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php
index efe6b261e83..5663e8c5987 100644
--- a/htdocs/product/class/html.formproduct.class.php
+++ b/htdocs/product/class/html.formproduct.class.php
@@ -286,15 +286,16 @@ class FormProduct
* pour l'instant on ne definit pas les unites dans la base
*
* @param string $name Name of HTML field
- * @param string $measuring_style Unit to show: weight, size, surface, volume
- * @param string $default Force unit
+ * @param string $measuring_style Unit to show: weight, size, surface, volume, time
+ * @param string $default Preselected value
* @param int $adddefault Add empty unit called "Default"
+ * @param int $mode 1=Use short label as value, 0=Use rowid
* @return void
*/
- public function select_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0)
+ public function select_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0, $mode = 0)
{
//phpcs:enable
- print $this->load_measuring_units($name, $measuring_style, $default, $adddefault);
+ print $this->load_measuring_units($name, $measuring_style, $default, $adddefault, $mode);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@@ -303,12 +304,13 @@ class FormProduct
* For the moment, units labels are defined in measuring_units_string
*
* @param string $name Name of HTML field
- * @param string $measuring_style Unit to show: weight, size, surface, volume
- * @param string $default Force unit
- * @param int $adddefault Add empty unit called "Default"
+ * @param string $measuring_style Unit to show: weight, size, surface, volume, time
+ * @param string $default Preselected value
+ * @param int $adddefault Add empty unit called "Default"
+ * @param int $mode 1=Use short label as value, 0=Use rowid
* @return string
*/
- public function load_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0)
+ public function load_measuring_units($name = 'measuring_units', $measuring_style = '', $default = '0', $adddefault = 0, $mode = 0)
{
//phpcs:enable
global $langs, $conf, $mysoc, $db;
@@ -337,12 +339,16 @@ class FormProduct
$return .= '';
foreach ($measuringUnits->records as $lines) {
- $return .= '';
- $return .= '>' . $langs->transnoentitiesnoconv($lines->label) . '';
+ $return .= '';
}
$return .= '';
}