@model EnVisage.AspNetUser @using EnVisage.Code.HtmlHelpers @{ ViewBag.Title = (!string.IsNullOrEmpty( Model.Id)) ? "Edit " + Model.UserName : "Add New User"; } @section Scripts { }
@using (Html.BeginForm("Edit", "User", FormMethod.Post, new { @id="frmEditUser", @class = "panel form-horizontal", @onsubmit="return beforeSubmit();" })) { @Html.AntiForgeryToken()
@Html.LabelFor(model => model.UserName, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.UserName, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.UserName)
@Html.LabelFor(model => model.Email, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.Email, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.Email)
@Html.LabelFor(model => model.Phone, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.Phone, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.Phone)
@Html.CheckBoxFor(model => model.PreferredResourceAllocation, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.PreferredResourceAllocation)
Roles
@Html.GetRolesList(@Url, Model)
@Html.GetAreaItemsList(@Url, Model)
@Html.ValidationSummary(false, "The user could not be saved due to the following errors:")
Back to list @if (Model != null) { @*if (Model.Projects.Count > 0) { Delete } else { *@ if (!string.IsNullOrEmpty( Model.Id)) { Delete } //} }
@if (Model != null) { Html.HiddenFor(model => model.Id); } @if (Model != null) { Html.HiddenFor(model => model.Discriminator); }
}