Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't apply access keys to checkbox and radiobox rows in the sidebar …
…(Bug #14103).
  • Loading branch information
yunosh committed Sep 17, 2015
1 parent ceecea6 commit 3c30959
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions horde/lib/View/Sidebar.php
Expand Up @@ -170,11 +170,15 @@ public function addRow(array $row, $container = '')
$label = htmlspecialchars($row['label']);

if (isset($row['url'])) {
$ak = Horde::getAccessKey($label);
$url = empty($row['url']) ? new Horde_Url() : $row['url'];
$attributes = $ak
? array('accesskey' => $ak)
: array();
if ($boxrow) {
$attributes = array();
} else {
$ak = Horde::getAccessKey($label);
$attributes = $ak
? array('accesskey' => $ak)
: array();
}
foreach (array('onclick', 'target', 'class') as $attribute) {
if (!empty($row[$attribute])) {
$attributes[$attribute] = $row[$attribute];
Expand All @@ -191,10 +195,12 @@ public function addRow(array $row, $container = '')
} else {
$attributes['class'] .= ' ' . $class;
}
$row['link'] = $url->link($attributes) . $label . '</a>';
} else {
$row['link'] = $url->link($attributes)
. Horde::highlightAccessKey($label, $ak)
. '</a>';
}
$row['link'] = $url->link($attributes)
. Horde::highlightAccessKey($label, $ak)
. '</a>';
} else {
$row['link'] = '<span class="horde-resource-none">'
. $label . '</span>';
Expand Down

0 comments on commit 3c30959

Please sign in to comment.