You are here

function closeblock_reset_submit in Close Block 7

Form submission handler for Reset button.

See also

closeblock_settings_elements()

1 string reference to 'closeblock_reset_submit'
closeblock_settings_elements in includes/closeblock.form.inc
Closeblock settings form elements.

File

includes/closeblock.form.inc, line 199
Closeblock settings form functions.

Code

function closeblock_reset_submit($form, &$form_state) {
  switch ($form['#id']) {
    case 'system-theme-settings':
      $params = array(
        'theme' => empty($form_state['values']['theme']) ? arg(3) : $form_state['values']['theme'],
      );
      break;
    case 'block-admin-configure':
      $params = array(
        'module' => $form_state['values']['module'],
        'delta' => $form_state['values']['delta'],
      );
      break;
  }
  if (!empty($params)) {
    closeblock_db_delete($params);
  }
}