You are here

function dblog_clear_form_alter in Util 6.3

Same name and namespace in other branches
  1. 6.2 contribs/dblog_ext/dblog_clear/dblog_clear.module \dblog_clear_form_alter()

Implementation of hook_form_alter().

File

contribs/dblog_ext/dblog_clear/dblog_clear.module, line 21

Code

function dblog_clear_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {

    // works with or without dblog_ext
    case 'dblog_filter_form':

    // no break;
    case 'dblog_ext_filter_form':
      drupal_add_css(drupal_get_path('module', 'dblog_clear') . '/dblog_clear.css');
      $form['filters']['buttons']['clear'] = array(
        '#type' => 'submit',
        '#value' => t('Clear'),
        '#submit' => array(
          'dblog_clear_submit',
        ),
        '#attributes' => array(
          'class' => 'warning',
        ),
      );
      break;
  }
}