@using FHT.Agency.CommonTypes @using FHT.Agency.UI.ViewModels.Agent @using FHT.Utilities @using FHT.Agency.Web.Extensions @model FHT.Agency.UI.InputModels.Agent.CreateAgentAccountInputModel @Styles.Render("~/Content/select2") @{ ViewBag.Title = "创建代理商用户"; var agentRoles = EnumHelpers.Enum2Dictionary().Where(r => r.Key == FhtUserRoleType.AgentCustomerServiceStaff || r.Key == FhtUserRoleType.AgentAdmin).ToList(); var agentOrganizations = (IEnumerable)(ViewBag.AgentOrganizations); }
@using (Html.BeginForm("CreateAgent", "ManageAgent", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {
@Html.AntiForgeryToken() @Html.ValidationSummary(false, "", new { @class = "text-danger" })
@Html.RequiredLabelFor(m => m.AgentOrganizationId, new { @class = "col-md-2 control-label" })
@Html.ValidationMessageFor(m => m.AgentOrganizationId) @if (User.HasClaim(FhtUserClaimType.CreateAgentOrganization)) {
没有找到对应的代理商? @Html.ActionLink("创建代理商机构", "CreateAgentOrganization", "ManageAgent")
}
@Html.RequiredLabelFor(m => m.Role, new { @class = "col-md-2 control-label" }) @{ var radioIndex = 0; foreach (var role in agentRoles) { radioIndex++;
@{ string fileldId = "RoleRadio" + radioIndex; }
} } @Html.ValidationMessageFor(m => m.Role)
@Html.RequiredLabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.UserName, new { placeholder = "必须是6-40位英文字母或者数字,不包含其他符号", maxlength = 40, @class = "form-control" }) @Html.ValidationMessageFor(m => m.UserName)
@Html.RequiredLabelFor(m => m.DescriptiveName, new { @class = "col-md-2 control-label" })
@Html.TextBoxFor(m => m.DescriptiveName, new { placeholder = "必须至少包含2至4个字符", maxlength = 4, @class = "form-control" }) @Html.ValidationMessageFor(m => m.DescriptiveName)
@Html.RequiredLabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Password, new { placeholder = "至少包含6至40个字符", maxlength = 40 }) @Html.ValidationMessageFor(m => m.Password)
@Html.RequiredLabelFor(m => m.Mobile, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Mobile, new { maxlength = 11 }) @Html.ValidationMessageFor(m => m.Mobile)
@Html.RequiredLabelFor(m => m.Telephone, new { @class = "col-md-2 control-label" })
@Html.EditorFor(m => m.Telephone, new { maxlength = 20 }) @Html.ValidationMessageFor(m => m.Telephone)
}