protected function _importKeyDialog($target)
{
global $notification, $page_output, $registry;
$page_output->topbar = $page_output->sidebar = false;
$page_output->addInlineScript(array('$$("INPUT.horde-cancel").first().observe("click", function() { window.close(); })'), true);
/* Import CSS located with prefs CSS. */
$p_css = new Horde_Themes_Element('prefs.css');
$page_output->addStylesheet($p_css->fs, $p_css->uri);
$this->title = $target == 'personal' ? _("Import Personal S/MIME Certificate") : _("Import Public S/MIME Key");
/* Need to use regular status notification - AJAX notifications won't
* show in popup windows. */
if ($registry->getView() == Horde_Registry::VIEW_DYNAMIC) {
$notification->detach('status');
$notification->attach('status');
}
$view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/smime'));
$view->addHelper('Text');
$view->reload = $this->vars->reload;
$view->selfurl = self::url();
$this->output = $view->render('import_' . $target . '_key');
}