mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +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(
|
||||
'text' => 'Text',
|
||||
'float' => 'Float',
|
||||
'label' => 'Label',
|
||||
'select' => 'Selectbox',
|
||||
'ajax_select' => 'Search',
|
||||
@ -312,6 +313,13 @@ class customfields_widget
|
||||
unset($radio);
|
||||
}
|
||||
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 'textarea' :
|
||||
case '' : // not set
|
||||
|
Loading…
Reference in New Issue
Block a user