@* ENV-648 @model EnVisage.AspNetUser *@ @model EnVisage.Models.UserModel @using EnVisage.Code.HtmlHelpers @{ //ViewBag.Title = (!string.IsNullOrEmpty(Model.Id)) ? "Edit " + Model.UserName : "Add New User"; ViewBag.Title = (Model.Id != Guid.Empty) ? "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.Hidden("Id", Model.Id)
@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.FirstName, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.FirstName, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.FirstName)
@Html.LabelFor(model => model.LastName, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.LastName, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.LastName)
@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))*@ if (Model.Id != Guid.Empty) { Delete } //} }
@*@if (Model != null) { Html.HiddenFor(model => model.Id); }*@ @*@if (Model != null) { Html.HiddenFor(model => model.Discriminator); }*@ @if (Model != null) { Html.Hidden("Discriminator", Model.Discriminator); }
}