error out on nonexistant option type.
[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);
4a644734 24?>
64033e1c 25<div id="optionDisplay">
26<?php
27foreach ($options as $option) {
28 echo "<table cellspacing=\"0\">\n";
4a644734 29
64033e1c 30 if (!empty($option['name'])) {
31 echo " <tr>\n" .
32 " <td class=\"header1\" colspan=\"2\">\n" .
33 " ".$option['name']."\n" .
34 " </td>\n" .
35 " </tr>\n";
36 }
37
38 foreach ($option['options'] as $opt) {
39 if ($opt->type != SMOPT_TYPE_HIDDEN) {
40 echo "<tr>\n" .
41 " <td class=\"optionName\">\n" .
42 " ".$opt->caption."\n" .
43 " </td>\n" .
44 " <td class=\"optionValue\">\n" .
45 " ".$opt->createHTMLWidget()."\n" .
46 " </td>\n" .
47 "</tr>\n";
48 } else {
49 echo $opt->createHTMLWidget();
50 }
51 }
52
835db280 53 echo " <tr>\n <td colspan=\"2\" align=\"right\">\n"
54 . " <input type=\"submit\" value=\"" . _("Submit")
55 . "\" name=\"" . $submit_name . "\" />&nbsp;&nbsp;&nbsp;&nbsp;\n </td>\n </tr>\n";
56
64033e1c 57 echo "</table>\n";
58}
59?>
835db280 60</div>