diff --git a/Prototypes/nscp-camper-registration.html b/Prototypes/nscp-camper-registration.html index 18acb5f..3b6705f 100644 --- a/Prototypes/nscp-camper-registration.html +++ b/Prototypes/nscp-camper-registration.html @@ -61,6 +61,9 @@ if (s) s.remove(); document.querySelectorAll('.govbb-error-message').forEach(function(e){e.remove();}); document.querySelectorAll('[aria-invalid]').forEach(function(el){el.removeAttribute('aria-invalid');el.removeAttribute('aria-describedby');}); + if (document.title.indexOf('Error: ') === 0) { + document.title = document.title.substring('Error: '.length); + } }; GovBB.showErrors = function(errors) { GovBB.clearErrors(); @@ -89,6 +92,15 @@ msg.className='govbb-error-message'; msg.id=errId; msg.textContent=e.msg; var group = el.closest('.govbb-form-group')||el.closest('fieldset')||el.parentElement; if (group) group.appendChild(msg); + /* DOB highlight: if the error targets any of the three DOB parts, + mark all three as aria-invalid so the whole group shows the + error styling — not just "Day". */ + if (e.id === 'dob-day' || e.id === 'dob-month' || e.id === 'dob-year') { + ['dob-day','dob-month','dob-year'].forEach(function(id){ + var p = document.getElementById(id); + if (p) p.setAttribute('aria-invalid','true'); + }); + } }); if (!document.title.startsWith('Error:')) document.title = 'Error: ' + document.title; }; @@ -106,6 +118,8 @@ 'camper-details', 'camper-health', 'camp', + 'activities', + 'photos', 'nutrition', 'guardian-name', 'guardian-contact', @@ -231,15 +245,18 @@ } function camperFullName() { - return GovBB.D['camper-fullname'] || ''; + return [GovBB.D['camper-first-name'], GovBB.D['camper-other-names'], GovBB.D['camper-surname']] + .filter(Boolean).map(function(s){return String(s).trim();}).filter(Boolean).join(' '); } function guardianFullName() { - return GovBB.D['guardian-fullname'] || ''; + return [GovBB.D['guardian-first-name'], GovBB.D['guardian-other-names'], GovBB.D['guardian-surname']] + .filter(Boolean).map(function(s){return String(s).trim();}).filter(Boolean).join(' '); } function emergencyFullName() { - return GovBB.D['emerg-fullname'] || ''; + return [GovBB.D['emerg-first-name'], GovBB.D['emerg-other-names'], GovBB.D['emerg-surname']] + .filter(Boolean).map(function(s){return String(s).trim();}).filter(Boolean).join(' '); } function curriculumSummary() { @@ -308,9 +325,23 @@
Camp staff cannot give any medication without written permission from a parent or guardian. Download the form, sign it, and upload a scan or clear photo. Accepted formats: PDF, JPG, PNG. Maximum size: 10 MB.
+Download the Medication Authorisation Form (PDF)
${(() => { const f = GovBB.D['upload-medication-auth']; if (f) { @@ -515,7 +547,7 @@