mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +01:00
Fix Passphrase cancel URI
Summary: The "Cancel" button on the "Edit Credential" interface doesn't go back to the "View Credential" interface for existing credentials. Test Plan: Clicked "Cancel" on both "create" and "edit" workflows. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D8568
This commit is contained in:
parent
7eaba7baff
commit
b8fafdbd90
1 changed files with 4 additions and 2 deletions
|
@ -272,6 +272,7 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
||||||
$title = pht('Create Credential');
|
$title = pht('Create Credential');
|
||||||
$header = pht('Create New Credential');
|
$header = pht('Create New Credential');
|
||||||
$crumbs->addTextCrumb(pht('Create'));
|
$crumbs->addTextCrumb(pht('Create'));
|
||||||
|
$cancel_uri = $this->getApplicationURI();
|
||||||
} else {
|
} else {
|
||||||
$title = pht('Edit Credential');
|
$title = pht('Edit Credential');
|
||||||
$header = pht('Edit Credential %s', 'K'.$credential->getID());
|
$header = pht('Edit Credential %s', 'K'.$credential->getID());
|
||||||
|
@ -279,6 +280,7 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
||||||
'K'.$credential->getID(),
|
'K'.$credential->getID(),
|
||||||
'/K'.$credential->getID());
|
'/K'.$credential->getID());
|
||||||
$crumbs->addTextCrumb(pht('Edit'));
|
$crumbs->addTextCrumb(pht('Edit'));
|
||||||
|
$cancel_uri = '/K'.$credential->getID();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->isAjax()) {
|
if ($request->isAjax()) {
|
||||||
|
@ -293,7 +295,7 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
||||||
->appendChild($errors)
|
->appendChild($errors)
|
||||||
->appendChild($form->buildLayoutView())
|
->appendChild($form->buildLayoutView())
|
||||||
->addSubmitButton(pht('Create Credential'))
|
->addSubmitButton(pht('Create Credential'))
|
||||||
->addCancelButton($this->getApplicationURI());
|
->addCancelButton($cancel_uri);
|
||||||
|
|
||||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||||
}
|
}
|
||||||
|
@ -301,7 +303,7 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
||||||
$form->appendChild(
|
$form->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->setValue(pht('Save'))
|
->setValue(pht('Save'))
|
||||||
->addCancelButton($this->getApplicationURI()));
|
->addCancelButton($cancel_uri));
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($header)
|
->setHeaderText($header)
|
||||||
|
|
Loading…
Reference in a new issue