Make the caption for checkboxes a label for the checkbox
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 5 Mar 2008 21:07:41 +0000 (21:07 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 5 Mar 2008 21:07:41 +0000 (21:07 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13003 7612ce4b-ef26-0410-bec9-ea0150e637f0

templates/default/options.tpl

index e205bbaafa634f634b8ff8bd52cf3fdbbcea983a..ecbb02a50fc67b007df968e528a5de09cffeda75 100644 (file)
@@ -44,9 +44,19 @@ foreach ($options as $option) {
     foreach ($option['options'] as $opt) {
         if ($opt->type != SMOPT_TYPE_HIDDEN) {
             echo   "<tr>\n" .
-                   " <td class=\"optionName\">\n" .
-                   "  ".$opt->caption."\n" .
-                   " </td>\n" .
+                   " <td class=\"optionName\">\n  ";
+
+//FIXME: use the following two lines instead if we make the default boolean type checkbox
+            //if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX
+            // || $opt->type == SMOPT_TYPE_BOOLEAN) {
+            if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX) {
+                echo '<label for="new_' . $opt->name . '">'
+                   . $opt->caption . '</label>';
+            } else {
+                echo $opt->caption;
+            }
+
+            echo   "\n </td>\n" .
                    " <td class=\"optionValue\">\n" .
                    "  ".$opt->createWidget()."\n" .
                    " </td>\n" .