Skip to content

Commit

Permalink
Bugfix: Link to ballot tracker not working (#281)
Browse files Browse the repository at this point in the history
When `election.presentation.extra_options.success_screen__hide_qr_code` is set `true`,
the ballot confirmation pdf shows a link to the ballot tracker but the link didn't
work. This fixes sequentech/meta#40
  • Loading branch information
edulix committed Nov 28, 2022
1 parent fad2457 commit d293a53
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions avBooth/success-screen-directive/success-screen-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,6 @@ angular.module('avBooth')
) {
var typeNumber = 0;
var errorCorrectionLevel = 'L';
scope.ballotTrackerUrl = window.location.protocol +
'//' +
window.location.host +
'/election/' +
scope.election.id +
'/public/ballot-locator/' +
scope.stateData.ballotHash;
var qr = QrCodeService(typeNumber, errorCorrectionLevel);
qr.addData(scope.ballotTrackerUrl);
qr.make();
Expand Down Expand Up @@ -454,6 +447,14 @@ angular.module('avBooth')

scope.successText = text({electionId: scope.election.id});

scope.ballotTrackerUrl = window.location.protocol +
'//' +
window.location.host +
'/election/' +
scope.election.id +
'/public/ballot-locator/' +
scope.stateData.ballotHash;

generateQrCode();

if (
Expand Down

0 comments on commit d293a53

Please sign in to comment.