src/ZKEACMS.FormGenerator/Views/EditorTemplates/Form.ValidCode.cshtml
(完整代码) 1KB@model ZKEACMS.FormGenerator.Models.FormField
@{
Style.Reqiured("captcha").AtHead();
Script.Reqiured("captcha").AtFoot();
string maxLength = "10";
Model.Attributes.TryAdd("data-val-length", L("The max length of {0} is {1}").Text.FormatWith(Model.DisplayName, maxLength));
Model.Attributes.TryAdd("data-val-length-max", maxLength);
Model.Attributes.TryAdd("data-captcha", Url.Action("Image", "Captcha"));
Model.Attributes["class"] = "required form-control image-captcha";
}
<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>
}
<table class="captcha-container">
<tbody>
<tr>
<td>
@Html.TextBox(Model.ID, Model.Value, Model.Attributes)
</td>
<td>
<a class="image-captcha" href="javascript:void(0)" data-captcha="@Url.Action("Image", "Captcha")">
<img src="@Url.Action("Image", "Captcha")" />
</a>
</td>
</tr>
</tbody>
</table>
@Html.ValidationMessage(Model.ID)
</div>
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。