mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +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');
|
||||
$header = pht('Create New Credential');
|
||||
$crumbs->addTextCrumb(pht('Create'));
|
||||
$cancel_uri = $this->getApplicationURI();
|
||||
} else {
|
||||
$title = pht('Edit Credential');
|
||||
$header = pht('Edit Credential %s', 'K'.$credential->getID());
|
||||
|
@ -279,6 +280,7 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
|||
'K'.$credential->getID(),
|
||||
'/K'.$credential->getID());
|
||||
$crumbs->addTextCrumb(pht('Edit'));
|
||||
$cancel_uri = '/K'.$credential->getID();
|
||||
}
|
||||
|
||||
if ($request->isAjax()) {
|
||||
|
@ -293,7 +295,7 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
|||
->appendChild($errors)
|
||||
->appendChild($form->buildLayoutView())
|
||||
->addSubmitButton(pht('Create Credential'))
|
||||
->addCancelButton($this->getApplicationURI());
|
||||
->addCancelButton($cancel_uri);
|
||||
|
||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||
}
|
||||
|
@ -301,7 +303,7 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
|||
$form->appendChild(
|
||||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save'))
|
||||
->addCancelButton($this->getApplicationURI()));
|
||||
->addCancelButton($cancel_uri));
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText($header)
|
||||
|
|
Loading…
Reference in a new issue