X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=templates%2Fdefault%2Foptions.tpl;h=7c02e992a32fbbc8c111cbfe70aaa2fe0d45de00;hb=f2785d1147920588b40e8a34e3c980697e08748f;hp=8f683f04ee5a814fb947319f76f447754286d57c;hpb=2de8b87fad334dde39eedb9254879365a66a3f44;p=squirrelmail.git diff --git a/templates/default/options.tpl b/templates/default/options.tpl index 8f683f04..7c02e992 100644 --- a/templates/default/options.tpl +++ b/templates/default/options.tpl @@ -3,8 +3,15 @@ * options.tpl * * Template for rendering the options page + * + * The following variables are available to this template: + * $option_groups - array of option groups and their options as + * built by SquirrelMail. Important fields + * in this array include (but are not limited to): + * ['name'] - The name of the option group + * ['options'] - array of squirrelOption objects * - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright 1999-2016 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -13,26 +20,68 @@ /** add required includes */ - /** extract variables */ extract($t); + +if ( !empty($topmessage) ) { + echo "
\n$topmessage\n
\n\n"; +} ?> - - - - + +
\n"; -/** - * $Log$ - * 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 - * - * -**/ -?> \ No newline at end of file + if (!empty($option['name'])) { + echo " \n" . + " \n" . + " ".$option['name']."\n" . + " \n" . + " \n"; + } + + $hidden_widgets = ''; + foreach ($option['options'] as $opt) { + if ($opt->type == SMOPT_TYPE_INFO) { + echo "\n" + . " \n" + . " \n" + . " \n" + . " \n" + . " \n" + . "
\n" + . $opt->createWidget() . "\n" + . "
\n" + . " \n" + . "\n"; + + } else if ($opt->type != SMOPT_TYPE_HIDDEN) { + echo "\n" . + " caption_wrap ? '' : ' style="white-space:nowrap"') . ">\n "; + + echo ''; + + echo "\n \n" . + " \n" . + " ".$opt->createWidget()."\n" . + " \n" . + "\n"; + } else { + $hidden_widgets .= $opt->createWidget(); + } + } + + echo " \n \n" + . $hidden_widgets . "     \n \n \n"; + + echo "\n"; +} +?> +