Skip to content

Commit

Permalink
Fix js error on register page
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Paige committed Mar 11, 2024
1 parent e7b755b commit 7a8f0c2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions b2c/views/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
function addTsAndCsLink() {
const tsAndCsBlock = document.getElementsByClassName('CheckboxMultiSelect')[0];
if (tsAndCsBlock) {
const tsAndCsLabel = tsAndCsBlock.getElementsByTagName('label')[1];
if (tsAndCsLabel) {
tsAndCsLabel.innerHTML = tsAndCsLabel.innerHTML = 'I agree to the <a href="https://pre-portal.staging.platform.hmcts.net/terms-and-conditions" target="_blank">Terms &amp; Conditions</a> (including Acceptable Use) for the Section 28 Video on Demand Portal.'
const tsAndCsLabel = tsAndCsBlock.getElementsByTagName('label')[0];
const tsAndCsText = tsAndCsBlock.getElementsByTagName('label')[1];
// fix the wrong for attribute supplied by B2C
tsAndCsLabel.setAttribute('for', tsAndCsText.getAttribute('for'));
if (tsAndCsText) {
tsAndCsText.innerHTML = tsAndCsText.innerHTML = 'I agree to the <a href="https://pre-portal.staging.platform.hmcts.net/terms-and-conditions" target="_blank">Terms &amp; Conditions</a> (including Acceptable Use) for the Section 28 Video on Demand Portal.'
}
}
}
Expand Down

0 comments on commit 7a8f0c2

Please sign in to comment.