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 5555 <div class =" ab-sub-wrapper" >
5656 <ul id =" linkstack-admin-bar-new-content-default" class =" ab-submenu" >
5757 @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 >
5959 <li ><a class =" ab-item" href =" {{ route (' blockUser' , [' block' => ' no' , ' id' => $userinfo -> id ])} }" >Block User</a ></li >
6060 <li ><a class =" ab-item" href =" {{ route (' editUser' , $userinfo -> id ) } }" >Edit User</a ></li >
6161 @endif
@@ -103,6 +103,18 @@ function submitForm() {
103103 document .getElementById (' logoutForm' ).submit ();
104104 }
105105 </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 >
106118 <form id =" logoutForm" action =" {{ route (' logout' ) } }" method =" post" >
107119 <input type =" hidden" name =" _token" value =" {{ csrf_token () } }" >
108120 </form >
You can’t perform that action at this time.
0 commit comments