85 lines
3.7 KiB
Plaintext
85 lines
3.7 KiB
Plaintext
@model MileageTraker.Web.ViewModels.ConfirmCreateLogViewModel
|
|
|
|
@{
|
|
ViewBag.Title = "Confirm";
|
|
ViewBag.PageStyle = "~/Content/CreateLog/Index.css";
|
|
Layout = "~/Views/Shared/_Layout.min.cshtml";
|
|
var endOdometerStyle = Model.PreviousOdometer != null ? "style=padding-bottom:0px;" : "";
|
|
}
|
|
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
|
|
|
@using (Html.BeginForm("Action", "CreateLog", FormMethod.Post))
|
|
{
|
|
@:<fieldset>
|
|
<legend>@ViewBag.Title</legend>
|
|
<p class="warning">Please <strong>confirm</strong> - entry not complete until <strong>confirm</strong> clicked</p>
|
|
if (Model.Miles == 0)
|
|
{
|
|
<p class="warning"><strong>Warning - 0 miles are logged - is this a duplicate?</strong></p>
|
|
}
|
|
<div class="display-field-container vehicle-id">
|
|
<div class="display-label">
|
|
@Html.LabelFor(model => model.VehicleId)
|
|
</div>
|
|
<div class="display-field @Model.VehicleColor">
|
|
@Html.Encode(Model.VehicleId) <span class="subscript">(@Model.VehicleType)</span>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="VehicleId" value="@Html.AttributeEncode(Model.VehicleId)" />
|
|
<div class="display-field-container endodometer" @endOdometerStyle>
|
|
<div class="display-label">
|
|
@Html.LabelFor(model => model.EndOdometer)
|
|
</div>
|
|
<div class="display-field">
|
|
@Html.Encode(Model.EndOdometer)
|
|
@if (Model.PreviousOdometer != null)
|
|
{
|
|
<br/>
|
|
<span class="subscript @if (Model.Miles == 0)
|
|
{ <text>warning error</text>}">@Html.Encode(Model.Miles) miles since <br />
|
|
@Html.Encode(Model.PreviousOdometer) on @Html.Encode(Model.PreviousDate.Value.ToShortDateString())</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
<input type="hidden" name="EndOdometer" value="@Html.AttributeEncode(Model.EndOdometer)" />
|
|
@Html.DisplayFor(model => model.LogType)
|
|
<input type="hidden" name="LogType.Enum" value="@Html.AttributeEncode(Model.LogType.Enum)" />
|
|
@Html.DisplayFor(model => model.EmployeeName)
|
|
<input type="hidden" name="EmployeeName" value="@Html.AttributeEncode(Model.EmployeeName)" />
|
|
@Html.DisplayFor(model => model.CityName)
|
|
<input type="hidden" name="CityName" value="@Html.AttributeEncode(Model.CityName)" />
|
|
|
|
<div class="display-field-container gas">
|
|
<div class="display-label">
|
|
@Html.LabelFor(model => model.GasPurchased)
|
|
</div>
|
|
<div class="display-field">
|
|
@if (!string.IsNullOrEmpty(Model.GasPurchased))
|
|
{
|
|
@Model.GasPurchased <span class="units">Gallons</span>
|
|
}
|
|
else
|
|
{
|
|
<text>No Gas Purchased</text>
|
|
}
|
|
<input type="hidden" name="GasPurchased" value="@Html.AttributeEncode(Model.GasPurchased)" />
|
|
</div>
|
|
</div>
|
|
<div class="display-field-container date">
|
|
<div class="display-label">
|
|
@Html.LabelFor(model => model.Date)
|
|
</div>
|
|
<div class="display-field">
|
|
@Html.Encode(Model.Date)
|
|
<span class="subscript">(@Html.Encode(Model.DateHowLongAgo))</span>
|
|
<input type="hidden" name="Date" value="@Html.AttributeEncode(Model.Date)" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="submit">
|
|
<input type="submit" name="Edit" value="Back" />
|
|
<input type="submit" name="Confirm" value="Confirm" />
|
|
</div>
|
|
@:</fieldset>
|
|
}
|