projects
/
misc
/
kostenrechnung
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2360906
)
Support empty first fields
author
Joey Schulze
<joey@infodrom.org>
Fri, 12 Mar 2010 13:41:45 +0000
(14:41 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Fri, 12 Mar 2010 13:41:45 +0000
(14:41 +0100)
lib/mask.php
patch
|
blob
|
history
diff --git
a/lib/mask.php
b/lib/mask.php
index
eb64b46
..
3ba8e77
100644
(file)
--- a/
lib/mask.php
+++ b/
lib/mask.php
@@
-67,6
+67,9
@@
function build_form($name, $mask)
$ret[] = sprintf('<label for="edit_%s">%s</label><br>', $id, $info['name']);
$ret[] = sprintf('<select %s>', implode(' ', $v));
+ if (array_key_exists('option_empty',$info))
+ $ret[] = sprintf('<option value="">%s</option>',
+ $info['option_empty']);
if (is_array($info['options'])) $options = $info['options'];
else $options = query_db($info['options']);
foreach ($options as $row)