6 * Template for constructing a textarea input tag.
8 * The following variables are available in this template:
9 * + $name - The name of the select input
10 * + $text - The initial value inside the textarea
11 * + $cols - The width of the textarea in characters
12 * + $rows - The height of the textarea in rows
13 * + $aAttribs - Any extra attributes: an associative array, where
14 * keys are attribute names, and values (which are
15 * optional and might be null) should be placed
16 * in double quotes as attribute values (optional;
19 * @copyright © 1999-2006 The SquirrelMail Project Team
20 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
22 * @package squirrelmail
23 * @subpackage templates
27 // retrieve the template vars
32 if (isset($aAttribs['id'])) {
33 $label_open = '<label for="' . $aAttribs['id'] . '">';
34 $label_close = '</label>';
41 echo '<textarea name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '"';
42 foreach ($aAttribs as $key => $value) {
43 echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
45 echo '>' . $label_open . $text . $label_close . "</textarea>\n";