Files
LeafWeb/Web/Views/Shared/EditorTemplates/String.cshtml
T
2016-01-13 21:56:22 -05:00

27 lines
622 B
Plaintext

@model object
@{
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
}
@{
var htmlAttributes = new RouteValueDictionary();
if (ViewBag.@class != null)
{
htmlAttributes.Add("class", "form-control " + ViewBag.@class);
}
else
{
htmlAttributes.Add("class", "form-control");
}
if (ViewBag.@type != null)
{
htmlAttributes.Add("type", ViewBag.@type);
}
if (ViewBag.placeholder != null)
{
htmlAttributes.Add("placeholder", ViewBag.placeholder);
}
}
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)