diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
index 37998e5..af93ac8 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
@@ -1711,6 +1711,10 @@ module.controller('AuthenticationFlowsCtrl', function($scope, $route, realm, flo
}
}
+ $scope.selectFlow = function(flow) {
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + flow.alias);
+ };
+
var setupForm = function() {
AuthenticationFlowExecutions.query({realm: realm.realm, alias: $scope.flow.alias}, function(data) {
$scope.executions = data;
@@ -1745,7 +1749,6 @@ module.controller('AuthenticationFlowsCtrl', function($scope, $route, realm, flo
execution.postLevels.push(j);
}
}
- $location.url("/realms/" + realm.realm + "/authentication/flows/" + $scope.flow.alias);
})
};
@@ -1831,9 +1834,11 @@ module.controller('AuthenticationFlowsCtrl', function($scope, $route, realm, flo
$scope.setupForm = setupForm;
- setupForm();
-
-
+ if (selectedFlow == null) {
+ $scope.selectFlow(flows[0]);
+ } else {
+ setupForm();
+ }
});
module.controller('RequiredActionsCtrl', function($scope, realm, unregisteredRequiredActions,
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authentication-flows.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authentication-flows.html
index eb26ba3..09afda2 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authentication-flows.html
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/authentication-flows.html
@@ -10,7 +10,7 @@
<div class="dropdown pull-left">
<select class="form-control" ng-model="flow"
ng-options="(flow.alias|capitalize) for flow in flows"
- data-ng-change="setupForm()">
+ data-ng-change="selectFlow(flow)">
</select>
</div>
<i class="fa fa-question-circle text-muted" tooltip-trigger="mouseover mouseout" tooltip="{{flow.description}}" tooltip-placement="right"> </i>