You are here

function autologout_create_block_form in Automated Logout 7.4

Same name and namespace in other branches
  1. 6.4 autologout.module \autologout_create_block_form()

Drupal reset timer form on timer block.

1 string reference to 'autologout_create_block_form'
autologout_block_view in ./autologout.module
Implements hook_block_view().

File

./autologout.module, line 112
Used to automagically log out a user after a preset time.

Code

function autologout_create_block_form() {
  $markup = autologout_create_timer();
  $form['autologout_reset'] = array(
    '#type' => 'button',
    '#value' => t('Reset Timeout'),
    '#weight' => 1,
    '#limit_validation_errors' => FALSE,
    '#executes_submit_callback' => FALSE,
    '#ajax' => array(
      'callback' => 'autologout_ahah_set_last',
    ),
  );
  $form['timer'] = array(
    '#markup' => $markup,
  );
  return $form;
}