From: kink Date: Sun, 24 May 2009 10:00:10 +0000 (+0000) Subject: add more labling for options pages X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;ds=sidebyside;h=a54c0e781d7cd72543b0d4a884fdd7912c72a67a;hp=82574ccf1d3b02744027df3392fb4ccf22089464;p=squirrelmail.git add more labling for options pages git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13755 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/forms.php b/functions/forms.php index 23215bb6..1218d7e8 100644 --- a/functions/forms.php +++ b/functions/forms.php @@ -190,6 +190,7 @@ function addSelect($sName, $aValues, $default = null, $bUsekeys = false, $aAttri . htmlspecialchars($v); } + if (! isset($aAttribs['id'])) $aAttribs['id'] = $sName; // make sure $default is an array, since multiple select lists // need the chance to have more than one default... @@ -292,6 +293,10 @@ function addTextArea($sName, $sText = '', $iCols = 40, $iRows = 10, $aAttribs = // add default css else if (!isset($aAttribs['class'])) $aAttribs['class'] = 'sqmtextarea'; + + if ( empty( $aAttribs['id'] ) ) { + $aAttribs['id'] = strtr($sName,'[]','__'); + } global $oTemplate; diff --git a/templates/default/options.tpl b/templates/default/options.tpl index 611dec73..47e14569 100644 --- a/templates/default/options.tpl +++ b/templates/default/options.tpl @@ -61,15 +61,11 @@ foreach ($option_groups as $option) { echo "\n" . " caption_wrap ? '' : ' style="white-space:nowrap"') . ">\n "; - if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX - || $opt->type == SMOPT_TYPE_BOOLEAN) { - echo ''; - } else if ($opt->type == SMOPT_TYPE_TEXTAREA && !empty($opt->trailing_text)) { - echo $opt->caption . '
' . $opt->trailing_text . ''; - } else { - echo $opt->caption; + echo ''; echo "\n \n" . " \n" .