Fix broken file downloads
[squirrelmail.git] / templates / default / options.tpl
CommitLineData
4a644734 1<?php
2/**
3 * options.tpl
4 *
5 * Template for rendering the options page
64033e1c 6 *
7 * The following variables are available to this template:
8 * $options - array of options as built by SquirrelMail. Important fields
9 * in this array include (but are not limited to):
10 * $el['name'] - The name of the option group
11 * $el['options'] - array of squirrelOption objects
4a644734 12 *
13 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
14 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
15 * @version $Id$
16 * @package squirrelmail
17 * @subpackage templates
18 */
19
20/** add required includes */
21
4a644734 22/** extract variables */
23extract($t);
209e24bb 24
25
26if ( !empty($topmessage) ) {
27 echo "<div id=\"optionMessage\">\n$topmessage\n</div>\n\n";
28}
4a644734 29?>
209e24bb 30
64033e1c 31<div id="optionDisplay">
32<?php
33foreach ($options as $option) {
34 echo "<table cellspacing=\"0\">\n";
4a644734 35
64033e1c 36 if (!empty($option['name'])) {
37 echo " <tr>\n" .
38 " <td class=\"header1\" colspan=\"2\">\n" .
39 " ".$option['name']."\n" .
40 " </td>\n" .
41 " </tr>\n";
42 }
43
ce910bca 44 $hidden_widgets = '';
64033e1c 45 foreach ($option['options'] as $opt) {
46 if ($opt->type != SMOPT_TYPE_HIDDEN) {
47 echo "<tr>\n" .
e40b0e8e 48 " <td class=\"optionName\"" . ($opt->caption_wrap ? '' : ' style="white-space:nowrap"') . ">\n ";
2eb944e8 49
3b6a455c 50 if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX
51 || $opt->type == SMOPT_TYPE_BOOLEAN) {
2eb944e8 52 echo '<label for="new_' . $opt->name . '">'
53 . $opt->caption . '</label>';
cb78a4d9 54 } else if ($opt->type == SMOPT_TYPE_TEXTAREA && !empty($opt->trailing_text)) {
e7d5cb0e 55 echo $opt->caption . '<br /><small>' . $opt->trailing_text . '</small>';
2eb944e8 56 } else {
57 echo $opt->caption;
58 }
59
60 echo "\n </td>\n" .
64033e1c 61 " <td class=\"optionValue\">\n" .
9786ea94 62 " ".$opt->createWidget()."\n" .
64033e1c 63 " </td>\n" .
64 "</tr>\n";
65 } else {
ce910bca 66 $hidden_widgets .= $opt->createWidget();
64033e1c 67 }
68 }
69
835db280 70 echo " <tr>\n <td colspan=\"2\" align=\"right\">\n"
ce910bca 71 . $hidden_widgets . " <input type=\"submit\" value=\"" . _("Submit")
835db280 72 . "\" name=\"" . $submit_name . "\" />&nbsp;&nbsp;&nbsp;&nbsp;\n </td>\n </tr>\n";
73
64033e1c 74 echo "</table>\n";
75}
76?>
835db280 77</div>