InputSize simplification

This commit is contained in:
2015-07-21 23:07:41 -04:00
parent 5563e68d02
commit 8266598e0d
8 changed files with 38 additions and 73 deletions
@@ -1,17 +1,12 @@
@model DateTime?
@using MileageTraker.Web.Utility
@model DateTime?
@{
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
var val =
Model.HasValue
? Model.Value.ToShortDateString()
: string.Empty;
}
@if (!string.IsNullOrEmpty(inputSize))
{
@Html.TextBox("", (Model != DateTime.MinValue ? val : string.Empty ), new { @class = inputSize})
}
else
{
@Html.TextBox("", (Model != DateTime.MinValue ? val : string.Empty ))
}
@Html.TextBox("", (Model != DateTime.MinValue ? val : string.Empty ), Html.GetInputSizeClass())