File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
resources/views/linkstack/modules Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 55
55
<div class =" ab-sub-wrapper" >
56
56
<ul id =" linkstack-admin-bar-new-content-default" class =" ab-submenu" >
57
57
@if ($isUser )
58
- <li ><a class =" ab-item" href =" {{ route (' deleteUser' , [' id' => $userinfo -> id ])} }" >Delete User</a ></li >
58
+ <li ><a class =" ab-item" href =" {{ route (' deleteUser' , [' id' => $userinfo -> id ])} }" id = " confirmationLink " >Delete User</a ></li >
59
59
<li ><a class =" ab-item" href =" {{ route (' blockUser' , [' block' => ' no' , ' id' => $userinfo -> id ])} }" >Block User</a ></li >
60
60
<li ><a class =" ab-item" href =" {{ route (' editUser' , $userinfo -> id ) } }" >Edit User</a ></li >
61
61
@endif
@@ -103,6 +103,18 @@ function submitForm() {
103
103
document .getElementById (' logoutForm' ).submit ();
104
104
}
105
105
</script >
106
+ <script >
107
+ function showConfirmation () {
108
+ var isConfirmed = confirm (" {{ __ (' messages.confirm.delete.user' )} }" );
109
+ if (isConfirmed) {
110
+ window .location .href = document .getElementById (" confirmationLink" ).getAttribute (" href" );
111
+ }
112
+ }
113
+ document .getElementById (" confirmationLink" ).addEventListener (" click" , function (event ) {
114
+ event .preventDefault ();
115
+ showConfirmation ();
116
+ });
117
+ </script >
106
118
<form id =" logoutForm" action =" {{ route (' logout' ) } }" method =" post" >
107
119
<input type =" hidden" name =" _token" value =" {{ csrf_token () } }" >
108
120
</form >
You can’t perform that action at this time.
0 commit comments