SAAS-1041 - add confirmation window when deleting a user

This commit is contained in:
Duncan Sommerville 2015-09-02 12:53:24 -04:00
parent 0722225211
commit 69293703f2
1 changed files with 10 additions and 4 deletions

View File

@ -43,10 +43,16 @@ function rowClickCallback(row_id){
}});
}
function removeUserCallback(row_id, nRow){
$.ajax({ url: baseUrl+'User/remove-user/id/'+ row_id +'/format/json', dataType:"text", success:function(data){
var o = $('#users_datatable').dataTable().fnDeleteRow(nRow);
}});
function removeUserCallback(row_id, nRow) {
if (confirm($.i18n._("Are you sure you want to delete this user?"))) {
$.ajax({
url: baseUrl + 'User/remove-user/id/' + row_id + '/format/json',
dataType: "text",
success: function (data) {
var o = $('#users_datatable').dataTable().fnDeleteRow(nRow);
}
});
}
}
function rowCallback( nRow, aData, iDisplayIndex ){