You are here

function asset_base_form_submit_delete in Asset 7

Form API submit callback for the delete button.

1 string reference to 'asset_base_form_submit_delete'
asset_base_form in includes/asset.admin.inc
Base form builder.

File

includes/asset.admin.inc, line 189
Asset admin page callbacks.

Code

function asset_base_form_submit_delete(&$form, &$form_state) {
  if (isset($_GET['destination'])) {
    $form_state['redirect'] = array(
      'admin/content/assets/manage/' . $form_state['asset']->aid . '/delete',
      array(
        'query' => array(
          'destination' => $_GET['destination'],
        ),
      ),
    );
    unset($_GET['destination']);
  }
  else {
    $form_state['redirect'] = 'admin/content/assets/manage/' . $form_state['asset']->aid . '/delete';
  }
}