Esempio n. 1
0
        public void Modify(ElementRequest request)
        {
            var tag = request.CurrentTag;

            if (tag.IsInputElement() && !tag.HasAttr("id"))
            {
                tag.Id(DefaultIdBuilder.Build(request));
            }
        }
Esempio n. 2
0
        public HtmlTag Build(ElementRequest request)
        {
            // HtmlTags is not using configured element naming convention for Selects
            // That's way we are doing manually here
            request.ElementId = HtmlConfiguration.ElementNamingConvention
                                .GetName(request.Accessor.OwnerType, request.Accessor);

            var id = DefaultIdBuilder.Build(request);

            return(new HtmlTag("div")
                   .Attr("hidden", "hidden")
                   .Data("for", id)
                   .Id($"{id}-validation")
                   .Attr("name", request.ElementId));
        }
Esempio n. 3
0
 public HtmlTag Build(ElementRequest request)
 {
     return(new HtmlTag("label").Attr("for", DefaultIdBuilder.Build(request))
            .Text(BreakUpCamelCase(request.Accessor.PropertyNames.LastOrDefault())));
 }