Skip to content

Commit

Permalink
fix elements unlock
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic committed Nov 29, 2023
1 parent c5f1db1 commit 6137b24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manager/includes/active_user_locks.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function unlockThisElement()
var stay = document.getElementById('stay');
// Trigger unlock
if ((stay && stay.value !== '2') || !form_save) {
var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type=<?php echo $lockElementType;?>&id=<?php echo $lockElementId;?>&o=' + Math.random();
var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type=<?php echo $lockElementType;?>&id=<?php echo $lockElementId;?>&_token=<?php echo csrf_token() ?>&o=' + Math.random();
if (navigator.sendBeacon) {
navigator.sendBeacon(url)
} else {
Expand Down
2 changes: 1 addition & 1 deletion manager/views/partials/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function unlockThisElement()
var stay = document.getElementById('stay');
// Trigger unlock
if ((stay && stay.value !== '2') || !form_save) {
var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type={{ $elementType }}&id={{ $data->getKey() }}&o=' + Math.random();
var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type={{ $elementType }}&id={{ $data->getKey() }}&_token={{ csrf_token() }}&o=' + Math.random();
if (navigator.sendBeacon) {
navigator.sendBeacon(url)
} else {
Expand Down

0 comments on commit 6137b24

Please sign in to comment.