@model EnVisage.Models.UserModel @using EnVisage.Code.HtmlHelpers @using EnVisage.Code @{ var availableCompanies = Utils.GetCompaniesTreeAll(); var availableWfRoles = Utils.GetWorkFlowRoles(); // set Hours/Resources default value to Resources if (Guid.Empty.Equals(Model.Id)) { Model.PreferredResourceAllocation = true; } }
@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", @checked="checked" }) @Html.ValidationMessageFor(model => model.PreferredResourceAllocation)
@Html.CheckBoxFor(model => model.PreferredTotalsDisplaying, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.PreferredTotalsDisplaying)
@Html.CheckBoxFor(model => model.ShowAutomaticViews, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.ShowAutomaticViews)
@Html.LabelFor(model => model.CompaniesWatcher, new { @class = "col-sm-2 control-label" })
@Html.LabelFor(model => model.CompaniesContributor, new { @class = "col-sm-2 control-label" })
@*@if (availableWfRoles.Count() > 0) {*@
@Html.LabelFor(model => model.WorkFlowRoles, new { @class = "col-sm-2 control-label" })
@* }*@
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.Id != Guid.Empty) { Delete } }
@if (Model != null) { Html.Hidden("Discriminator", Model.Discriminator); }
}