added textarea

This commit is contained in:
Roland Gruber 2006-03-06 15:29:36 +00:00
parent cfbc6a2c2d
commit a8e5513218
2 changed files with 28 additions and 0 deletions

View File

@ -948,6 +948,22 @@ element.</li>
<li><span style="font-weight: bold;">text:</span> The text to
display.</li>
</ul>
<li><span style="font-weight: bold;">textarea:</span> Adds a
multiline text field.</li>
<ul>
<li><span style="font-weight: bold;">name:</span> The name of the
element, will be used later as variable name when user input is
returned.</li>
<li><span style="font-weight: bold;">rows:</span> Number of rows
(required)<br>
</li>
<li><span style="font-weight: bold;">cols:</span> Number of
characters for each line (required)<br>
</li>
<li><span style="font-weight: bold;">readonly:</span> Boolean
value, if true the text field will be read only.<br>
</li>
</ul>
<li><span style="font-weight: bold;">image:</span> Displays an image.</li>
<ul>
<li><span style="font-weight: bold;">path:</span> Path to the image</li>

View File

@ -592,6 +592,18 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindex
echo $output;
$ret[$input[$i][$j]['name']] = $type; // save type
break;
// text area
case 'textarea':
echo "<textarea";
if (isset($input[$i][$j]['name'])) echo ' name="' . $input[$i][$j]['name'] . '"';
if (isset($input[$i][$j]['readonly']) && (isset($input[$i][$j]['readonly']) === true)) echo ' readonly';
echo ' cols="' . $input[$i][$j]['cols'] . '"';
echo ' rows="' . $input[$i][$j]['rows'] . '"';
echo ">";
if (isset($values[$input[$i][$j]['name']])) echo $values[$input[$i][$j]['name']];
else echo $input[$i][$j]['value'];
echo "</textarea>";
break;
// inner fieldset
case 'fieldset':
echo "<fieldset>\n";