Commit 6ea70b9f authored by Tilen Gombac's avatar Tilen Gombac Committed by Jakob P
Browse files

Issue #3205591: Make modal width configurable

parent f5423c23
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@ function autologout_page_attachments_alter(array &$attachments) {
    'no_button' => $no_button,
    'use_alt_logout_method' => $use_alt_logout_method,
    'logout_regardless_of_activity' => $logout_regardless_of_activity,
    'modal_width' => $settings->get('modal_width') ? (int) $settings->get('modal_width') : 'auto',
  ];
  // If this is an AJAX request, then the logout redirect url should still be
  // referring to the page that generated this request.
+5 −0
Original line number Diff line number Diff line
@@ -29,6 +29,11 @@ function autologout_post_update_8014() {
    $config->set('inactivity_message_type', 'status');
  }

  // Issue 3205591: Add modal_width config default value
  if (empty($config->get('modal_width'))) {
    $config->set('modal_width', 450);
  }

  $config->save(TRUE);

  // Issue #3101732: Flush caches due to service signature changes.
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ no_dialog: false
message: 'Your session is about to expire. Do you want to reset it?'
inactivity_message: 'You have been logged out due to inactivity.'
inactivity_message_type: status
modal_width: 450
enforce_admin: false
jstimer_format: '%hours%:%mins%:%secs%'
jstimer_js_load_option: false
+3 −0
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@ autologout.settings:
    inactivity_message_type:
      type: string
      label: 'Type of the message displayed'
    modal_width:
      type: integer
      label: 'Modal width'
    enforce_admin:
      type: boolean
      label: 'Enable admin logout'
+1 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@
        return $('<div id="autologout-confirm">' + localSettings.message + '</div>').dialog({
          modal: true,
          closeOnEscape: false,
          width: "auto",
          width: localSettings.modal_width,
          dialogClass: 'autologout-dialog',
          title: localSettings.title,
          buttons: buttons,
Loading