mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
added engine hours variable.
This commit is contained in:
parent
5c2835ab76
commit
43fd40347f
@ -9,5 +9,6 @@
|
||||
public string Model { get; set; }
|
||||
public string LicensePlate { get; set; }
|
||||
public bool IsElectric { get; set; } = false;
|
||||
public bool UseHours { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,6 +33,10 @@
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="inputIsElectric" checked="@Model.IsElectric">
|
||||
<label class="form-check-label" for="inputIsElectric">Electric Vehicle</label>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="inputUseHours" checked="@Model.UseHours">
|
||||
<label class="form-check-label" for="inputUseHours">Use Engine Hours</label>
|
||||
</div>
|
||||
@if (!string.IsNullOrWhiteSpace(Model.ImageLocation))
|
||||
{
|
||||
<label for="inputImage">Replace picture(optional)</label>
|
||||
|
||||
@ -38,6 +38,7 @@ function saveVehicle(isEdit) {
|
||||
var vehicleModel = $("#inputModel").val();
|
||||
var vehicleLicensePlate = $("#inputLicensePlate").val();
|
||||
var vehicleIsElectric = $("#inputIsElectric").is(":checked");
|
||||
var vehicleUseHours = $("#inputUseHours").is(":checked");
|
||||
//validate
|
||||
var hasError = false;
|
||||
if (vehicleYear.trim() == '' || parseInt(vehicleYear) < 1900) {
|
||||
@ -74,7 +75,8 @@ function saveVehicle(isEdit) {
|
||||
make: vehicleMake,
|
||||
model: vehicleModel,
|
||||
licensePlate: vehicleLicensePlate,
|
||||
isElectric: vehicleIsElectric
|
||||
isElectric: vehicleIsElectric,
|
||||
useHours: vehicleUseHours
|
||||
}, function (data) {
|
||||
if (data) {
|
||||
if (!isEdit) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user