Boolean option widgets now default to checkboxes
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 5 Mar 2008 21:44:14 +0000 (21:44 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 5 Mar 2008 21:44:14 +0000 (21:44 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13004 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/options.php
templates/default/options.tpl

index cb39ea7a76a1822542eb0d9f12b91b1de533aec1..7c4892c0cf4b424d15a8b8f1c26f4fd0fdae9574 100644 (file)
@@ -549,12 +549,12 @@ class SquirrelOption {
      *                          constructed as a checkbox,
      *                          otherwise it will be a set of
      *                          Yes/No radio buttons (OPTIONAL;
-     *                          default is FALSE (radio buttons)).
+     *                          default is TRUE (checkbox)).
      *
      * @return string html formated boolean widget
      *
      */
-    function createWidget_Boolean($checkbox=FALSE) {
+    function createWidget_Boolean($checkbox=TRUE) {
 
         global $oTemplate, $nbsp;
 
index ecbb02a50fc67b007df968e528a5de09cffeda75..e9cf2d5a92a9631ceaa5d26cb203c658c63a5dbc 100644 (file)
@@ -46,10 +46,8 @@ foreach ($options as $option) {
             echo   "<tr>\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) {
+            if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX
+             || $opt->type == SMOPT_TYPE_BOOLEAN) {
                 echo '<label for="new_' . $opt->name . '">'
                    . $opt->caption . '</label>';
             } else {