Skip to content

Commit

Permalink
Merge pull request #25 from privacybydesign/fix/hide-back-button-on-f…
Browse files Browse the repository at this point in the history
…irst-page

Fix: Hide Back button on first page as window.close() does not work on Firefox
  • Loading branch information
sanderhollaar authored Nov 2, 2022
2 parents e1d0862 + dae2a45 commit 5a576bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions webapp/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,23 @@ function setWindow(window, back) {
if (back) {
backButton
.click(() => {clearStatus(); setWindow(back); return false;})
.removeAttr('href')
.removeClass('button-hidden');
} else if (history.length > 1) {
backButton
.click(() => {clearStatus(); history.back(); return false;})
.removeClass('button-hidden');
} else {
backButton.attr('href', MESSAGES['issuers-overview-page']);
if (isInApp)
backButton.addClass('button-hidden');
backButton.addClass('button-hidden');
}

const submitButtonText = MESSAGES['submit-' + window];
const submitButton = $('#submit-button');
if (submitButtonText) {
submitButton.text(submitButtonText);
submitButton.removeClass('hidden');
}
else
} else {
submitButton.addClass('hidden');
}
}

function addEmail(e) {
Expand Down
2 changes: 1 addition & 1 deletion webapp/en/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h1>Adding an e-mail address</h1>
</main>
<footer>
<div class="actions">
<a id="back-button" href="https://privacybydesign.foundation/issuance/">
<a id="back-button">
Back
</a>
<button id="submit-button" type="submit"></button>
Expand Down
2 changes: 1 addition & 1 deletion webapp/nl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h1>E-mailadres toevoegen</h1>
</main>
<footer>
<div class="actions">
<a id="back-button" href="https://privacybydesign.foundation/uitgifte/">
<a id="back-button">
Terug
</a>
<button id="submit-button" type="submit"></button>
Expand Down

0 comments on commit 5a576bd

Please sign in to comment.