src/ZKEACMS.FormGenerator/Views/EditorTemplates/Form.Radio.cshtml

(完整代码) 1KB

@model ZKEACMS.FormGenerator.Models.FormField
@{
    var attributes = Model.Attributes;
    if (attributes.ContainsKey("class"))
    {
        attributes["class"] = attributes["class"].ToString().Replace("form-control", "");
    }
}
<div class="form-group size-@Model.Size">
    @if (Model.DisplayName.IsNotNullAndWhiteSpace())
    {
        <label class="control-label" for="@Model.ID">
            @Model.DisplayName
            @if (Model.IsRequired)
            {
                <span class="required">*</span>
            }
        </label>
    }
    @if (Model.Description.IsNotNullAndWhiteSpace())
    {
        <span class="text-muted">
            <span>@Model.Description</span>
        </span>
    }
    <div>
        @foreach (var item in Model.FieldOptions)
        {
            <div class="radio">
                <label>
                    @Html.RadioButton(Model.ID, item.Value, item.Selected ?? item == Model.FieldOptions.First(), attributes)
                    @item.DisplayText
                </label>
            </div>
        }
    </div>
    @Html.ValidationMessage(Model.ID)
</div>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。