Add reactive to mileage entry page
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
@model MileageTraker.Web.ViewModels.ConfirmCreateLogViewModel
|
||||
@model MileageTraker.Web.ViewModels.ConfirmCreateLogViewModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Confirm";
|
||||
@@ -8,17 +8,16 @@
|
||||
@section Styles
|
||||
{
|
||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/CreateLog.Index.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
|
||||
@using (Html.BeginForm("Action", "CreateLog", FormMethod.Post))
|
||||
{
|
||||
@:<fieldset>
|
||||
<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="alert">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>
|
||||
<p class="alert"><span class="label label-important">Warning</span> No mileage being logged - <strong>is this a duplicate?</strong></p>
|
||||
}
|
||||
<div class="display-field-container vehicle-id">
|
||||
<div class="display-label">
|
||||
@@ -28,8 +27,8 @@
|
||||
@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>
|
||||
@Html.HiddenFor(m => m.VehicleId)
|
||||
<div class="display-field-container endodometer" @endOdometerStyle>
|
||||
<div class="display-label">
|
||||
@Html.LabelFor(model => model.EndOdometer)
|
||||
</div>
|
||||
@@ -38,19 +37,19 @@
|
||||
@if (Model.PreviousOdometer != null)
|
||||
{
|
||||
<br/>
|
||||
<span class="subscript @if (Model.Miles == 0)
|
||||
{ <text>warning error</text>}">@Html.Encode(Model.Miles) miles since <br />
|
||||
<span class="subscript @if (Model.Miles == 0)
|
||||
{ <text>label label-warning</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)" />
|
||||
<input type="hidden" name="EndOdometer" value="@Html.AttributeEncode(Model.EndOdometer)" />
|
||||
@Html.DisplayFor(model => model.LogType)
|
||||
@Html.HiddenFor(model => model.LogType.Value)
|
||||
@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">
|
||||
@@ -74,14 +73,13 @@
|
||||
</div>
|
||||
<div class="display-field">
|
||||
@Html.Encode(Model.Date)
|
||||
<span class="subscript">(@Html.Encode(Model.DateHowLongAgo))</span>
|
||||
<span class="muted">(@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>
|
||||
<input type="submit" name="Edit" value="Back" class="btn" />
|
||||
<input type="submit" name="Confirm" value="Confirm" class="btn btn-primary" />
|
||||
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model MileageTraker.Web.Models.Log
|
||||
@model MileageTraker.Web.Models.Log
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Log Details";
|
||||
@@ -8,23 +8,23 @@
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.LogId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Delete", "Delete", new { id = Model.LogId }, new { @class = "btn" })
|
||||
</div>
|
||||
|
||||
@Html.DisplayForModel()
|
||||
|
||||
<div>
|
||||
<ul class="pager">
|
||||
<li class="previous">
|
||||
@Html.ActionLink("Previous", "PreviousDetails", new { id = Model.LogId })
|
||||
</li>
|
||||
@if(TempData["Message"] != null) {
|
||||
@if(TempData["Message"] != null) { // so, yeah, span doesn't go here, but it renders
|
||||
<span class="alert">@TempData["Message"]</span>
|
||||
}
|
||||
<li class="next">
|
||||
@Html.ActionLink("Next", "NextDetails", new { id = Model.LogId })
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@Html.DisplayForModel()
|
||||
|
||||
<div class="btn-toolbar">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.LogId }, new { @class = "btn" })
|
||||
@Html.ActionLink("Delete", "Delete", new { id = Model.LogId }, new { @class = "btn" })
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<script src="@Url.Content("~/Scripts/jquery.qtip.min.js")" type="text/javascript"></script>
|
||||
}
|
||||
|
||||
<h2><img src="/Content/images/glyphicons_026_road.png"/> @ViewBag.Title</h2>
|
||||
<h2 id="log-title">@ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar">
|
||||
@using (Html.BeginForm("Index", "Log", FormMethod.Get, new { id = "filter", @class = "form-inline" }))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = null;
|
||||
var lowerPropertyName = @CustomExtensions.LowercaseFirst(ViewData.ModelMetadata.PropertyName);
|
||||
@@ -28,6 +28,6 @@
|
||||
@if (!string.IsNullOrEmpty(formatHint)) {
|
||||
<div><small><em>@formatHint</em></small></div>
|
||||
}
|
||||
<span class="help-inline">@Html.ValidationMessage("")</span>
|
||||
<span class="help-block">@Html.ValidationMessage("")</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Mileage Traker - ETHRA - @ViewBag.Title</title>
|
||||
@@ -30,8 +30,8 @@
|
||||
<script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.custom.min.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/Shared/Site.js")" type="text/javascript"></script>
|
||||
<script src="@Url.Content("~/Scripts/jquery.numeric.js")" type="text/javascript"></script>
|
||||
@RenderSection("Scripts", false)
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Mileage Traker - ETHRA - @ViewBag.Title</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link href="@Url.Content("~/Content/themes/custom-theme/jquery-ui-1.9.2.custom.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/bootstrap-responsive.min.css")" rel="stylesheet" type="text/css" />
|
||||
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
|
||||
@RenderSection("Styles", false)
|
||||
|
||||
@@ -12,7 +13,7 @@
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<div class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="navbar navbar-static-top navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<span class="brand" ></span>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model MileageTraker.Web.Models.Vehicle
|
||||
@model MileageTraker.Web.Models.Vehicle
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Vehicle Details";
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
<h2>@ViewBag.Title</h2>
|
||||
|
||||
@Html.DisplayForModel()
|
||||
|
||||
<div class="btn-toolbar">
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.VehicleId }, new { @class = "btn" })
|
||||
</div>
|
||||
|
||||
@Html.DisplayForModel()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<link href="@Url.Content("~/Content/VehicleColors.css")" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
|
||||
<h2><img src="/Content/images/glyphicons_005_car.png"/> @ViewBag.Title</h2>
|
||||
<h2 id="vehicle-title">@ViewBag.Title</h2>
|
||||
|
||||
<div class="btn-toolbar">
|
||||
@Html.ActionLink("Add another vehicle", "Create", null, new{@class="btn"})
|
||||
|
||||
Reference in New Issue
Block a user