Merge pull request #4429 from mabashian/4273-add-credential-refresh-list

Properly redirect after creating a new credential
This commit is contained in:
Michael Abashian
2016-12-14 13:33:07 -05:00
committed by GitHub

View File

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