in PHP configuration (#1518885).
- Make the default attachment dir /var/local/squirrelmail/attach, not
$data_dir.
+ - Add HTML labels for form elements.
Version 1.5.1 (branched on 2006-02-12)
--------------------------------------
$td_str .= $add ;
return html_tag( 'tr' ,
- html_tag( 'td', $label . ':', 'right', $color[4]) .
+ html_tag( 'td', '<label for="'.$name.'_'.$field.'_'.'">' .
+ $label . '</label>:', 'right', $color[4]) .
html_tag( 'td', $td_str, 'left', $color[4])
)
. "\n";
html_tag( 'td', '', 'center', $color[4] ) .
addForm('folders.php').
addHidden('smaction', 'rename').
- _("New name:").
+ '<label for="new_name">' . _("New name:") . '</label>' .
'<br /><b>' . htmlspecialchars($old_parent) . '</b>' .
addInput('new_name', $old_name, 25) . '<br /><br />' . "\n";
if ( $isfolder ) {
}
-?>
\ No newline at end of file
+?>
'" method="post">' . "\n" .
html_tag( 'table', '', '', '', 'border="0" width="100%" height="100%"' ) .
html_tag( 'tr' ) .
- html_tag( 'td', ' <strong>' . _("Search for") . "</strong>\n", 'left', '', 'style="white-space: nowrap;" valign="middle" width="10%"' ) .
+ html_tag( 'td', ' <strong><label for="query">' . _("Search for") .
+ "</label></strong>\n", 'left', '',
+ 'style="white-space: nowrap;" valign="middle" width="10%"' ) .
html_tag( 'td', '', 'left', '', '' ) .
addInput('query', $query, 28);
/* List all backends to allow the user to choose where to search */
if ($abook->numbackends > 1) {
- echo '<strong>' . _("in") . '</strong> '."\n";
+ echo '<strong><label for="backend">' . _("in") . '</label></strong> '."\n";
$selopts = array();
$selopts['-1'] = _("All address books");
}
}
$oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
+?>
}
echo html_tag( 'tr', '', '', $tr_bgcolor);
if ($abook->backends[$row['backend']]->writeable) {
+ $id = $row['backend'].':'.$row['nickname'];
echo html_tag( 'td',
'<small>' .
- addCheckBox('sel[]', $selected, $row['backend'].':'.$row['nickname']).
+ addCheckBox("sel[$id]", $selected, $id).
'</small>' ,
'center', '', 'valign="top" width="1%"' );
+ $label1 = '<label for="sel_'.$id.'_">'; $label2='</label>';
} else {
echo html_tag( 'td',
' ' ,
'center', '', 'valign="top" width="1%"' );
+ $label1 = $label2 = '';
}
echo html_tag( 'td',
- ' ' . htmlspecialchars($row['nickname']) . ' ',
+ ' ' . $label1 . htmlspecialchars($row['nickname']) . $label2 . ' ',
'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' );
echo html_tag( 'td',
- ' ' . htmlspecialchars($row['name']) . ' ',
+ ' ' . $label1 . htmlspecialchars($row['name']) . $label2 . ' ',
'left', '', 'valign="top" width="1%" style="white-space: nowrap;"' );
// email address column
do_hook('addressbook_bottom');
echo "\n<!-- end of addressbook_bottom hook-->\n";
$oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
+?>
}
echo ' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4], 'width="10%"' ) .
- _("From:") . '</td>' . "\n" .
+ '<label for="identity">' . _("From:") . '</label></td>' . "\n" .
html_tag( 'td', '', 'left', $color[4], 'width="90%"' ) .
' '.
addSelect('identity', $ident_list, $identity, TRUE);
echo ' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4], 'width="10%"' ) .
- _("To") . ':</td>' . "\n" .
+ '<label for="send_to">' . _("To") . '</label>:</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4], 'width="90%"' ) .
addInput('send_to', $send_to, 60, 0, $onfocus_array). '<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("Cc") . ':</td>' . "\n" .
+ '<label for="send_to_cc">' . _("Cc") . '</label>:</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) .
addInput('send_to_cc', $send_to_cc, 60, 0, $onfocus_array). '<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("Bcc") . ':</td>' . "\n" .
+ '<label for="send_to_bcc">' . _("Bcc") . '</label>:</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) .
addInput('send_to_bcc', $send_to_bcc, 60, 0, $onfocus_array).'<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("Subject") . ':</td>' . "\n" .
+ '<label for="subject">' . _("Subject") . '</label>:</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) . "\n";
echo ' '.addInput('subject', $subject, 60, 0, $onfocus_array).
' </td>' . "\n" .
if(!isset($mailprio)) {
$mailprio = '3';
}
- echo ' ' . _("Priority") .
+ echo ' <label for="mailprio">' . _("Priority") . '</label>: '.
addSelect('mailprio', array(
'1' => _("High"),
'3' => _("Normal"),
if ($default_use_mdn) {
if ($mdn_user_support) {
echo ' ' . _("Receipt") .': '.
- addCheckBox('request_mdn', $request_mdn == '1', '1'). _("On Read").
- addCheckBox('request_dr', $request_dr == '1', '1'). _("On Delivery");
+ addCheckBox('request_mdn', $request_mdn == '1', '1') .
+ '<label for="request_mdn">' . _("On Read") . '</label>' .
+ addCheckBox('request_dr', $request_dr == '1', '1') .
+ '<label for="request_dr">' . _("On Delivery") . '</label>';
}
}
}
return $success;
}
-?>
\ No newline at end of file
+?>
case 'checkbox':
if ($key != 'bypass_trash') {
?>
- <input type="checkbox" name="<?php echo $key; ?>" /><?php echo $value[0]; ?>
+ <input type="checkbox" name="<?php echo $key; ?>" id="<?php echo $key; ?>" /><label for="<?php echo $key; ?>"><?php echo $value[0]; ?></label>
<?php
}
break;
<?php
if (isset($aFormElements['bypass_trash'])) {
?>
- <input type="checkbox" name="bypass_trash" /><?php echo $aFormElements['bypass_trash'][0]; ?>
+ <input type="checkbox" name="bypass_trash" id="bypass_trash" /><label for="bypass_trash"><?php echo $aFormElements['bypass_trash'][0]; ?></label>
<?php
}
if (isset($aFormElements['undeleteButton'])) {