projects
/
misc
/
kostenrechnung
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0b718f3
)
Add support for textarea elements
author
Joey Schulze
<joey@infodrom.org>
Fri, 5 Mar 2010 08:03:49 +0000
(09:03 +0100)
committer
Joey Schulze
<joey@infodrom.org>
Fri, 5 Mar 2010 08:03:49 +0000
(09:03 +0100)
lib/mask.php
patch
|
blob
|
history
diff --git
a/lib/mask.php
b/lib/mask.php
index
beb7d5e
..
6791c47
100644
(file)
--- a/
lib/mask.php
+++ b/
lib/mask.php
@@
-61,6
+61,13
@@
function build_form($name, $mask)
foreach ($options as $row)
$ret[] = sprintf('<option value="%s">%s</option>', $row['id'], $row['text']);
$ret[] = '</select>';
foreach ($options as $row)
$ret[] = sprintf('<option value="%s">%s</option>', $row['id'], $row['text']);
$ret[] = '</select>';
+ } elseif ($info['type'] == 'textarea') {
+ $ret[] = sprintf('<label for="edit_%s">%s</label><br>', $id, $info['name']);
+ $v = array('id="edit_'.$id.'"',
+ 'name="'.$id.'"');
+ $v[] = sprintf('cols="%d"', empty($info['columns'])?'25':$info['columns']);
+ $v[] = sprintf('rows="%d"', empty($info['rows'])?'5':$info['columns']);
+ $ret[] = sprintf('<textarea %s></textarea>', implode(' ', $v));
}
if (array_key_exists('comment',$info))
$ret[] = sprintf('<span class="comment">%s</span>', $info['comment']);
}
if (array_key_exists('comment',$info))
$ret[] = sprintf('<span class="comment">%s</span>', $info['comment']);