Properly redirect after creating a new credential

This commit is contained in:
Michael Abashian 2016-12-14 10:16:33 -05:00
parent 92d8813173
commit c4c5e67427

View File

@ -289,14 +289,12 @@ angular.module('CredentialsHelper', ['Utilities'])
Wait('stop');
var base = $location.path().replace(/^\//, '').split('/')[0];
if (base === 'credentials') {
ReturnToCaller();
if (base === 'credentials') {
$state.go('credentials.edit', {credential_id: data.id}, {reload: true});
}
else {
ReturnToCaller(1);
}
$state.go('credentials.edit', {credential_id: data.id}, {reload: true});
})
.error(function (data, status) {
Wait('stop');