mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-11 04:37:03 -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 Model { get; set; }
|
||||||
public string LicensePlate { get; set; }
|
public string LicensePlate { get; set; }
|
||||||
public bool IsElectric { get; set; } = false;
|
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">
|
<input class="form-check-input" type="checkbox" role="switch" id="inputIsElectric" checked="@Model.IsElectric">
|
||||||
<label class="form-check-label" for="inputIsElectric">Electric Vehicle</label>
|
<label class="form-check-label" for="inputIsElectric">Electric Vehicle</label>
|
||||||
</div>
|
</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))
|
@if (!string.IsNullOrWhiteSpace(Model.ImageLocation))
|
||||||
{
|
{
|
||||||
<label for="inputImage">Replace picture(optional)</label>
|
<label for="inputImage">Replace picture(optional)</label>
|
||||||
|
|||||||
@ -38,6 +38,7 @@ function saveVehicle(isEdit) {
|
|||||||
var vehicleModel = $("#inputModel").val();
|
var vehicleModel = $("#inputModel").val();
|
||||||
var vehicleLicensePlate = $("#inputLicensePlate").val();
|
var vehicleLicensePlate = $("#inputLicensePlate").val();
|
||||||
var vehicleIsElectric = $("#inputIsElectric").is(":checked");
|
var vehicleIsElectric = $("#inputIsElectric").is(":checked");
|
||||||
|
var vehicleUseHours = $("#inputUseHours").is(":checked");
|
||||||
//validate
|
//validate
|
||||||
var hasError = false;
|
var hasError = false;
|
||||||
if (vehicleYear.trim() == '' || parseInt(vehicleYear) < 1900) {
|
if (vehicleYear.trim() == '' || parseInt(vehicleYear) < 1900) {
|
||||||
@ -74,7 +75,8 @@ function saveVehicle(isEdit) {
|
|||||||
make: vehicleMake,
|
make: vehicleMake,
|
||||||
model: vehicleModel,
|
model: vehicleModel,
|
||||||
licensePlate: vehicleLicensePlate,
|
licensePlate: vehicleLicensePlate,
|
||||||
isElectric: vehicleIsElectric
|
isElectric: vehicleIsElectric,
|
||||||
|
useHours: vehicleUseHours
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
if (!isEdit) {
|
if (!isEdit) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user