Add confirmation on user deletion

This commit is contained in:
Champ Camba
2017-01-13 17:15:38 +08:00
parent d45a11172d
commit 0328988b54
3 changed files with 12 additions and 2 deletions
+10
View File
@@ -97,4 +97,14 @@ jQuery(document).ready(function() {
jQuery('textarea[id=um-meta-bio]').change(um_update_bio_countdown);
jQuery('textarea[id=um-meta-bio]').keyup(um_update_bio_countdown);
jQuery('.um-profile-edit a.um_delete-item').click(function(e){
e.preventDefault();
var a = confirm('Are you sure that you want to delete this user?');
if( ! a ){
return false;
}
});
});
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -805,7 +805,7 @@ class UM_User {
foreach($actions as $id => $arr ) {
$url = add_query_arg('um_action', $id );
$url = add_query_arg('uid', um_profile_id(), $url );
$items[] = '<a href="' . $url .'" class="real_url">' . $arr['label'] . '</a>';
$items[] = '<a href="' . $url .'" class="real_url '.$id.'-item">' . $arr['label'] . '</a>';
}
return $items;
}