You are here

function dashboard_form_dashboard_admin_display_form_alter in Drupal 7

Implements hook_form_FORM_ID_alter().

File

modules/dashboard/dashboard.module, line 376
Provides a dashboard page in the administrative interface.

Code

function dashboard_form_dashboard_admin_display_form_alter(&$form, &$form_state) {

  // Redirect the 'configure' and 'delete' links on each block back to the
  // dashboard blocks administration page.
  foreach ($form['blocks'] as &$block) {
    if (isset($block['configure']['#href'])) {
      $block['configure']['#options']['query']['destination'] = 'admin/dashboard/configure';
    }
    if (isset($block['delete']['#href'])) {
      $block['delete']['#options']['query']['destination'] = 'admin/dashboard/configure';
    }
  }
}