You are here

function mail_logger_form_overview in Mail Logger 6

Same name and namespace in other branches
  1. 5 mail_logger.module \mail_logger_form_overview()
  2. 7 mail_logger.pages.inc \mail_logger_form_overview()
1 string reference to 'mail_logger_form_overview'
mail_logger_overview in ./mail_logger.module
Menu callback; displays a listing of log mails.

File

./mail_logger.module, line 131
Mail Logger module logs all outgoing mail that passes through the drupal_mail function.

Code

function mail_logger_form_overview() {
  $names['all'] = t('all mail types');
  foreach (_mail_logger_get_mailkey_types() as $type) {
    $names[$type] = t('!type', array(
      '!type' => t($type),
    ));
  }
  if (empty($_SESSION['mail_logger_overview_filter'])) {
    $_SESSION['mail_logger_overview_filter'] = 'all';
  }
  $form['filter'] = array(
    '#type' => 'select',
    '#title' => t('Filter by Mailkey'),
    '#options' => $names,
    '#default_value' => $_SESSION['mail_logger_overview_filter'],
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Filter'),
  );
  $form['#redirect'] = FALSE;
  return $form;
}