Skip to content

Commit b17f78c

Browse files
author
Chris Gårdenberg
committed
Fixes #163 Civic registration number only required if the contact is a participant as well
1 parent c329e2b commit b17f78c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

content/script/frontendjs.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ var eduBookingView = {
105105
document.querySelector('.contactMobile').value = cMobile;
106106
var tCivReg = document.querySelector('.contactCivReg');
107107
if (tCivReg) {
108-
if(this.ForceContactCivicRegNo) {
108+
document.getElementById('edu-contactCivReg').required = false;
109+
if(this.ForceContactCivicRegNo && contact == 1) {
109110
tCivReg.required = true;
111+
document.getElementById('edu-contactCivReg').required = true;
110112
}
111113
tCivReg.value = document.getElementById('edu-contactCivReg').value;
112114
}

0 commit comments

Comments
 (0)