|
@@ -74,10 +74,10 @@ class Form
|
|
|
*
|
|
|
* @param string $text Text of label or key to translate
|
|
|
* @param string $htmlname Name of select field ('edit' prefix will be added)
|
|
|
- * @param string $preselected Value to show/edit (not used in this function)
|
|
|
+ * @param string $preselected Value to show/edit (not used in this function)
|
|
|
* @param object $object Object
|
|
|
* @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field.
|
|
|
- * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
|
|
+ * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
|
|
* @param string $moreparam More param to add on a href URL*
|
|
|
* @param int $fieldrequired 1 if we want to show field as mandatory using the fieldrequired CSS.
|
|
|
* @return string HTML edit field
|
|
@@ -129,7 +129,7 @@ class Form
|
|
|
* @param string $value Value to show/edit
|
|
|
* @param object $object Object
|
|
|
* @param boolean $perm Permission to allow button to edit parameter
|
|
|
- * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'dayhour' or 'datepickerhour', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select:xxx'...)
|
|
|
+ * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datepickerhour', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select:xxx'...)
|
|
|
* @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value). Use '' to use same than $value
|
|
|
* @param object $extObject External object
|
|
|
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
|
@@ -254,7 +254,7 @@ class Form
|
|
|
* @param string $value Value to show/edit
|
|
|
* @param string $htmlname DIV ID (field name)
|
|
|
* @param int $condition Condition to edit
|
|
|
- * @param string $inputType Type of input ('string', 'numeric', 'datepicker', 'textarea:rows:cols', 'ckeditor:dolibarr_zzz:width:height:?:1:rows:cols', 'select:xxx')
|
|
|
+ * @param string $inputType Type of input ('string', 'numeric', 'datepicker' ('day' do not work, don't know why), 'textarea:rows:cols', 'ckeditor:dolibarr_zzz:width:height:?:1:rows:cols', 'select:xxx')
|
|
|
* @param string $editvalue When in edit mode, use this value as $value instead of value
|
|
|
* @param object $extObject External object
|
|
|
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
|
@@ -269,7 +269,7 @@ class Form
|
|
|
// Check parameters
|
|
|
if ($inputType == 'textarea') $value = dol_nl2br($value);
|
|
|
else if (preg_match('/^numeric/',$inputType)) $value = price($value);
|
|
|
- else if ($inputType == 'datepicker') $value = dol_print_date($value, 'day');
|
|
|
+ else if ($inputType == 'day' || $inputType == 'datepicker') $value = dol_print_date($value, 'day');
|
|
|
|
|
|
if ($condition)
|
|
|
{
|
|
@@ -302,7 +302,7 @@ class Form
|
|
|
if (! empty($tmp[2])) $savemethod=$tmp[2];
|
|
|
$out.= '<input id="width_'.$htmlname.'" value="'.$inputOption.'" type="hidden"/>'."\n";
|
|
|
}
|
|
|
- else if ((preg_match('/^datepicker/',$inputType)) || (preg_match('/^datehourpicker/',$inputType)))
|
|
|
+ else if ((preg_match('/^day$/',$inputType)) || (preg_match('/^datepicker/',$inputType)) || (preg_match('/^datehourpicker/',$inputType)))
|
|
|
{
|
|
|
$tmp=explode(':',$inputType);
|
|
|
$inputType=$tmp[0];
|