@model EnVisage.Models.StatusModel @using EnVisage.Code; @{ ViewBag.Title = Model != null ? "Edit " + Model.Name : "Add New Status"; } @section Scripts { }
@using (Html.BeginForm("Edit", "Status", FormMethod.Post, new { @class = "panel form-horizontal" })) { @Html.AntiForgeryToken() @Html.HiddenFor(model => model.Id)
@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.Color, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.Color, new { @class = "form-control", @id = "input-color" }) @Html.ValidationMessageFor(model => model.Color)
@Html.LabelFor(model => model.Probability100, new { @class = "col-sm-2 control-label" })
@Html.DropDownListFor(model => model.Probability100, Utils.GetYesNo(), new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.Probability100)
@Html.Label("Project change notifications", new { @class = "col-sm-2 control-label",@Id= "NotifyOnProjectChangeLbl" })
@Html.CheckBoxFor(model => model.NotifyOnProjectChange, new { @class = "control-label changecontacts_sw" }) @Html.ListBoxFor(model => model.ChangeNotificationContacts, EnVisage.Code.Utils.GetWorkFlowContacts(Model.Id), new { @class = "int-changecontacts form-control forselect2" }) @Html.ValidationMessageFor(model => model.ChangeNotificationContacts)
@Html.Label("Project deleted notifications", new { @class = "col-sm-2 control-label", @Id = "NotifyOnProjectdeleteLbl" })
@Html.CheckBoxFor(model => model.NotifyOnProjectDelete, new { @class = "control-label deletecontacts_sw" }) @Html.ListBoxFor(model => model.DeleteNotificationContacts, EnVisage.Code.Utils.GetWorkFlowContacts(Model.Id), new { @class = "int-deletecontacts form-control forselect2" }) @Html.ValidationMessageFor(model => model.DeleteNotificationContacts)
@Html.Label("Project created notifications", new { @class = "col-sm-2 control-label", @Id = "NotifyOnProjectcreateLbl" })
@Html.CheckBoxFor(model => model.NotifyOnProjectCreate, new { @class = "control-label createcontacts_sw" }) @Html.ListBoxFor(model => model.CreateNotificationContacts, EnVisage.Code.Utils.GetWorkFlowContacts(Model.Id), new { @class = "int-createcontacts form-control forselect2" }) @Html.ValidationMessageFor(model => model.CreateNotificationContacts)
@Html.LabelFor(model => model.ResetScenariosToInactive, new { @class = "col-sm-2 control-label" })
@Html.CheckBoxFor(model => model.ResetScenariosToInactive, new { @class = "control-label" })
@Html.LabelFor(model => model.WorkflowState, new { @class = "col-sm-2 control-label" })
@Html.DropDownListFor(model => model.WorkflowState, Utils.GetAllWorkFlowStates(), new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.WorkflowState)
@Html.ValidationSummary(false, "The Status could not be saved due to the following errors:")
Back to list @if (Model != null && Model.Id != Guid.Empty) { if (Model.ProjectsCount > 0 || Model.Id == Guid.Empty) { Delete } else { Delete } }
 
 
}