@using (Ajax.BeginForm("CreateScenario", "Scenarios", new AjaxOptions { HttpMethod = "Post", OnSuccess = "onSuccess", OnFailure = "onFailure(xhr)", UpdateTargetId = "reloadForm" }, new { @id = "newScenarioForm", @class = "form-horizontal", onsubmit="onCreateScenarioSubmit();" }))
{
@Html.AntiForgeryToken()
@Html.HiddenFor(m => m.ScenarioId)
@Html.HiddenFor(m => m.ProjectId)
@Html.HiddenFor(m => m.PartId)
@Html.HiddenFor(m => m.TeamAllocations)
@Html.HiddenFor(m => m.SaveAsDraft)
@Html.HiddenFor(m => m.ProjectDeadline)
@Html.HiddenFor(m => m.CostSavingItems)
@Html.HiddenFor(m => m.CostSavingsPanelExpanded)
Scenario Information
@Html.LabelFor(model => model.ProjectId, new { @class = "control-label" })
@Html.DropDownListFor(model => model.ProjectId, Utils.GetProjects(User.Identity.Name), new { @class = "form-control", @id = "project_" + Model.ScenarioId.ToString(), @disabled = "disabled" })
@Html.ValidationMessageFor(model => model.ProjectId)
@Html.LabelFor(model => model.PartId, new { @class = "control-label" })
@Html.DropDownListFor(model => model.PartId, Utils.GetProjectParts(Model.ProjectId), new { @class = "form-control", @id = "partName_" + Model.ScenarioId, @disabled = "disabled" })
@Html.ValidationMessageFor(model => model.PartId)
@Html.LabelFor(model => model.ScenarioName, new { @class = "control-label" })
@Html.TextBoxFor(model => model.ScenarioName, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.ScenarioName)
@Html.LabelFor(model => model.TemplateId, new { @class = "control-label" })
@Html.DropDownListFor(model => model.TemplateId, Utils.GetTemplates(), new { @class = "form-control forselect2", @onchange = "reloadEC(this);" })
@Html.ValidationMessageFor(model => model.TemplateId)
@Html.LabelFor(model => model.CreateAsActive, new { @class = "control-label" })
@Html.CheckBoxFor(model => model.CreateAsActive, new { @class = "switcher form-control yes-no-switcher" })
@Html.ValidationMessageFor(model => model.CreateAsActive)
@Html.LabelFor(model => model.GrowthScenario, new { @class = "control-label" })
@Html.CheckBoxFor(model => model.GrowthScenario, new { @class = "switcher form-control yes-no-switcher" })
@Html.ValidationMessageFor(model => model.GrowthScenario)
Expenditure Categories
Teams
@foreach (var team2proj in Model.Project.Team2Project.ToList())
{
@team2proj.Team.Name
@Math.Floor((double)100 / Model.Project.Team2Project.Count()) %
}
@Html.ListBox("addTeams", EnVisage.Code.Utils.GetTeams(false), new { @id = "addTeams", @class = "form-control" })
Financial Information
@if (Model.Project.IsRevenueGenerating)
{
}
@if (Model.Project.IsRevenueGenerating)
{
@Html.RadioButtonFor(t => t.UseLMMargin, false, new { }, false)
Gross
@Html.RadioButtonFor(t => t.UseLMMargin, true, new { }, false)
L&M (static material costs)
}
@Html.LabelFor(model => model.CostSavingType, new { @class = "control-label" })
@Html.CheckBoxFor(model => model.CostSavingType, new { @id = "costSaving_" + Model.ScenarioId, @class = "switcher form-control" })
@Html.ValidationMessageFor(model => model.CostSavingType)
@Html.ValidationMessage("errors", new { @style = "text-align: left" })
@Html.ValidationSummary(false, "The scenario could not be saved due to the following errors:")
}