@model EnVisage.Models.ContactModel @{ ViewBag.Title = Model != null && Model.Id != Guid.Empty ? "Edit " + Model.FirstName + " " + Model.LastName : "Add New Contact"; } @section Scripts { }
@using (Html.BeginForm("Edit", "Contact", FormMethod.Post, new { @class = "panel form-horizontal" })) { @Html.AntiForgeryToken() @Html.HiddenFor(t=>t.Id)
@Html.EditorFor(model => model.ParentId) @Html.ValidationMessageFor(model => model.ParentId)
@Html.LabelFor(model => model.FirstName, new { @class = "control-label col-md-2" })
@Html.TextBoxFor(model => model.FirstName, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.FirstName)
@Html.LabelFor(model => model.LastName, new { @class = "control-label col-md-2" })
@Html.TextBoxFor(model => model.LastName, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.LastName)
@Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
@Html.TextBoxFor(model => model.Email, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.Email)
@Html.LabelFor(model => model.Phone, new { @class = "control-label col-md-2" })
@Html.TextBoxFor(model => model.Phone, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.Phone)
@Html.LabelFor(model => model.ContactClassification, new { @class = "control-label col-md-2" })
@Html.DropDownListFor(model => model.ContactClassification, EnVisage.Code.Utils.GetContactClassification(), new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.ContactClassification)
@Html.ValidationSummary(false, "The contact could not be saved due to the following errors:")
}