Reset the motolite battery flag when loading page and loading customer vehicle. #546

This commit is contained in:
Korina Cordero 2021-03-19 10:08:07 +00:00 committed by Kendrick Chan
parent 28f5edf605
commit e0fab6703c

View file

@ -269,7 +269,7 @@
<div class="col-g-3">
<span class="m-switch m-switch--icon block-switch">
<label>
<input type="checkbox" name="flag_motolite_battery" id="flag-motolite-battery" value="1" disabled>
<input type="checkbox" name="flag_motolite_battery" id="flag-motolite-battery" value="1" {{ obj.getCustomerVehicle.getCurrentBattery|default(false) ? obj.getCustomerVehicle.hasMotoliteBattery ? ' checked' }} disabled>
<label class="switch-label">This vehicle is using a Motolite battery</label>
<span></span>
</label>
@ -1381,6 +1381,7 @@ $(function() {
$("#flag-motolite-battery").prop("checked", true);
} else {
$("#current-battery, #warranty-code, #warranty-expiration").val("No current battery").css('color', '#f4516c');
$("#flag-motolite-battery").prop("checked", false);
}
})
}).focus();