Merge remote-tracking branch 'origin/3.4' into develop

This commit is contained in:
Laurent Destailleur 2013-06-10 17:01:24 +02:00
commit a925d8d535
2 changed files with 16 additions and 3 deletions

View File

@ -622,7 +622,7 @@ class ExtraFields
$out = $formstat->select_date($value, 'options_'.$key, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); $out = $formstat->select_date($value, 'options_'.$key, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1);
//$out='<input type="text" name="options_'.$key.'" size="'.$showsize.'" maxlength="'.$newsize.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>'; //$out='<input type="text" name="options_'.$key.'" size="'.$showsize.'" maxlength="'.$newsize.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>';
} }
elseif (in_array($type,array('int','double'))) elseif (in_array($type,array('int')))
{ {
$tmp=explode(',',$size); $tmp=explode(',',$size);
$newsize=$tmp[0]; $newsize=$tmp[0];
@ -660,6 +660,10 @@ class ExtraFields
{ {
$out='<input type="text" name="options_'.$key.'" size="6" value="'.price($value).'"> '.$langs->getCurrencySymbol($conf->currency); $out='<input type="text" name="options_'.$key.'" size="6" value="'.price($value).'"> '.$langs->getCurrencySymbol($conf->currency);
} }
elseif ($type == 'double')
{
$out='<input type="text" name="options_'.$key.'" size="6" value="'.price($value).'"> ';
}
elseif ($type == 'select') elseif ($type == 'select')
{ {
$out='<select name="options_'.$key.'">'; $out='<select name="options_'.$key.'">';
@ -790,6 +794,10 @@ class ExtraFields
{ {
$showsize=10; $showsize=10;
} }
elseif ($type == 'double')
{
$value=price($value);
}
elseif ($type == 'boolean') elseif ($type == 'boolean')
{ {
$checked=''; $checked='';
@ -900,6 +908,11 @@ class ExtraFields
$value_arr=GETPOST("options_".$key); $value_arr=GETPOST("options_".$key);
$value_key=implode($value_arr,','); $value_key=implode($value_arr,',');
} }
else if (in_array($key_type,array('price','double')))
{
$value_arr=GETPOST("options_".$key);
$value_key=price2num($value_arr);
}
else else
{ {
$value_key=GETPOST("options_".$key); $value_key=GETPOST("options_".$key);

View File

@ -421,8 +421,8 @@ function print_end_menu_array()
* Core function to output left menu eldy * Core function to output left menu eldy
* *
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
* @param array $menu_array_before Table of menu entries to show before entries of menu handler * @param array $menu_array_before Table of menu entries to show before entries of menu handler (menu->liste filled with menu->add)
* @param array $menu_array_after Table of menu entries to show after entries of menu handler * @param array $menu_array_after Table of menu entries to show after entries of menu handler (menu->liste filled with menu->add)
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) * @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
* @param array &$menu Object Menu to return back list of menu entries * @param array &$menu Object Menu to return back list of menu entries
* @param int $noout Disable output (Initialise &$menu only). * @param int $noout Disable output (Initialise &$menu only).