34 lines
1.5 KiB
Plaintext
34 lines
1.5 KiB
Plaintext
@model EnVisage.Models.UserQuickLinkModel
|
|
|
|
<script>
|
|
function onSuccessQuickLinkDelete(result) {
|
|
handleAjaxResponse(result, function () {
|
|
$('#modal-deleteQuickLink').modal('hide');
|
|
if ($('#' + result.Content).length > 0)
|
|
$('#' + result.Content).remove();
|
|
}, null, null, $('#deleteQuickLinkForm'));
|
|
};
|
|
function onFailureQuickLinkDelete(xhr) {
|
|
showErrorModal();
|
|
};
|
|
</script>
|
|
@using (Ajax.BeginForm("Delete", "UserQuickLink", new AjaxOptions { HttpMethod = "Post", OnBegin = "blockUI", OnSuccess = "onSuccessQuickLinkDelete", OnFailure = "onFailureQuickLinkDelete(xhr)", OnComplete = "unblockUI" }, new { @id = "deleteQuickLinkForm" }))
|
|
{
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
|
|
<h4 class="modal-title">Delete QuickLink</h4>
|
|
</div>
|
|
<div class="modal-title"></div>
|
|
<div class="modal-body">
|
|
@Html.HiddenFor(m => m.Id)
|
|
@Html.AntiForgeryToken()
|
|
<p>You are about to delete the "@Model.Name" link. Are you sure you want to delete it?</p>
|
|
@Html.ValidationSummary(false, "Quick link cannot be deleted due to the following errors:")
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" class="btn btn-danger">OK</button>
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
</div>
|
|
</div>
|
|
} |