$t->set('post_action', Horde::applicationUrl('compose.php')->unique());
$t->set('allow_compose', !$compose_disable);
+$blank_url = new Horde_Url('#');
+
if ($redirect) {
/* Prepare the redirect template. */
$t->set('cacheid', $composeCacheID);
$t->set('status', Horde::endBuffer());
if ($registry->hasMethod('contacts/search')) {
- $t->set('has_search', true);
- $t->set('abook', Horde::link('#', _("Address Book"), 'widget', null, 'window.open(\'' . Horde::applicationUrl('contacts.php')->add(array('formname' => 'redirect', 'to_only' => 1)) . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>');
+ $t->set('abook', $blank_url->copy()->link(array(
+ 'class' => 'widget',
+ 'onclick.raw' => 'window.open("' . Horde::applicationUrl('contacts.php')->add(array('formname' => 'redirect', 'to_only' => 1)) . '", "contacts", "toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100"); return false;',
+ 'title' => _("Address Book")
+ )) . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>');
}
$t->set('to', Horde::label('to', _("To")));
$compose_options = array();
if ($registry->hasMethod('contacts/search')) {
$compose_options[] = array(
- 'url' => Horde::link('#', '', 'widget', null, 'window.open(\'' . Horde::applicationUrl('contacts.php') . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;'),
+ 'url' => $blank_url->copy()->link(array(
+ 'class' => 'widget',
+ 'onclick.raw' => 'window.open("' . Horde::applicationUrl('contacts.php') . '","contacts","toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100"); return false;'
+ )),
'img' => Horde::img('addressbook_browse.png'),
'label' => $show_text ? _("Address Book") : ''
);
}
if ($spellcheck) {
$compose_options[] = array(
- 'url' => Horde::link('#', '', 'widget', '', 'return false', '', '',
- array('id' => 'spellcheck')),
- 'img' => '', 'label' => '');
+ 'url' => $blank_url->copy()->link(array(
+ 'class' => 'widget',
+ 'id' => 'spellcheck'
+ )),
+ 'img' => '',
+ 'label' => ''
+ );
}
if ($_SESSION['imp']['file_upload']) {
+ $url = new Horde_Url('#attachments');
$compose_options[] = array(
- 'url' => Horde::link('#attachments', '', 'widget'),
+ 'url' => $url->link(array('class' => 'widget')),
'img' => Horde::img('manage_attachments.png'),
'label' => $show_text ? _("Attachments") : ''
);
$t->set('compose_html', (!is_null($rtemode) && !$prefs->isLocked('compose_html')));
if ($t->get('compose_html')) {
$t->set('html_img', Horde::img('compose.png', _("Switch Composition Method")));
- $t->set('html_switch', Horde::link('#', _("Switch Composition Method"), '', '', "$('rtemode').value='" . ($rtemode ? 0 : 1) . "';ImpCompose.uniqSubmit('toggle_editor');return false;"));
+ $t->set('html_switch', $blank_url->copy()->link(array(
+ 'onclick.raw' => "$('rtemode').value='" . ($rtemode ? 0 : 1) . "';ImpCompose.uniqSubmit('toggle_editor');return false;",
+ 'title' => _("Switch Composition Method")
+ )));
$t->set('rtemode', $rtemode);
}
'composeCache' => $composeCacheID,
'id' => $atc_num
));
- $entry['name'] = Horde::link($preview_url, _("Preview") . ' ' . $entry['name'], 'link', 'compose_preview_window') . $entry['name'] . '</a>';
+ $entry['name'] = $preview_url->link(array(
+ 'class' => 'link',
+ 'target' => 'compose_preview_window',
+ 'title' => _("Preview")
+ )) . $entry['name'] . '</a>';
}
$atc[] = $entry;
if (!empty($refresh_ak)) {
$refresh_title .= sprintf(_(" (Accesskey %s)"), $refresh_ak);
}
-$head_template->set('refresh', Horde::link($folders_url_ob, $refresh_title, '', '', '', $refresh_title, $refresh_ak));
+$head_template->set('refresh', $folder_url_ob->link(array(
+ 'accesskey' => $refresh_ak,
+ 'title' => $refresh_title
+)));
$head_template->set('folders_token', $folders_token);
/* Prepare the actions template. */
$val['nocheckbox'] = !empty($val['vfolder']);
if (!empty($val['vfolder']) && $val['editvfolder']) {
$imp_search = $injector->getInstance('IMP_Search');
- $val['delvfolder'] = Horde::link($imp_search->deleteUrl($val['value']), _("Delete Virtual Folder")) . _("Delete") . '</a>';
- $val['editvfolder'] = Horde::link($imp_search->editUrl($val['value']), _("Edit Virtual Folder")) . _("Edit") . '</a>';
+ $val['delvfolder'] = $imp_search->deleteUrl($val['value'])->link(array('title' => _("Delete Virtual Folder"))) . _("Delete") . '</a>';
+ $val['editvfolder'] = $imp_search->editUrl($val['value'])->link(array('title' => _("Edit Virtual Folder"))) . _("Edit") . '</a>';
}
$val['cname'] = (++$rowct % 2) ? 'item0' : 'item1';
if (!empty($val['unseen'])) {
$val['name'] = '<strong>' . $val['name'] . '</strong>';
}
- $val['name'] = Horde::link($name_url->copy()->add('mailbox', $val['value']), $val['vfolder'] ? $val['base_elt']['l'] : $val['display']) . $val['name'] . '</a>';
+ $val['name'] = $name_url->copy()->add('mailbox', $val['value'])->link(array('title' => $val['vfolder'] ? $val['base_elt']['l'] : $val['display'])) . $val['name'] . '</a>';
}
$val['line'] = $tree_imgs[$key];