summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-07-18 21:24:12 +0000
committerthomascube <thomas@roundcube.net>2006-07-18 21:24:12 +0000
commit66e2bfa5507ebbbc73dc5fcabe511cd473e0c62a (patch)
tree7953eebab742ab0b4e61738d11fc728f98fecca2
parentbac7d1742d45f256ded98656482ec9995e1c330a (diff)
Added label tags to forms (Ticket #1483810)
-rw-r--r--CHANGELOG5
-rw-r--r--program/include/main.inc14
-rw-r--r--program/steps/mail/compose.inc7
-rw-r--r--skins/default/templates/compose.html26
4 files changed, 29 insertions, 23 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 18349ad11..6ead1dc24 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,16 +1,17 @@
CHANGELOG RoundCube Webmail
---------------------------
-2006/07/18
+2006/07/18 (thomasb)
----------
- Fixed password with spaces issue (Bug #1364122)
- Replaced _auth hash with second cookie (Ticket #1483811)
- Don't use get_input_value() for passwords (Bug #1468895)
- Made password encryption key configurable
- Minor bugfixes with charset encoding
+- Added <label> tags to forms (Ticket #1483810)
-2006/07/07
+2006/07/07 (thomasb)
----------
- Fixed INSTALL_PATH bug #1425663
diff --git a/program/include/main.inc b/program/include/main.inc
index 34e21c2a1..ef2ecbfe8 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -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>
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 64b0d6364..7e6d306bd 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -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);
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index 0ecfb8f1b..e5db5a59b 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -46,11 +46,11 @@ self.setTimeout('rcmail_auto_save()',300000);
<roundcube:button command="savedraft" imageSel="/images/buttons/drafts_sel.png" imageAct="/images/buttons/drafts_act.png" imagePas="/images/buttons/drafts_pas.png" width="32" height="32" title="savemessage" />
<div id="priority-selector">
-<roundcube:label name="priority" />:&nbsp;<roundcube:object name="prioritySelector" form="form" />
+<label for="rcmcomposepriority"><roundcube:label name="priority" />:</label>&nbsp;<roundcube:object name="prioritySelector" form="form" id="rcmcomposepriority" />
</div>
<div id="receipt-selector">
-<roundcube:object name="receiptCheckBox" form="form" />&nbsp;<roundcube:label name="returnreceipt" />
+<roundcube:object name="receiptCheckBox" form="form" id="rcmcomposereceipt" />&nbsp;<label for="rcmcomposereceipt"><roundcube:label name="returnreceipt" /></label>
</div>
</div>
@@ -61,30 +61,30 @@ self.setTimeout('rcmail_auto_save()',300000);
<table border="0" cellspacing="0" cellpadding="1" id="compose-headers" summary=""><tr>
-<td class="title"><roundcube:label name="from" /></td>
-<td><roundcube:object name="composeHeaders" part="from" form="form" tabindex="1" /></td>
+<td class="title"><label for="rcmcomposefrom"><roundcube:label name="from" /></label></td>
+<td><roundcube:object name="composeHeaders" part="from" form="form" id="rcmcomposefrom" tabindex="1" /></td>
</tr><tr>
-<td class="title top"><roundcube:label name="to" /></td>
-<td><roundcube:object name="composeHeaders" part="to" form="form" cols="80" rows="2" tabindex="2" /></td>
+<td class="title top"><label for="rcmcomposeto"><roundcube:label name="to" /></label></td>
+<td><roundcube:object name="composeHeaders" part="to" form="form" id="rcmcomposeto" cols="80" rows="2" tabindex="2" /></td>
<td class="add-button"><a href="#" onclick="return rcmail_toggle_display('compose-cc')">[Cc]</a><br />
<a href="#" onclick="return rcmail_toggle_display('compose-bcc')">[Bcc]</a><br /></td>
</tr><tr id="compose-cc">
-<td class="title top"><roundcube:label name="cc" /></td>
-<td><roundcube:object name="composeHeaders" part="cc" form="form" cols="80" rows="2" tabindex="3" /></td>
+<td class="title top"><label for="rcmcomposecc"><roundcube:label name="cc" /></label></td>
+<td><roundcube:object name="composeHeaders" part="cc" form="form" id="rcmcomposecc" cols="80" rows="2" tabindex="3" /></td>
</tr><tr id="compose-bcc">
-<td class="title top"><roundcube:label name="bcc" /></td>
-<td><roundcube:object name="composeHeaders" part="bcc" form="form" cols="80" rows="2" tabindex="4" /></td>
+<td class="title top"><label for="rcmcomposebcc"><roundcube:label name="bcc" /></label></td>
+<td><roundcube:object name="composeHeaders" part="bcc" form="form" id="rcmcomposebcc" cols="80" rows="2" tabindex="4" /></td>
</tr><tr id="compose-replyto">
-<td class="title top"><roundcube:label name="replyto" /></td>
-<td><roundcube:object name="composeHeaders" part="replyto" form="form" size="80" tabindex="5" /></td>
+<td class="title top"><label for="rcmcomposereplyto"><roundcube:label name="replyto" /></label></td>
+<td><roundcube:object name="composeHeaders" part="replyto" form="form" id="rcmcomposereplyto" size="80" tabindex="5" /></td>
<!-- </tr><tr>
@@ -92,7 +92,7 @@ self.setTimeout('rcmail_auto_save()',300000);
</tr><tr>
-<td class="title"><roundcube:label name="subject" /></td>
+<td class="title"><label for="compose-subject"><roundcube:label name="subject" /></label></td>
<td><roundcube:object name="composeSubject" id="compose-subject" form="form" tabindex="6" /></td>
</tr></table>