Commit 9476a032 authored by Bobcares Developer's avatar Bobcares Developer Committed by Jakob P
Browse files

Issue #3031020 by Sergiu Stici, Vernit: Logout Dialog is not displaying (8.x-1.0)

parent 684f2d9c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ function autologout_autologout_refresh_only() {
 * to 1 after initial load. If this is 1 on subsequent loads, the page was
 * loaded from cache and an autologout timeout refresh needs to be triggered.
 */
function autologout_page_attachments(array &$page) {
function autologout_page_attachments_alter(array &$attachments) {
  $autologout_manager = \Drupal::service('autologout.manager');

  // Check if JS should be included on this request.
@@ -251,13 +251,13 @@ function autologout_page_attachments(array &$page) {
    ]);
  }

  autologout_attach_js($page, $settings);
  autologout_attach_js($attachments, $settings);
}

/**
 * Implements hook_page_bottom().
 */
function autologout_page_bottom() {
function autologout_page_bottom(array &$page_bottom) {
  if (!\Drupal::service('autologout.manager')->preventJs()) {
    $page_bottom['autologout'] = [
      '#markup' => '<form id="autologout-cache-check"><input type="hidden" id="autologout-cache-check-bit" value="0" /></form>',