From 3b6a455c9af15582495ea5e55faacddc10700c29 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 5 Mar 2008 21:44:14 +0000 Subject: [PATCH 1/1] Boolean option widgets now default to checkboxes git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13004 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/options.php | 4 ++-- templates/default/options.tpl | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/functions/options.php b/functions/options.php index cb39ea7a..7c4892c0 100644 --- a/functions/options.php +++ b/functions/options.php @@ -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; diff --git a/templates/default/options.tpl b/templates/default/options.tpl index ecbb02a5..e9cf2d5a 100644 --- a/templates/default/options.tpl +++ b/templates/default/options.tpl @@ -46,10 +46,8 @@ foreach ($options as $option) { echo "\n" . " \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 ''; } else { -- 2.25.1