Skip to content
Snippets Groups Projects

Resolve "Selecting exam lab when creating a lab, does not imply sign off intervals"

2 files
+ 19
11
Compare changes
  • Side-by-side
  • Inline

Files

@@ -318,25 +318,33 @@
@@ -318,25 +318,33 @@
});
});
$('#inputTimeIntervals').change(function () {
$('#inputTimeIntervals').change(function () {
if ($('input[name=signOffIntervals]').is(':checked')) {
toggleTimeIntervals();
$('#intervalTime').prop('disabled', false);
$('#capacity').prop('disabled', false);
$('#slotSelectionOpensAt').prop('disabled', false);
} else {
$('#intervalTime').prop('disabled', true);
$('#capacity').prop('disabled', true);
$('#slotSelectionOpensAt').prop('disabled', true);
}
});
});
 
$('#inputExamLab').change(function() {
$('#inputExamLab').change(function() {
if ($('#inputExamLab').is(':checked')) {
if ($('#inputExamLab').is(':checked')) {
$('#percentageExamLab').prop('disabled', false)
$('#percentageExamLab').prop('disabled', false)
 
$('#inputTimeIntervals').prop('checked', true);
 
toggleTimeIntervals();
} else {
} else {
$('#percentageExamLab').prop('disabled', true)
$('#percentageExamLab').prop('disabled', true)
}
}
});
});
});
});
 
 
const toggleTimeIntervals = () => {
 
if ($('input[name=signOffIntervals]').is(':checked')) {
 
$('#intervalTime').prop('disabled', false);
 
$('#capacity').prop('disabled', false);
 
$('#slotSelectionOpensAt').prop('disabled', false);
 
} else {
 
$('#intervalTime').prop('disabled', true);
 
$('#capacity').prop('disabled', true);
 
$('#slotSelectionOpensAt').prop('disabled', true);
 
$('#inputExamLab').prop('checked', false);
 
$('#percentageExamLab').prop('disabled', true)
 
}
 
}
</script>
</script>
</section>
</section>
</body>
</body>
Loading