@using EnVisage.Code @using EnVisage.Models @model CreateScenarioModel.GeneralInfoModel @{ // need to init cost saving controller var jsModel = new { deadlineDate = Model.ProjectDeadline.HasValue ? Model.ProjectDeadline.Value.ToString("MM/dd/yyyy") : null }; var json = Newtonsoft.Json.JsonConvert.SerializeObject(jsModel); } @using (Ajax.BeginForm("SubmitCreateScenarioStep1", "Scenarios", new AjaxOptions { HttpMethod = "Post", OnBegin = "blockUI", OnSuccess = "onStep1Success", OnFailure = "onStep1Failure(xhr)", OnComplete = "unblockUI", }, new { @id = "generalStepForm", @class = "form-horizontal", })) { @Html.HiddenFor(m => m.ScenarioId) @Html.HiddenFor(m => m.ProjectId) @Html.HiddenFor(m => m.PartId) @Html.HiddenFor(m => m.ProjectDeadline) @Html.HiddenFor(m => m.StatusIsEditable) @Html.HiddenFor(m => m.HideName) @Html.HiddenFor(m => m.SerializedModel) @Html.AntiForgeryToken()
Scenario Information
@Html.LabelFor(model => model.ProjectName, new { @class = "control-label" }) @Html.TextBoxFor(model => model.ProjectName, new { @class = "form-control", @readonly = "readonly" })
@if (!Model.HideName) {
@Html.LabelFor(model => model.ScenarioName, new { @class = "control-label" }) @Html.TextBoxFor(model => model.ScenarioName, new { @class = "form-control" }) @Html.ValidationMessageFor(model => model.ScenarioName)
}
@Html.EditorFor(t => t.StartDate, new { htmlAttributes = new { @class = "form-control date" } })
to
@Html.EditorFor(model => model.EndDate, new { htmlAttributes = new { @class = "form-control date" } })
@Html.ValidationMessageFor(model => model.StartDate) @Html.ValidationMessageFor(model => model.EndDate) @if (Model.ProjectDeadline.HasValue) {
Project Deadline: @Model.ProjectDeadline.Value.ToShortDateString()
}
@Html.LabelFor(model => model.TemplateId, new { @class = "control-label" }) @Html.DropDownListFor(model => model.TemplateId, new List(), new { @class = "form-control forselect2" }) @Html.ValidationMessageFor(model => model.TemplateId)
@Html.LabelFor(model => model.IsBottomUp, new { @class = "control-label" }) @Html.CheckBoxFor(model => model.IsBottomUp, new { @class = "switcher form-control" })
@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)
@{ IEnumerable workFlowList = Utils.GetWorkFlowSchemas(WorkFlowArea.Scenarios.GetHashCode(), new Guid(User.Identity.GetID())); if (workFlowList.Count() > 1) {
@Html.LabelFor(model => model.WorkFlowSchemaCode, new { @class = "control-label" }) @Html.DropDownListFor(model => model.WorkFlowSchemaCode, workFlowList, new { @class = "form-control", @id = "wfSchemaName" }) @Html.ValidationMessageFor(model => model.WorkFlowSchemaCode)
} }
Expenditure Categories
@Html.TextBoxFor(x => x.SelectedExpenditures) @Html.ValidationMessageFor(model => model.SelectedExpenditures)
Teams
@Html.EditorFor(x => x.Teams)
@Html.ValidationSummary(false, "The scenario could not be saved due to the following errors:") }