53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
@model EnVisage.Models.ScenarioGroupModel
|
|
|
|
@{
|
|
ViewBag.Title = Model != null ? "Edit " + Model.Name : "Add New Scenario Group";
|
|
}
|
|
|
|
@section Scripts
|
|
{
|
|
<script type="text/javascript">
|
|
emulateNavUrl = "/ScenarioGroup";
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
init.push(function() {
|
|
@if (Model.Id != Guid.Empty)
|
|
{
|
|
<text>
|
|
StartEdit('ScenarioGroup', '@Model.Id', "#btnDelete", "#btnsave", "erorMsgPlaceholder");
|
|
</text>
|
|
}
|
|
|
|
$('#btnsave').click(function () {
|
|
if ($(this).parents('form').valid())
|
|
blockUI();
|
|
});
|
|
});
|
|
</script>
|
|
|
|
}
|
|
|
|
<div id="erorMsgPlaceholder"></div>
|
|
|
|
@using (Html.BeginForm("Edit", "ScenarioGroup", FormMethod.Post, new { @class = "panel form-horizontal" }))
|
|
{
|
|
@Html.AntiForgeryToken()
|
|
@Html.HiddenFor(t=>t.Id)
|
|
<div class="panel-body">
|
|
<div class="form-group">
|
|
@Html.LabelFor(model => model.Name, new { @class = "col-sm-2 control-label" })
|
|
<div class="col-sm-10">
|
|
@Html.TextBoxFor(model => model.Name, new { @class = "form-control" })
|
|
@Html.ValidationMessageFor(model => model.Name)
|
|
</div>
|
|
</div>
|
|
@Html.ValidationSummary(false, "The unit of measure could not be saved due to the following errors:")
|
|
<div class="form-group" style="margin-bottom: 0;">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<a class="btn btn-primary" href="@Url.Action("Index", "ScenarioGroup")"><i class="fa fa-backward"></i> Back to list</a>
|
|
<button type="submit" class="btn btn-success" id="btnsave"><i class="fa fa-save"></i> Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
} |