@using Orchard.DisplayManagement.Shapes @using Orchard.DynamicForms.Elements @using Orchard.Layouts.Helpers @{ var element = (PasswordField)Model.Element; var tagBuilder = (OrchardTagBuilder)TagBuilderExtensions.CreateElementTagBuilder(Model, "input"); tagBuilder.AddCssClass("text"); tagBuilder.Attributes["type"] = "password"; tagBuilder.Attributes["name"] = Model.ProcessedName; tagBuilder.AddClientValidationAttributes((IDictionary)Model.ClientValidationAttributes); if (!ViewData.ModelState.IsValidField(element.Name)) { tagBuilder.AddCssClass("input-validation-error"); } } @if (element.ShowLabel) { } @tagBuilder.ToHtmlString(TagRenderMode.SelfClosing) @if (element.ValidationSettings.ShowValidationMessage == true) { @Html.ValidationMessage((string)Model.ProcessedName) }