mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
21 lines
635 B
Plaintext
21 lines
635 B
Plaintext
@using Orchard.DynamicForms.Elements
|
|
@using Orchard.Layouts.Helpers
|
|
@{
|
|
var element = (PasswordField)Model.Element;
|
|
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "input");
|
|
|
|
tagBuilder.AddCssClass("text design");
|
|
tagBuilder.Attributes["type"] = "password";
|
|
tagBuilder.Attributes["value"] = element.Value;
|
|
tagBuilder.Attributes["name"] = element.Name;
|
|
}
|
|
|
|
@if (element.ShowLabel) {
|
|
<div>
|
|
<label for="@element.HtmlId">@element.Label</label>
|
|
@tagBuilder.ToHtmlString(TagRenderMode.SelfClosing)
|
|
</div>
|
|
}
|
|
else {
|
|
@tagBuilder.ToHtmlString(TagRenderMode.SelfClosing)
|
|
} |