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
+4 -10
View File
@@ -1,13 +1,7 @@
@model DateTime
@using MileageTraker.Web.Utility
@model DateTime
@{
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
}
@if (!string.IsNullOrEmpty(inputSize))
{
@Html.TextBox("", (Model != DateTime.MinValue ? Model.ToShortDateString() : string.Empty ), new { @class = inputSize})
}
else
{
@Html.TextBox("", (Model != DateTime.MinValue ? Model.ToShortDateString() : string.Empty ))
}
@Html.TextBox("", (Model != DateTime.MinValue ? Model.ToShortDateString() : string.Empty ), Html.GetInputSizeClass())