6 * Template for constructing an input tag.
8 * The following variables are available in this template:
9 * + $type - The type of input tag being created
10 * + $aAttribs - Any extra attributes: an associative array, where
11 * keys are attribute names, and values (which are
12 * optional and might be null) should be placed
13 * in double quotes as attribute values (optional;
16 * @copyright 1999-2013 The SquirrelMail Project Team
17 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
19 * @package squirrelmail
20 * @subpackage templates
24 // retrieve the template vars
29 echo '<input type="' . $type . '"';
30 foreach ($aAttribs as $key => $value) {
31 //TODO: see the FIXME tag on line 68 of functions/forms.php - the sm_encode_html_special_chars() below should be migrated to the template class
32 echo ' ' . $key . (is_null($value) ? '' : '="' . sm_encode_html_special_chars($value) . '"');