48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
@model EnVisage.Models.RoleModel
|
|
@{
|
|
ViewBag.Title = "Delete " + Model.Name;
|
|
}
|
|
@section Scripts
|
|
{
|
|
<script type="text/javascript">
|
|
emulateNavUrl = "/Role";
|
|
init.push(function() {
|
|
StartEdit('Role', '@Model.Id', "#btnDelete", "", "erorMsgPlaceholder");
|
|
|
|
$('#btnDelete').buttonLocker({
|
|
click: deleteRole
|
|
});
|
|
});
|
|
|
|
function deleteRole() {
|
|
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 @Model.Name. Are you sure you want to delete it?</p>
|
|
@using (Html.BeginForm("Delete", "Role", FormMethod.Post, new{id="frmDelete"}))
|
|
{
|
|
@Html.AntiForgeryToken()
|
|
@Html.HiddenFor(t =>t.Id)
|
|
<a class="btn btn-primary" href="@Url.Action("Index", "Role")"><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>
|
|
|