You are here

function boxes_form_delete_submit in Boxes 7.2

Button submit function: handle the 'Delete' button on the box form.

1 string reference to 'boxes_form_delete_submit'
boxes_form in includes/boxes.pages.inc
Boxes form

File

includes/boxes.pages.inc, line 348
Box Functions

Code

function boxes_form_delete_submit($form, &$form_state) {
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $box = $form_state['values']['box'];
  $form_state['redirect'] = array(
    $box
      ->deleteURL(),
    array(
      'query' => $destination,
    ),
  );
}