本文整理汇总了PHP中PHUIInfoView类的典型用法代码示例。如果您正苦于以下问题:PHP PHUIInfoView类的具体用法?PHP PHUIInfoView怎么用?PHP PHUIInfoView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PHUIInfoView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handleRequest
public function handleRequest(AphrontRequest $request)
{
$viewer = $request->getViewer();
$id = $request->getURIData('id');
$task = id(new PhabricatorWorkerActiveTask())->load($id);
if (!$task) {
$tasks = id(new PhabricatorWorkerArchiveTaskQuery())->withIDs(array($id))->execute();
$task = reset($tasks);
}
$header = new PHUIHeaderView();
if (!$task) {
$title = pht('Task Does Not Exist');
$header->setHeader(pht('Task %d Missing', $id));
$error_view = new PHUIInfoView();
$error_view->setTitle(pht('No Such Task'));
$error_view->appendChild(phutil_tag('p', array(), pht('This task may have recently been garbage collected.')));
$error_view->setSeverity(PHUIInfoView::SEVERITY_NODATA);
$content = $error_view;
} else {
$title = pht('Task %d', $task->getID());
$header->setHeader(pht('Task %d: %s', $task->getID(), $task->getTaskClass()));
$properties = $this->buildPropertyListView($task);
$object_box = id(new PHUIObjectBoxView())->setHeaderText($title)->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)->addPropertyList($properties);
$retry_head = id(new PHUIHeaderView())->setHeader(pht('Retries'));
$retry_info = $this->buildRetryListView($task);
$retry_box = id(new PHUIObjectBoxView())->setHeader($retry_head)->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)->addPropertyList($retry_info);
$content = array($object_box, $retry_box);
}
$header->setHeaderIcon('fa-sort');
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($title);
$crumbs->setBorder(true);
$view = id(new PHUITwoColumnView())->setHeader($header)->setFooter($content);
return $this->newPage()->setTitle($title)->setCrumbs($crumbs)->appendChild($view);
}
示例2: processRequest
public function processRequest()
{
$request = $this->getRequest();
$user = $request->getUser();
$task = id(new PhabricatorWorkerActiveTask())->load($this->id);
if (!$task) {
$tasks = id(new PhabricatorWorkerArchiveTaskQuery())->withIDs(array($this->id))->execute();
$task = reset($tasks);
}
if (!$task) {
$title = pht('Task Does Not Exist');
$error_view = new PHUIInfoView();
$error_view->setTitle(pht('No Such Task'));
$error_view->appendChild(phutil_tag('p', array(), pht('This task may have recently been garbage collected.')));
$error_view->setSeverity(PHUIInfoView::SEVERITY_NODATA);
$content = $error_view;
} else {
$title = pht('Task %d', $task->getID());
$header = id(new PHUIHeaderView())->setHeader(pht('Task %d (%s)', $task->getID(), $task->getTaskClass()));
$properties = $this->buildPropertyListView($task);
$object_box = id(new PHUIObjectBoxView())->setHeader($header)->addPropertyList($properties);
$retry_head = id(new PHUIHeaderView())->setHeader(pht('Retries'));
$retry_info = $this->buildRetryListView($task);
$retry_box = id(new PHUIObjectBoxView())->setHeader($retry_head)->addPropertyList($retry_info);
$content = array($object_box, $retry_box);
}
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($title);
return $this->buildApplicationPage(array($crumbs, $content), array('title' => $title));
}
示例3: buildErrorView
protected function buildErrorView($error_message)
{
$error = new PHUIInfoView();
$error->setSeverity(PHUIInfoView::SEVERITY_ERROR);
$error->setTitle($error_message);
return $error;
}
示例4: renderErrorPage
protected function renderErrorPage($title, array $messages)
{
$view = new PHUIInfoView();
$view->setTitle($title);
$view->setErrors($messages);
return $this->buildApplicationPage($view, array('title' => $title));
}
示例5: renderErrorPage
protected function renderErrorPage($title, array $messages)
{
$view = new PHUIInfoView();
$view->setTitle($title);
$view->setErrors($messages);
return $this->newPage()->setTitle($title)->appendChild($view);
}
示例6: processImportRequest
private function processImportRequest($request)
{
$admin = $request->getUser();
$usernames = $request->getArr('usernames');
$emails = $request->getArr('email');
$names = $request->getArr('name');
$notice_view = new PHUIInfoView();
$notice_view->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
$notice_view->setTitle(pht('Import Successful'));
$notice_view->setErrors(array(pht('Successfully imported users from LDAP')));
$list = new PHUIObjectItemListView();
$list->setNoDataString(pht('No users imported?'));
foreach ($usernames as $username) {
$user = new PhabricatorUser();
$user->setUsername($username);
$user->setRealname($names[$username]);
$email_obj = id(new PhabricatorUserEmail())->setAddress($emails[$username])->setIsVerified(1);
try {
id(new PhabricatorUserEditor())->setActor($admin)->createNewUser($user, $email_obj);
id(new PhabricatorExternalAccount())->setUserPHID($user->getPHID())->setAccountType('ldap')->setAccountDomain('self')->setAccountID($username)->save();
$header = pht('Successfully added %s', $username);
$attribute = null;
$color = 'fa-check green';
} catch (Exception $ex) {
$header = pht('Failed to add %s', $username);
$attribute = $ex->getMessage();
$color = 'fa-times red';
}
$item = id(new PHUIObjectItemView())->setHeader($header)->addAttribute($attribute)->setStatusIcon($color);
$list->addItem($item);
}
return array($notice_view, $list);
}
示例7: processRequest
public function processRequest()
{
$request = $this->getRequest();
$viewer = $request->getUser();
$xscript = id(new HeraldTranscriptQuery())->setViewer($viewer)->withIDs(array($this->id))->executeOne();
if (!$xscript) {
return new Aphront404Response();
}
require_celerity_resource('herald-test-css');
$nav = $this->buildSideNav();
$object_xscript = $xscript->getObjectTranscript();
if (!$object_xscript) {
$notice = id(new PHUIInfoView())->setSeverity(PHUIInfoView::SEVERITY_NOTICE)->setTitle(pht('Old Transcript'))->appendChild(phutil_tag('p', array(), pht('Details of this transcript have been garbage collected.')));
$nav->appendChild($notice);
} else {
$map = HeraldAdapter::getEnabledAdapterMap($viewer);
$object_type = $object_xscript->getType();
if (empty($map[$object_type])) {
// TODO: We should filter these out in the Query, but we have to load
// the objectTranscript right now, which is potentially enormous. We
// should denormalize the object type, or move the data into a separate
// table, and then filter this earlier (and thus raise a better error).
// For now, just block access so we don't violate policies.
throw new Exception(pht('This transcript has an invalid or inaccessible adapter.'));
}
$this->adapter = HeraldAdapter::getAdapterForContentType($object_type);
$filter = $this->getFilterPHIDs();
$this->filterTranscript($xscript, $filter);
$phids = array_merge($filter, $this->getTranscriptPHIDs($xscript));
$phids = array_unique($phids);
$phids = array_filter($phids);
$handles = $this->loadViewerHandles($phids);
$this->handles = $handles;
if ($xscript->getDryRun()) {
$notice = new PHUIInfoView();
$notice->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
$notice->setTitle(pht('Dry Run'));
$notice->appendChild(pht('This was a dry run to test Herald rules, ' . 'no actions were executed.'));
$nav->appendChild($notice);
}
$warning_panel = $this->buildWarningPanel($xscript);
$nav->appendChild($warning_panel);
$apply_xscript_panel = $this->buildApplyTranscriptPanel($xscript);
$nav->appendChild($apply_xscript_panel);
$action_xscript_panel = $this->buildActionTranscriptPanel($xscript);
$nav->appendChild($action_xscript_panel);
$object_xscript_panel = $this->buildObjectTranscriptPanel($xscript);
$nav->appendChild($object_xscript_panel);
}
$crumbs = id($this->buildApplicationCrumbs())->addTextCrumb(pht('Transcripts'), $this->getApplicationURI('/transcript/'))->addTextCrumb($xscript->getID());
$nav->setCrumbs($crumbs);
return $this->buildApplicationPage($nav, array('title' => pht('Transcript')));
}
示例8: processRequest
public function processRequest()
{
try {
$status = PhabricatorNotificationClient::getServerStatus();
$status = $this->renderServerStatus($status);
} catch (Exception $ex) {
$status = new PHUIInfoView();
$status->setTitle(pht('Notification Server Issue'));
$status->appendChild(hsprintf('%s<br /><br />' . '<strong>%s</strong> %s', pht('Unable to determine server status. This probably means the server ' . 'is not in great shape. The specific issue encountered was:'), get_class($ex), phutil_escape_html_newlines($ex->getMessage())));
}
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Status'));
return $this->buildApplicationPage(array($crumbs, $status), array('title' => pht('Notification Server Status'), 'device' => false));
}
示例9: render
public function render()
{
$drequest = $this->getDiffusionRequest();
$repository = $drequest->getRepository();
$commit = $drequest->getCommit();
if ($commit) {
$commit = $repository->formatCommitName($commit);
} else {
$commit = 'HEAD';
}
$reason = $this->browseResultSet->getReasonForEmptyResultSet();
switch ($reason) {
case DiffusionBrowseResultSet::REASON_IS_NONEXISTENT:
$title = pht('Path Does Not Exist');
// TODO: Under git, this error message should be more specific. It
// may exist on some other branch.
$body = pht('This path does not exist anywhere.');
$severity = PHUIInfoView::SEVERITY_ERROR;
break;
case DiffusionBrowseResultSet::REASON_IS_EMPTY:
$title = pht('Empty Directory');
$body = pht('This path was an empty directory at %s.', $commit);
$severity = PHUIInfoView::SEVERITY_NOTICE;
break;
case DiffusionBrowseResultSet::REASON_IS_DELETED:
$deleted = $this->browseResultSet->getDeletedAtCommit();
$existed = $this->browseResultSet->getExistedAtCommit();
$existed_text = $repository->formatCommitName($existed);
$existed_href = $drequest->generateURI(array('action' => 'browse', 'path' => $drequest->getPath(), 'commit' => $existed, 'params' => array('view' => $this->view)));
$existed_link = phutil_tag('a', array('href' => $existed_href), $existed_text);
$title = pht('Path Was Deleted');
$body = pht('This path does not exist at %s. It was deleted in %s and last ' . 'existed at %s.', $commit, self::linkCommit($drequest->getRepository(), $deleted), $existed_link);
$severity = PHUIInfoView::SEVERITY_WARNING;
break;
case DiffusionBrowseResultSet::REASON_IS_UNTRACKED_PARENT:
$subdir = $drequest->getRepository()->getDetail('svn-subpath');
$title = pht('Directory Not Tracked');
$body = pht("This repository is configured to track only one subdirectory " . "of the entire repository ('%s'), but you aren't looking at " . "something in that subdirectory, so no information is available.", $subdir);
$severity = PHUIInfoView::SEVERITY_WARNING;
break;
default:
throw new Exception(pht('Unknown failure reason: %s', $reason));
}
$error_view = new PHUIInfoView();
$error_view->setSeverity($severity);
$error_view->setTitle($title);
$error_view->appendChild(phutil_tag('p', array(), $body));
return $error_view->render();
}
示例10: processRequest
public function processRequest(AphrontRequest $request)
{
$user = $this->getUser();
$viewer = $request->getUser();
id(new PhabricatorAuthSessionEngine())->requireHighSecuritySession($viewer, $request, '/settings/');
if ($request->isFormPost()) {
if (!$request->isDialogFormPost()) {
$dialog = new AphrontDialogView();
$dialog->setUser($viewer);
$dialog->setTitle(pht('Really regenerate session?'));
$dialog->setSubmitURI($this->getPanelURI());
$dialog->addSubmitButton(pht('Regenerate'));
$dialog->addCancelbutton($this->getPanelURI());
$dialog->appendChild(phutil_tag('p', array(), pht('Really destroy the old certificate? Any established ' . 'sessions will be terminated.')));
return id(new AphrontDialogResponse())->setDialog($dialog);
}
$sessions = id(new PhabricatorAuthSessionQuery())->setViewer($user)->withIdentityPHIDs(array($user->getPHID()))->withSessionTypes(array(PhabricatorAuthSession::TYPE_CONDUIT))->execute();
foreach ($sessions as $session) {
$session->delete();
}
// This implicitly regenerates the certificate.
$user->setConduitCertificate(null);
$user->save();
return id(new AphrontRedirectResponse())->setURI($this->getPanelURI('?regenerated=true'));
}
if ($request->getStr('regenerated')) {
$notice = new PHUIInfoView();
$notice->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
$notice->setTitle(pht('Certificate Regenerated'));
$notice->appendChild(phutil_tag('p', array(), pht('Your old certificate has been destroyed and you have been issued ' . 'a new certificate. Sessions established under the old certificate ' . 'are no longer valid.')));
$notice = $notice->render();
} else {
$notice = null;
}
Javelin::initBehavior('select-on-click');
$cert_form = new AphrontFormView();
$cert_form->setUser($viewer)->appendChild(phutil_tag('p', array('class' => 'aphront-form-instructions'), pht('This certificate allows you to authenticate over Conduit, ' . 'the Phabricator API. Normally, you just run %s to install it.', phutil_tag('tt', array(), 'arc install-certificate'))))->appendChild(id(new AphrontFormTextAreaControl())->setLabel(pht('Certificate'))->setHeight(AphrontFormTextAreaControl::HEIGHT_SHORT)->setReadonly(true)->setSigil('select-on-click')->setValue($user->getConduitCertificate()));
$cert_form = id(new PHUIObjectBoxView())->setHeaderText(pht('Arcanist Certificate'))->setForm($cert_form);
$regen_instruction = pht('You can regenerate this certificate, which ' . 'will invalidate the old certificate and create a new one.');
$regen_form = new AphrontFormView();
$regen_form->setUser($viewer)->setAction($this->getPanelURI())->setWorkflow(true)->appendChild(phutil_tag('p', array('class' => 'aphront-form-instructions'), $regen_instruction))->appendChild(id(new AphrontFormSubmitControl())->setValue(pht('Regenerate Certificate')));
$regen_form = id(new PHUIObjectBoxView())->setHeaderText(pht('Regenerate Certificate'))->setForm($regen_form);
return array($notice, $cert_form, $regen_form);
}
示例11: renderExample
public function renderExample()
{
$request = $this->getRequest();
$user = $request->getUser();
$sevs = array(PHUIInfoView::SEVERITY_ERROR => pht('Error'), PHUIInfoView::SEVERITY_WARNING => pht('Warning'), PHUIInfoView::SEVERITY_NODATA => pht('No Data'), PHUIInfoView::SEVERITY_NOTICE => pht('Notice'), PHUIInfoView::SEVERITY_SUCCESS => pht('Success'));
$button = id(new PHUIButtonView())->setTag('a')->setText(pht('Resolve Issue'))->setHref('#');
$views = array();
// Only Title
foreach ($sevs as $sev => $title) {
$view = new PHUIInfoView();
$view->setSeverity($sev);
$view->setTitle($title);
$views[] = $view;
}
$views[] = phutil_tag('br', array(), null);
// Only Body
foreach ($sevs as $sev => $title) {
$view = new PHUIInfoView();
$view->setSeverity($sev);
$view->appendChild(pht('Several issues were encountered.'));
$view->addButton($button);
$views[] = $view;
}
$views[] = phutil_tag('br', array(), null);
// Only Errors
foreach ($sevs as $sev => $title) {
$view = new PHUIInfoView();
$view->setSeverity($sev);
$view->setErrors(array(pht('Overcooked.'), pht('Too much salt.'), pht('Full of sand.')));
$views[] = $view;
}
$views[] = phutil_tag('br', array(), null);
// All
foreach ($sevs as $sev => $title) {
$view = new PHUIInfoView();
$view->setSeverity($sev);
$view->setTitle($title);
$view->appendChild(pht('Several issues were encountered.'));
$view->setErrors(array(pht('Overcooked.'), pht('Too much salt.'), pht('Full of sand.')));
$views[] = $view;
}
return $views;
}
示例12: handleRequest
public function handleRequest(AphrontRequest $request)
{
$viewer = $this->getViewer();
$email = $viewer->loadPrimaryEmail();
if ($viewer->getIsEmailVerified()) {
return id(new AphrontRedirectResponse())->setURI('/');
}
$email_address = $email->getAddress();
$sent = null;
if ($request->isFormPost()) {
$email->sendVerificationEmail($viewer);
$sent = new PHUIInfoView();
$sent->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
$sent->setTitle(pht('Email Sent'));
$sent->appendChild(pht('Another verification email was sent to %s.', phutil_tag('strong', array(), $email_address)));
}
$must_verify = pht('You must verify your email address to login. You should have a ' . 'new email message from Phabricator with verification instructions ' . 'in your inbox (%s).', phutil_tag('strong', array(), $email_address));
$send_again = pht('If you did not receive an email, you can click the button below ' . 'to try sending another one.');
$dialog = id(new AphrontDialogView())->setUser($viewer)->setTitle(pht('Check Your Email'))->appendParagraph($must_verify)->appendParagraph($send_again)->addSubmitButton(pht('Send Another Email'));
return $this->buildApplicationPage(array($sent, $dialog), array('title' => pht('Must Verify Email')));
}
示例13: renderMiniPanel
private function renderMiniPanel($title, $body)
{
$panel = new PHUIInfoView();
$panel->setSeverity(PHUIInfoView::SEVERITY_NODATA);
$panel->appendChild(phutil_tag('p', array(), array(phutil_tag('strong', array(), $title . ': '), $body)));
$this->minipanels[] = $panel;
}
示例14: handleRequest
public function handleRequest(AphrontRequest $request)
{
if (!PhabricatorPasswordAuthProvider::getPasswordProvider()) {
return new Aphront400Response();
}
$e_email = true;
$e_captcha = true;
$errors = array();
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
if ($request->isFormPost()) {
$e_email = null;
$e_captcha = pht('Again');
$captcha_ok = AphrontFormRecaptchaControl::processCaptcha($request);
if (!$captcha_ok) {
$errors[] = pht('Captcha response is incorrect, try again.');
$e_captcha = pht('Invalid');
}
$email = $request->getStr('email');
if (!strlen($email)) {
$errors[] = pht('You must provide an email address.');
$e_email = pht('Required');
}
if (!$errors) {
// NOTE: Don't validate the email unless the captcha is good; this makes
// it expensive to fish for valid email addresses while giving the user
// a better error if they goof their email.
$target_email = id(new PhabricatorUserEmail())->loadOneWhere('address = %s', $email);
$target_user = null;
if ($target_email) {
$target_user = id(new PhabricatorUser())->loadOneWhere('phid = %s', $target_email->getUserPHID());
}
if (!$target_user) {
$errors[] = pht('There is no account associated with that email address.');
$e_email = pht('Invalid');
}
// If this address is unverified, only send a reset link to it if
// the account has no verified addresses. This prevents an opportunistic
// attacker from compromising an account if a user adds an email
// address but mistypes it and doesn't notice.
// (For a newly created account, all the addresses may be unverified,
// which is why we'll send to an unverified address in that case.)
if ($target_email && !$target_email->getIsVerified()) {
$verified_addresses = id(new PhabricatorUserEmail())->loadAllWhere('userPHID = %s AND isVerified = 1', $target_email->getUserPHID());
if ($verified_addresses) {
$errors[] = pht('That email address is not verified. You can only send ' . 'password reset links to a verified address.');
$e_email = pht('Unverified');
}
}
if (!$errors) {
$engine = new PhabricatorAuthSessionEngine();
$uri = $engine->getOneTimeLoginURI($target_user, null, PhabricatorAuthSessionEngine::ONETIME_RESET);
if ($is_serious) {
$body = pht("You can use this link to reset your Phabricator password:" . "\n\n %s\n", $uri);
} else {
$body = pht("Condolences on forgetting your password. You can use this " . "link to reset it:\n\n" . " %s\n\n" . "After you set a new password, consider writing it down on a " . "sticky note and attaching it to your monitor so you don't " . "forget again! Choosing a very short, easy-to-remember password " . "like \"cat\" or \"1234\" might also help.\n\n" . "Best Wishes,\nPhabricator\n", $uri);
}
$mail = id(new PhabricatorMetaMTAMail())->setSubject(pht('[Phabricator] Password Reset'))->setForceDelivery(true)->addRawTos(array($target_email->getAddress()))->setBody($body)->saveAndSend();
return $this->newDialog()->setTitle(pht('Check Your Email'))->setShortTitle(pht('Email Sent'))->appendParagraph(pht('An email has been sent with a link you can use to login.'))->addCancelButton('/', pht('Done'));
}
}
}
$error_view = null;
if ($errors) {
$error_view = new PHUIInfoView();
$error_view->setErrors($errors);
}
$email_auth = new PHUIFormLayoutView();
$email_auth->appendChild($error_view);
$email_auth->setUser($request->getUser())->setFullWidth(true)->appendChild(id(new AphrontFormTextControl())->setLabel(pht('Email'))->setName('email')->setValue($request->getStr('email'))->setError($e_email))->appendChild(id(new AphrontFormRecaptchaControl())->setLabel(pht('Captcha'))->setError($e_captcha));
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Reset Password'));
$dialog = new AphrontDialogView();
$dialog->setUser($request->getUser());
$dialog->setTitle(pht('Forgot Password / Email Login'));
$dialog->appendChild($email_auth);
$dialog->addSubmitButton(pht('Send Email'));
$dialog->setSubmitURI('/login/email/');
return $this->buildApplicationPage(array($crumbs, $dialog), array('title' => pht('Forgot Password')));
}
示例15: handleRequest
//.........这里部分代码省略.........
if ($template_id) {
$template_task = id(new ManiphestTaskQuery())->setViewer($viewer)->withIDs(array($template_id))->needSubscriberPHIDs(true)->needProjectPHIDs(true)->executeOne();
if ($template_task) {
$cc_phids = array_unique(array_merge($template_task->getSubscriberPHIDs(), array($viewer->getPHID())));
$task->attachSubscriberPHIDs($cc_phids);
$task->attachProjectPHIDs($template_task->getProjectPHIDs());
$task->setOwnerPHID($template_task->getOwnerPHID());
$task->setPriority($template_task->getPriority());
$task->setViewPolicy($template_task->getViewPolicy());
$task->setEditPolicy($template_task->getEditPolicy());
$v_space = $template_task->getSpacePHID();
$template_fields = PhabricatorCustomField::getObjectFields($template_task, PhabricatorCustomField::ROLE_EDIT);
$fields = $template_fields->getFields();
foreach ($fields as $key => $field) {
if (!$field->shouldCopyWhenCreatingSimilarTask()) {
unset($fields[$key]);
}
if (empty($aux_fields[$key])) {
unset($fields[$key]);
}
}
if ($fields) {
id(new PhabricatorCustomFieldList($fields))->setViewer($viewer)->readFieldsFromStorage($template_task);
foreach ($fields as $key => $field) {
$aux_fields[$key]->setValueFromStorage($field->getValueForStorage());
}
}
}
}
}
}
$error_view = null;
if ($errors) {
$error_view = new PHUIInfoView();
$error_view->setErrors($errors);
}
$priority_map = ManiphestTaskPriority::getTaskPriorityMap();
if ($task->getOwnerPHID()) {
$assigned_value = array($task->getOwnerPHID());
} else {
$assigned_value = array();
}
if ($task->getSubscriberPHIDs()) {
$cc_value = $task->getSubscriberPHIDs();
} else {
$cc_value = array();
}
if ($task->getProjectPHIDs()) {
$projects_value = $task->getProjectPHIDs();
} else {
$projects_value = array();
}
$cancel_id = nonempty($task->getID(), $template_id);
if ($cancel_id) {
$cancel_uri = '/T' . $cancel_id;
} else {
$cancel_uri = '/maniphest/';
}
if ($task->getID()) {
$button_name = pht('Save Task');
$header_name = pht('Edit Task');
} else {
if ($parent_task) {
$cancel_uri = '/T' . $parent_task->getID();
$button_name = pht('Create Task');
$header_name = pht('Create New Subtask');