@model EnVisage.Models.TeamModel @using EnVisage.Code.HtmlHelpers @using EnVisage.Code @{ ViewBag.Title = Model != null ? "Edit " + Model.Name : "Add New Team"; } @section Scripts { @if (Model != null) { } }
@using (Html.BeginForm("Edit", "Team", FormMethod.Post, new { @class = "panel form-horizontal" })) { @Html.AntiForgeryToken()
@Html.LabelFor(model => model.Name, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.Name, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.Name)
@Html.LabelFor(model => model.CompanyId, "Company", new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.CompanyId, Utils.GetCompanies(), new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.CompanyId)
@Html.LabelFor(model => model.CostCenterId, "Cost Center", new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.CostCenterId, Utils.GetCreditDepartments(), new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.CostCenterId)
@Html.LabelFor(model => model.ReportToId, "Report to", new { @class = "control-label col-sm-2" })
@Html.DropDownListFor(model => model.ReportToId, Utils.GetTeamContacts(Model.CompanyId), new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.ReportToId)
Contributors
@Html.Partial("_users", Model.Users)
Views
@Html.Partial("_views", Model.AllViews)
@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 { *@ Delete //} }
@if (Model != null) { Html.HiddenFor(model => model.Id); }
}