KEYCLOAK-3679: Add new flow, default (browser) flow always shown.
This commit is contained in:
parent
6acd9cdf1d
commit
06dcf99b42
1 changed files with 9 additions and 4 deletions
|
@ -1812,6 +1812,8 @@ module.controller('CreateExecutionFlowCtrl', function($scope, realm, topFlow, pa
|
||||||
$scope.realm = realm;
|
$scope.realm = realm;
|
||||||
$scope.formProviders = formProviders;
|
$scope.formProviders = formProviders;
|
||||||
|
|
||||||
|
var returnToTopFlow = parentFlow.topLevel ? parentFlow.alias : topFlow;
|
||||||
|
|
||||||
var defaultFlowType = parentFlow.providerId == 'client-flow' ? 'client-flow' : 'basic-flow';
|
var defaultFlowType = parentFlow.providerId == 'client-flow' ? 'client-flow' : 'basic-flow';
|
||||||
$scope.flow = {
|
$scope.flow = {
|
||||||
alias: "",
|
alias: "",
|
||||||
|
@ -1826,12 +1828,12 @@ module.controller('CreateExecutionFlowCtrl', function($scope, realm, topFlow, pa
|
||||||
$scope.save = function() {
|
$scope.save = function() {
|
||||||
$scope.flow.provider = $scope.provider.id;
|
$scope.flow.provider = $scope.provider.id;
|
||||||
CreateExecutionFlow.save({realm: realm.realm, alias: parentFlow.alias}, $scope.flow, function() {
|
CreateExecutionFlow.save({realm: realm.realm, alias: parentFlow.alias}, $scope.flow, function() {
|
||||||
$location.url("/realms/" + realm.realm + "/authentication/flows/" + topFlow);
|
$location.url("/realms/" + realm.realm + "/authentication/flows/" + returnToTopFlow);
|
||||||
Notifications.success("Flow Created.");
|
Notifications.success("Flow Created.");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
$scope.cancel = function() {
|
$scope.cancel = function() {
|
||||||
$location.url("/realms/" + realm.realm + "/authentication/flows/" + topFlow);
|
$location.url("/realms/" + realm.realm + "/authentication/flows/" + returnToTopFlow);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1840,6 +1842,9 @@ module.controller('CreateExecutionCtrl', function($scope, realm, topFlow, parent
|
||||||
Notifications, $location) {
|
Notifications, $location) {
|
||||||
$scope.realm = realm;
|
$scope.realm = realm;
|
||||||
$scope.parentFlow = parentFlow;
|
$scope.parentFlow = parentFlow;
|
||||||
|
|
||||||
|
var returnToTopFlow = parentFlow.topLevel ? parentFlow.alias : topFlow;
|
||||||
|
|
||||||
if (parentFlow.providerId == 'form-flow') {
|
if (parentFlow.providerId == 'form-flow') {
|
||||||
$scope.providers = formActionProviders;
|
$scope.providers = formActionProviders;
|
||||||
} else if (parentFlow.providerId == 'client-flow') {
|
} else if (parentFlow.providerId == 'client-flow') {
|
||||||
|
@ -1858,12 +1863,12 @@ module.controller('CreateExecutionCtrl', function($scope, realm, topFlow, parent
|
||||||
provider: $scope.provider.id
|
provider: $scope.provider.id
|
||||||
}
|
}
|
||||||
CreateExecution.save({realm: realm.realm, alias: parentFlow.alias}, execution, function() {
|
CreateExecution.save({realm: realm.realm, alias: parentFlow.alias}, execution, function() {
|
||||||
$location.url("/realms/" + realm.realm + "/authentication/flows/" + topFlow);
|
$location.url("/realms/" + realm.realm + "/authentication/flows/" + returnToTopFlow);
|
||||||
Notifications.success("Execution Created.");
|
Notifications.success("Execution Created.");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
$scope.cancel = function() {
|
$scope.cancel = function() {
|
||||||
$location.url("/realms/" + realm.realm + "/authentication/flows/" + topFlow);
|
$location.url("/realms/" + realm.realm + "/authentication/flows/" + returnToTopFlow);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue