mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Add custom field type 'Float'.
It understands options precision, min & max, so for example: precision=2 max=20
This commit is contained in:
parent
28eeaa0bdd
commit
c714b06848
@ -45,6 +45,7 @@ class customfields_widget
|
|||||||
*/
|
*/
|
||||||
var $cf_types = array(
|
var $cf_types = array(
|
||||||
'text' => 'Text',
|
'text' => 'Text',
|
||||||
|
'float' => 'Float',
|
||||||
'label' => 'Label',
|
'label' => 'Label',
|
||||||
'select' => 'Selectbox',
|
'select' => 'Selectbox',
|
||||||
'ajax_select' => 'Search',
|
'ajax_select' => 'Search',
|
||||||
@ -312,6 +313,13 @@ class customfields_widget
|
|||||||
unset($radio);
|
unset($radio);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'float':
|
||||||
|
$known_options = array('min'=>null, 'max'=>null,'size' => $field['len'], 'precision' => null);
|
||||||
|
$options = array_merge($known_options, $field['values']);
|
||||||
|
$input =& etemplate::empty_cell($field['type'],$this->prefix.$lname,array(
|
||||||
|
'size' => implode(',',$options)
|
||||||
|
));
|
||||||
|
break;
|
||||||
case 'text' :
|
case 'text' :
|
||||||
case 'textarea' :
|
case 'textarea' :
|
||||||
case '' : // not set
|
case '' : // not set
|
||||||
|
Loading…
Reference in New Issue
Block a user