X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=templates%2Fdefault%2Foptions.tpl;h=e9cf2d5a92a9631ceaa5d26cb203c658c63a5dbc;hp=6f7368b5e54cb426d935d0f85b8c735150c68ae1;hb=55bfdc1ea645d335f791dea7b6139568c3027991;hpb=6c99d1de81366bceab6c9d6cf12179eedc81f9bc diff --git a/templates/default/options.tpl b/templates/default/options.tpl index 6f7368b5..e9cf2d5a 100644 --- a/templates/default/options.tpl +++ b/templates/default/options.tpl @@ -3,6 +3,12 @@ * options.tpl * * Template for rendering the options page + * + * The following variables are available to this template: + * $options - array of options as built by SquirrelMail. Important fields + * in this array include (but are not limited to): + * $el['name'] - The name of the option group + * $el['options'] - array of squirrelOption objects * * @copyright © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License @@ -13,28 +19,56 @@ /** add required includes */ - /** extract variables */ extract($t); + +if ( !empty($topmessage) ) { + echo "
\n$topmessage\n
\n\n"; +} ?> - - - - + +
\n"; -/** - * $Log$ - * Revision 1.3 2006/07/15 12:01:19 tokul - * removing trailing ?> from function scripts - * - * Revision 1.2 2006/07/13 18:49:44 tokul - * reverting some templating changes. They broke plugin blocks. - * moving display of option blocks to separate template - * - * Revision 1.1 2006/07/09 22:22:31 vanmer - * - initial revision of a template for options output - * - * -**/ + if (!empty($option['name'])) { + echo " \n" . + " \n" . + " ".$option['name']."\n" . + " \n" . + " \n"; + } + + foreach ($option['options'] as $opt) { + if ($opt->type != SMOPT_TYPE_HIDDEN) { + echo "\n" . + " \n "; + + if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX + || $opt->type == SMOPT_TYPE_BOOLEAN) { + echo ''; + } else { + echo $opt->caption; + } + + echo "\n \n" . + " \n" . + " ".$opt->createWidget()."\n" . + " \n" . + "\n"; + } else { + echo $opt->createWidget(); + } + } + + echo " \n \n" + . "     \n \n \n"; + + echo "\n"; +} +?> +