Add support for decimal fields in form
[misc/kostenrechnung] / lib / mask.php
index ef67f0d..e3c7eab 100644 (file)
@@ -27,7 +27,8 @@ function build_form($name, $fields)
   $ret[] = sprintf('<input type="hidden" id="edit_source" name="source" value="%s">', $name);
 
   foreach ($fields as $id => $info) {
-    if ($info['type'] == 'text' || $info['type'] == 'passwd' || $info['type'] == 'number') {
+    if ($info['type'] == 'text' || $info['type'] == 'passwd' ||
+       $info['type'] == 'decimal' || $info['type'] == 'number') {
       $v = array('id="edit_'.$id.'"',
                 'name="'.$id.'"');
       $v[] = 'size="'.(empty($info['size'])?'10':$info['size']).'"';