1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-10 14:51:06 +01:00

When cancelling addition of an Almanac interface, return to the Device page

Summary:
Fixes T13184. In Almanac, interfaces are always added to devices. However, if you "Add New Interface" and then "Cancel", you go to the nonexistent `/interface/` page.

Instead, return to the device page.

Test Plan: From a device page, clicked "Add Interface" and then "Cancel". Ended up back where I was.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13184

Differential Revision: https://secure.phabricator.com/D19573
This commit is contained in:
epriestley 2018-08-13 09:31:13 -07:00
parent b86dae6214
commit fb3ae72e36

View file

@ -127,6 +127,9 @@ final class AlmanacInterfaceEditEngine
}
protected function getObjectCreateCancelURI($object) {
if ($this->getDevice()) {
return $this->getDevice()->getURI();
}
return '/almanac/interface/';
}