diff --git a/avBooth/booth-directive/booth-directive.js b/avBooth/booth-directive/booth-directive.js index 33556ea9..09f3bd28 100644 --- a/avBooth/booth-directive/booth-directive.js +++ b/avBooth/booth-directive/booth-directive.js @@ -978,6 +978,13 @@ angular.module('avBooth') return futureResult.promise; } + function setParentElection() { + if (!scope.parentElection) { + return; + } + scope.election = scope.parentElection; + } + function retrieveElectionConfig(electionId) { if (scope.state === stateEnum.errorScreen) { return; @@ -1366,6 +1373,7 @@ angular.module('avBooth') getSessionEndTime: getSessionEndTime, getSessionStartTime: getSessionStartTime, isStateCompatibleWithCountdown: isStateCompatibleWithCountdown, + setParentElection: setParentElection, // stateData stores information used by the directive being shown. // Its content depends on the current state. diff --git a/avBooth/success-screen-directive/success-screen-directive.js b/avBooth/success-screen-directive/success-screen-directive.js index f253896b..78f15504 100644 --- a/avBooth/success-screen-directive/success-screen-directive.js +++ b/avBooth/success-screen-directive/success-screen-directive.js @@ -574,6 +574,7 @@ angular.module('avBooth') // redirects to next election scope.goToNextElection = function () { scope.setState(scope.stateEnum.electionChooserScreen, {}); + scope.setParentElection(); }; scope.skippedCount = skippedCount();