Exemple #1
0
        protected void RenderFieldHeader(TagHelperContext context, TagHelperOutput output)
        {
            RenderInfo(context, output, "div", () => {
                output.Attr("class", "aiplugs-field__header");
            }, () => {
                output.Tag("label", null, () => {
                    output.Text(Label);

                    output.Tag("span", () => {
                        output.Attr("class", $"aiplugs-field__badge {(Required ? "--required" : "--optional")}");
                    }, () => {
                        if (Required)
                        {
                            output.Html(Localizer.LabelRequired());
                        }

                        else
                        {
                            output.Html(Localizer.LabelOptional());
                        }
                    });
                });
            });
        }