InputSize simplification
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
@{
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, Html.GetInputSizeClass())
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
@{
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, Html.GetInputSizeClass())
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
@{
|
||||
@using MileageTraker.Web.Utility
|
||||
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, Html.GetInputSizeClass())
|
||||
@@ -1,12 +1,6 @@
|
||||
@{
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.Password("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.Password("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
|
||||
@Html.Password("", ViewData.TemplateInfo.FormattedModelValue, Html.GetInputSizeClass())
|
||||
@@ -1,17 +1,10 @@
|
||||
@{
|
||||
@using MileageTraker.Web.Utility
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
}
|
||||
@if (!(Model is Enum))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue)
|
||||
}
|
||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, Html.GetInputSizeClass())
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user