EnVisageOnline/Beta/Source/EnVisage/Views/Project/ImportActuals.cshtml

76 lines
2.2 KiB
Plaintext

@using EnVisage.Code.HtmlHelpers
@using Microsoft.AspNet.Identity
@using EnVisage.Code
@{
ViewBag.Title = "Import Actuals";
}
<div id="erorMsgPlaceholder"></div>
@section Scripts
{
<script type="text/javascript">
init.push(function() {
$('#btnsave').click(function () {
if ($(this).parents('form').valid())
blockUI();
});
});
</script>
}
@using (Html.BeginForm("ImportActuals", "Project", FormMethod.Post, new { @class = "panel form-horizontal", enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<div class="panel-body">
@if (ViewBag.ImportResult == null)
{
<div class="form-group">
<label class="col-sm-2 control-label" for="Name">Actuals Data File</label>
<div class="col-sm-10">
<input type="file" accept="csv" name="fileUpload" id="fileUpload" data-val="true" data-val-required="Please select the file to process" />
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox" name="firstRowHeaders" id="firstRowHeaders"> <span class="lbl">First row contains column headers.</span>
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox" name="resetActuals" id="resetActuals"> <span class="lbl">Zero out quantity/costs on existing row value before change.</span>
</label>
</div>
</div>
</div>
@Html.ValidationSummary(false, "")
<div class="form-group" style="margin-bottom: 0;">
<div class="col-sm-offset-2 col-sm-10">
@if (Html.CheckSecurityObjectPermission(Areas.ImportActuals, AccessLevel.Write))
{
<button type="submit" class="btn btn-success" id="btnsave"><i class="fa fa-save"></i> Import</button>
}
</div>
</div>
}
else
{
if (ViewBag.ImportResult == true)
{
<div class="note note-success"><h4 class="note-title">Import completed successfully</h4><pre>@ViewBag.ImportLog</pre></div>
}
else
{
<div class="note note-danger"><h4 class="note-title">Import failed</h4><pre>@ViewBag.ImportLog</pre></div>
}
}
</div>
}