Exemplo n.º 1
0
        } catch (Whups_Exception $e) {
            $notification->push($e, 'horde.error');
        }
    }
} elseif ($vars->get('formname') == 'whups_form_deletelistener') {
    if ($delform->validate($vars)) {
        $delform->getInfo($vars, $info);
        try {
            $whups_driver->deleteListener($id, '**' . $info['del_listener']);
            $notification->push(sprintf(_("%s will no longer receive updates for this ticket."), $info['del_listener']), 'horde.success');
            $ticket->show();
        } catch (Whups_Exception $e) {
            $notification->push($e, 'horde.error');
        }
    }
}
$page_output->header(array('title' => sprintf(_("Watchers for %s"), '[#' . $id . '] ' . $ticket->get('summary'))));
$notification->notify(array('listeners' => 'status'));
require WHUPS_TEMPLATES . '/prevnext.inc';
$tabs = Whups::getTicketTabs($vars, $id);
echo $tabs->render('watch');
require WHUPS_TEMPLATES . '/ticket/watchers.inc';
$r = new Horde_Form_Renderer();
$addform->renderActive($r, $vars, Horde::url('ticket/watch.php'), 'post');
echo '<br class="spacer" />';
$delform->renderActive($r, $vars, Horde::url('ticket/watch.php'), 'post');
echo '<br class="spacer" />';
$form = new Whups_Form_TicketDetails($vars, $ticket, '[#' . $id . '] ' . $ticket->get('summary'));
$ticket->setDetails($vars);
$form->renderInactive($form->getRenderer(), $vars);
$page_output->footer();