File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
resources/views/linkstack/modules Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -131,18 +131,20 @@ function submitForm() {
131131 document .getElementById (' logoutForm' ).submit ();
132132 }
133133 </script >
134- < script >
135- function showConfirmation () {
136- var isConfirmed = confirm ( " {{ __ ( ' messages.confirm.delete.user ' ) } } " );
137- if (isConfirmed) {
138- window . location . href = document . getElementById ( " confirmationLink " ). getAttribute ( " href " );
139- }
134+ @if ( auth () -> user () -> role != ' admin ' )
135+ < script >
136+ function showConfirmation () {
137+ var isConfirmed = confirm ( " {{ __ ( ' messages.confirm.delete.user ' ) } } " );
138+ if (isConfirmed) {
139+ window . location . href = document . getElementById ( " confirmationLink " ). getAttribute ( " href " );
140140 }
141- document .getElementById (" confirmationLink" ).addEventListener (" click" , function (event ) {
142- event .preventDefault ();
143- showConfirmation ();
144- });
145- </script >
141+ }
142+ document .getElementById (" confirmationLink" ).addEventListener (" click" , function (event ) {
143+ event .preventDefault ();
144+ showConfirmation ();
145+ });
146+ </script >
147+ @endif
146148 <form id =" logoutForm" action =" {{ route (' logout' ) } }" method =" post" >
147149 <input type =" hidden" name =" _token" value =" {{ csrf_token () } }" >
148150 </form >
You can’t perform that action at this time.
0 commit comments