Added warning texts for face mask wearing when short_range_yes is selected
This commit is contained in:
parent
b67b2ccf16
commit
bc4e6c4720
3 changed files with 17 additions and 5 deletions
|
|
@ -256,6 +256,17 @@ function on_short_range_option_change() {
|
|||
if (this.checked) {
|
||||
getChildElement($(this)).show();
|
||||
require_fields(this);
|
||||
// Disable face mask selection if short_range_yes is selected
|
||||
if (this.id == "short_range_yes") {
|
||||
$('#mask_off').click();
|
||||
require_mask(false);
|
||||
$('input[name="mask_wearing_option"]').attr('disabled', true);
|
||||
$("#face_mask_warning").show();
|
||||
}
|
||||
else {
|
||||
$('input[name="mask_wearing_option"]').attr('disabled', false);
|
||||
$("#face_mask_warning").hide();
|
||||
}
|
||||
}
|
||||
else {
|
||||
getChildElement($(this)).hide();
|
||||
|
|
|
|||
|
|
@ -820,8 +820,10 @@ function draw_plot(svg_id, times, concentrations, short_range_concentrations, cu
|
|||
|
||||
// If user double click, reinitialize the chart
|
||||
vis.on("dblclick",function(){
|
||||
button_full_exposure.disabled = true;
|
||||
button_long_exposure.disabled = false;
|
||||
if (button_full_exposure || button_long_exposure) {
|
||||
button_full_exposure.disabled = true;
|
||||
button_long_exposure.disabled = false;
|
||||
}
|
||||
yRange.domain([0., Math.max(...short_range_concentrations)])
|
||||
yAxisEl.transition().call(d3.axisLeft(yRange))
|
||||
lineFunc.defined(d => !isNaN(d.concentration))
|
||||
|
|
|
|||
|
|
@ -268,6 +268,7 @@
|
|||
<label for="mask_on">Yes</label>
|
||||
<input class="ml-2" type="radio" id="mask_off" name="mask_wearing_option" value="mask_off" checked="checked">
|
||||
<label for="mask_off">No</label><br>
|
||||
<p id="face_mask_warning" class="red_text">Face mask selection is disabled due to short range interaction modeling.</p>
|
||||
|
||||
<div id="DIVmasks_used" style="display:none">
|
||||
<div class='sub_title'>Type of masks used:</div>
|
||||
|
|
@ -376,6 +377,7 @@
|
|||
</div>
|
||||
|
||||
<div id="DIVsr_interactions" class="none">
|
||||
<p class="red_text">Short range interactions are modeled without masks. If you are using this option, masks will not be taken into account.</p>
|
||||
<div class="d-flex">
|
||||
<button type="button" id="set_interactions_button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#short_range_dialog" data-keyboard="false" data-backdrop="static">Set interactions</button>
|
||||
<p class="align-self-center pl-4"><b id="sr_interactions">0</b> short range interactions.</p>
|
||||
|
|
@ -387,9 +389,6 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="short_range_dialogTitle">Short range interactions</h5>
|
||||
{# <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button> #}
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="col-md-12 p-0 form-group" id="dialog_sr">
|
||||
|
|
|
|||
Loading…
Reference in a new issue