You are here

function asset_widget_form_alter in Asset 7

Implements hook_form_alter().

File

modules/asset_widget/asset_widget.module, line 411
Code for the Asset widget module.

Code

function asset_widget_form_alter(&$form, &$form_state, $form_id) {

  // Affect edit forms in asset widget iframes.
  if (!empty($form_id) && preg_match('/asset_edit_.*_form$/', $form_id) && asset_widget_in_frame_form()) {
    if (isset($form['actions']['delete']['#submit'])) {
      $form['actions']['delete']['#submit'][] = 'asset_widget_base_form_submit_delete';
    }
  }
}