Added label tags to forms (Ticket #1483810)

This commit is contained in:
thomascube
2006-07-18 21:24:12 +00:00
parent bac7d1742d
commit 66e2bfa550
4 changed files with 29 additions and 23 deletions

View File

@@ -1665,8 +1665,8 @@ function rcmail_login_form($attrib)
$labels['pass'] = rcube_label('password');
$labels['host'] = rcube_label('server');
$input_user = new textfield(array('name' => '_user', 'size' => 30));
$input_pass = new passwordfield(array('name' => '_pass', 'size' => 30));
$input_user = new textfield(array('name' => '_user', 'id' => 'rcmloginuser', 'size' => 30));
$input_pass = new passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd', 'size' => 30));
$input_action = new hiddenfield(array('name' => '_action', 'value' => 'login'));
$fields = array();
@@ -1676,7 +1676,7 @@ function rcmail_login_form($attrib)
if (is_array($CONFIG['default_host']))
{
$select_host = new select(array('name' => '_host'));
$select_host = new select(array('name' => '_host', 'id' => 'rcmloginhost'));
foreach ($CONFIG['default_host'] as $key => $value)
$select_host->add($value, (is_numeric($key) ? $value : $key));
@@ -1685,7 +1685,7 @@ function rcmail_login_form($attrib)
}
else if (!strlen($CONFIG['default_host']))
{
$input_host = new textfield(array('name' => '_host', 'size' => 30));
$input_host = new textfield(array('name' => '_host', 'id' => 'rcmloginhost', 'size' => 30));
$fields['host'] = $input_host->show($_POST['_host']);
}
@@ -1698,7 +1698,7 @@ function rcmail_login_form($attrib)
</tr><tr>
<td class="title">$labels[host]</td>
<td class="title"><label for="rcmloginhost">$labels[host]</label></td>
<td>$fields[host]</td>
EOF;
@@ -1711,12 +1711,12 @@ $SESS_HIDDEN_FIELD
$fields[action]
<table><tr>
<td class="title">$labels[user]</td>
<td class="title"><label for="rcmloginuser">$labels[user]</label></td>
<td>$fields[user]</td>
</tr><tr>
<td class="title">$labels[pass]</td>
<td class="title"><label for="rcmloginpwd">$labels[pass]</label></td>
<td>$fields[pass]</td>
$form_host
</tr></table>

View File

@@ -690,6 +690,7 @@ function rcmail_compose_attachment_field($attrib)
return $out;
}
function rcmail_priority_selector($attrib)
{
list($form_start, $form_end) = get_form_tags($attrib);
@@ -719,9 +720,13 @@ function rcmail_receipt_checkbox($attrib)
{
list($form_start, $form_end) = get_form_tags($attrib);
unset($attrib['form']);
if (!isset($attrib['id']))
$attrib['id'] = 'receipt';
$attrib['name'] = '_receipt';
$checkbox = new checkbox(array('name' => '_receipt', 'id' => 'receipt', 'value' => 1));
$attrib['value'] = '1';
$checkbox = new checkbox($attrib);
$out = $form_start ? "$form_start\n" : '';
$out .= $checkbox->show(0);