@Html.LabelFor(model => model.TypeId, new { @class = "control-label" })
@{
ViewBag.TypeSelected = false;
}
@foreach (var kvp in Utils.GetTypesWithGroups())
{
@foreach (var opt in kvp.Value)
{
if (Model != null && Model.TypeId == opt.Id && !ViewBag.TypeSelected)
{
@opt.Name
ViewBag.TypeSelected = true;
}
else
{
@opt.Name
}
}
}
@Html.ValidationMessageFor(model => model.TypeId)
@Html.LabelFor(model => model.ClientId, new { @class = "control-label" })
@Html.DropDownListFor(model => model.ClientId, Utils.GetClients(true), new { @class = "form-control forselect2 pm-clientId" })
@Html.ValidationMessageFor(model => model.ClientId)
@Html.LabelFor(model => model.Deadline, new { @class = "control-label" })
@Html.EditorFor(model => model.Deadline, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.Deadline)
@Html.LabelFor(model => model.StatusId, new { @class = "control-label" })
@Html.DropDownListFor(model => model.StatusId, Utils.GetStatuses(true), new { @class = "form-control forselect2 pm-status" })
@Html.ValidationMessageFor(model => model.StatusId)
@Html.LabelFor(model => model.Probability, new { @class = "control-label" })
@Html.EditorFor(model => model.Probability)
@Html.ValidationMessageFor(model => model.Probability)
@Html.LabelFor(model => model.IsRevenueGenerating, new { @class = "control-label" })
@Html.CheckBoxFor(model => model.IsRevenueGenerating, new { @class = "switcher form-control" })
@Html.ValidationMessageFor(model => model.IsRevenueGenerating)
@Html.LabelFor(model => model.Priority, new { @class = "control-label" })
@Html.TextBoxFor(model => model.Priority, new { @class = "form-control", @data_val_integer = "Your priority must be a whole number from 1 to 25" })
@Html.ValidationMessageFor(model => model.Priority)