Files
LeafWeb/Web/Views/Shared/EditorTemplates/EmailAddress.cshtml
T
2016-01-18 13:45:43 -05:00

30 lines
710 B
Plaintext

@using LeafWeb.Web.Utility
@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);
}
else
{
htmlAttributes.Add("type", "email");
}
if (ViewBag.placeholder != null)
{
htmlAttributes.Add("placeholder", ViewBag.placeholder);
}
}
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)