git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13755
7612ce4b-ef26-0410-bec9-
ea0150e637f0
. htmlspecialchars($v);
}
. 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...
// make sure $default is an array, since multiple select lists
// need the chance to have more than one default...
// add default css
else if (!isset($aAttribs['class'])) $aAttribs['class'] = 'sqmtextarea';
// add default css
else if (!isset($aAttribs['class'])) $aAttribs['class'] = 'sqmtextarea';
+
+ if ( empty( $aAttribs['id'] ) ) {
+ $aAttribs['id'] = strtr($sName,'[]','__');
+ }
echo "<tr>\n" .
" <td class=\"optionName\"" . ($opt->caption_wrap ? '' : ' style="white-space:nowrap"') . ">\n ";
echo "<tr>\n" .
" <td class=\"optionName\"" . ($opt->caption_wrap ? '' : ' style="white-space:nowrap"') . ">\n ";
- if ($opt->type == SMOPT_TYPE_BOOLEAN_CHECKBOX
- || $opt->type == SMOPT_TYPE_BOOLEAN) {
- echo '<label for="new_' . $opt->name . '">'
- . $opt->caption . '</label>';
- } else if ($opt->type == SMOPT_TYPE_TEXTAREA && !empty($opt->trailing_text)) {
- echo $opt->caption . '<br /><small>' . $opt->trailing_text . '</small>';
- } else {
- echo $opt->caption;
+ echo '<label for="new_' . $opt->name . '">' . $opt->caption;
+ if ($opt->type == SMOPT_TYPE_TEXTAREA && !empty($opt->trailing_text)) {
+ echo '<br /><small>' . $opt->trailing_text . '</small>';
echo "\n </td>\n" .
" <td class=\"optionValue\">\n" .
echo "\n </td>\n" .
" <td class=\"optionValue\">\n" .