Publish to production: MSS 2026 fixes, blog/news cards, mobile UI, Capital sponsor, SI guide #27
|
|
@ -151,8 +151,9 @@
|
|||
.msreg .ms-field { min-width: 0; }
|
||||
.msreg .ms-field select, .msreg .ms-field input { max-width: 100%; }
|
||||
|
||||
/* "study plans" block (always visible, required) */
|
||||
/* "study plans" block (shown for students; hidden for parents / "other") */
|
||||
.msreg .ev-plans { margin-top: 24px; border: 1px solid #EAECF0; border-radius: 12px; background: #FBFCFD; padding: 4px 18px 20px; }
|
||||
.msreg .ev-plans[hidden] { display: none; }
|
||||
.msreg .ev-plans-title { font-size: 16px; font-weight: 700; color: #101828; margin: 16px 0 2px; }
|
||||
.msreg .ev-plans-lead { font-size: 13px; color: #98A2B3; margin: 0 0 6px; }
|
||||
.msreg .ev-subhead { font-size: 13px; font-weight: 700; color: #98A2B3; text-transform: uppercase; letter-spacing: 0.05em; margin: 20px 0 10px; }
|
||||
|
|
|
|||
|
|
@ -61,6 +61,19 @@
|
|||
});
|
||||
});
|
||||
|
||||
/* ---- role gate: parents and "other" won't study, so hide the study-plans block ---- */
|
||||
(function () {
|
||||
var roleSel = form.querySelector('select[data-name="role"]');
|
||||
var plans = form.querySelector('.ev-plans');
|
||||
if (!roleSel || !plans) return;
|
||||
function syncPlans() {
|
||||
var r = roleSel.value;
|
||||
plans.hidden = (r === 'parent' || r === 'other');
|
||||
}
|
||||
roleSel.addEventListener('change', syncPlans);
|
||||
syncPlans();
|
||||
})();
|
||||
|
||||
/* ---- multi-select chip groups, if any (kept for compatibility) ---- */
|
||||
[].slice.call(form.querySelectorAll('.ms-multi')).forEach(function (group) {
|
||||
[].slice.call(group.querySelectorAll('.ms-chip')).forEach(function (chip) {
|
||||
|
|
@ -82,6 +95,7 @@
|
|||
function validate() {
|
||||
var ok = true;
|
||||
[].slice.call(form.querySelectorAll('[data-required="1"]')).forEach(function (el) {
|
||||
if (el.closest('[hidden]')) return; // fields hidden by conditional logic aren't required
|
||||
if (el.classList.contains('ms-radios')) { if (!el.querySelector('.ms-radio.is-selected')) ok = false; }
|
||||
else if (el.classList.contains('ms-multi')) { if (!el.querySelector('.ms-chip.is-selected')) ok = false; }
|
||||
else if (el.type === 'checkbox') { if (!el.checked) ok = false; }
|
||||
|
|
@ -95,7 +109,7 @@
|
|||
var d = {};
|
||||
[].slice.call(form.querySelectorAll('[data-name]')).forEach(function (el) {
|
||||
var name = el.getAttribute('data-name');
|
||||
if (el.closest('.ev-cond') && el.closest('.ev-cond').hidden) return; // skip hidden "Other" field
|
||||
if (el.closest('[hidden]')) return; // skip fields in hidden sections (conditional "Other", study plans for parents/others)
|
||||
if (el.classList.contains('ms-radios')) { var v = radioValue(name); if (v) d[name] = v; }
|
||||
else if (el.classList.contains('ms-multi')) {
|
||||
var sel = [].slice.call(el.querySelectorAll('.ms-chip.is-selected')).map(function (c) { return c.getAttribute('data-value'); });
|
||||
|
|
|
|||
Loading…
Reference in New Issue