Skip to content

Commit

Permalink
Merge pull request #1771 from thebiggive/BG2-2772-donation-not-using-…
Browse files Browse the repository at this point in the history
…continue

Fix BG2-2772: Donation not possible when navigating form without usin…
  • Loading branch information
bdsl authored Nov 26, 2024
2 parents c81eaf3 + d1c3283 commit 0b0beaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ <h3 class="b-rt-0 b-m-0 b-bold"><span class="span-hr"></span>How does Big Give u
</biggive-text-input>
@if (!donor) {
<div class="error" aria-live="polite">
<p>Payment fields require the "captcha" puzzle to be solved before we can show them safely.</p>
<p>Sorry, there was an error showing the payment field. Please try again or
<a href="https://biggive.org/contact-form/">contact us</a> if the problem persists.</p>
</div>
}
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,13 @@ export class DonationStartFormComponent implements AfterContentChecked, AfterCon
const stepperHeaders = stepper.getElementsByClassName('mat-step-header');
for (const stepperHeader of stepperHeaders) {
stepperHeader.addEventListener('click', (clickEvent: any) => {
if (clickEvent.target.index > 0) {
if (this.stepper.selectedIndex > 0) {
this.progressToNonAmountsStep(); // Handles amount error if needed, like Continue button does.
return;
}

// usages of clickEvent.target may be wrong - wouldn't type check if we typed clickEvent as PointerEvent
// instead of Any. But not changing right now as could create regression and doesn't relate to any known bug.
if (clickEvent.target.innerText.includes('Your details') && this.stepper.selected?.label === 'Gift Aid') {
this.triedToLeaveGiftAid = true;
}
Expand Down

0 comments on commit 0b0beaa

Please sign in to comment.