53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
@model EnVisage.Models.PeopleResourceModel
|
|
@{
|
|
ViewBag.Title = "Delete People Resource";
|
|
}
|
|
@section Scripts
|
|
{
|
|
<script type="text/javascript">
|
|
emulateNavUrl = "/PeopleResource/Details/@Model.Id";
|
|
|
|
init.push(function () {
|
|
StartEdit('PeopleResource', '@Model.Id', "#btnDelete", "", "erorMsgPlaceholder");
|
|
|
|
$('#btnDelete').buttonLocker({
|
|
click: deleteResource
|
|
});
|
|
});
|
|
|
|
function deleteResource() {
|
|
var form = $('#btnDelete').parents('form');
|
|
|
|
if (form.valid()) {
|
|
blockUI();
|
|
form.submit();
|
|
}
|
|
}
|
|
</script>
|
|
}
|
|
<div id="erorMsgPlaceholder"></div>
|
|
<div class="panel panel-warning panel-dark">
|
|
<div class="panel-heading">
|
|
<span class="panel-title">Warning</span>
|
|
<div class="panel-heading-controls">
|
|
<div class="panel-heading-icon"><i class="fa fa-warning"></i></div>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<p>You are about to delete the resource @Model.FirstName @Model.LastName, this action cannot be undone. Are you sure you want to delete it?</p>
|
|
@using (Html.BeginForm("Delete", "PeopleResource", new { teamId = Request.QueryString["teamId"] }))
|
|
{
|
|
<div class="form-group">
|
|
<label class = "col-sm-2 control-label">Decrease planned capacity</label>
|
|
<div class="col-sm-7">
|
|
@Html.CheckBoxFor(model => model.ChangeCapacity)
|
|
</div>
|
|
</div>
|
|
@Html.HiddenFor(t => t.Id)
|
|
@Html.AntiForgeryToken()
|
|
<a class="btn btn-primary" href="@Url.Action("Board", "Team", new {teamId = Request.QueryString["teamId"] })"><i class="fa fa-backward"></i> Back to list</a>
|
|
<button type="button" class="btn btn-danger disabled" id="btnDelete"><i class="fa fa-trash-o"></i> Delete</button>
|
|
}
|
|
</div>
|
|
</div>
|