Files
LeafWeb/WebCms/Views/Shared/EditorTemplates/EmailAddress.cshtml
T
poprhythm 8452a9cce0 Add registration workflow
Update unobtrusive Validation
2020-01-10 14:52:11 -05:00

30 lines
693 B
Plaintext

@using LeafWeb.WebCms.Utility
@model object
@{
Layout = "_FieldLayout.cshtml";
}
@{
var htmlAttributes = new RouteValueDictionary();
htmlAttributes.Add("type", "email");
var controlClass = "form-control";
if (ViewBag.@class != null)
{
controlClass = string.Concat(controlClass, " ", ViewBag.@class);
}
if (ViewBag.placeholder != null)
{
htmlAttributes.Add("placeholder", ViewBag.placeholder);
}
if (Html.HasError())
{
controlClass = string.Concat(controlClass, " ", "is-invalid");
}
htmlAttributes.Add("class", controlClass);
}
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)