You are here

function rooms_booking_delete_form_submit in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Submit callback for booking_delete_form.

1 string reference to 'rooms_booking_delete_form_submit'
rooms_booking_delete_form in modules/rooms_booking/rooms_booking.admin.inc
Form callback: confirmation form for deleting a booking.

File

modules/rooms_booking/rooms_booking.admin.inc, line 1396
Rooms editing UI.

Code

function rooms_booking_delete_form_submit($form, &$form_state) {
  $booking = $form_state['rooms_booking'];
  rooms_booking_delete($booking);
  drupal_set_message(t('The booking %name has been deleted.', array(
    '%name' => $booking->name,
  )));
  watchdog('rooms', 'Deleted booking %name.', array(
    '%name' => $booking->name,
  ));
  $form_state['redirect'] = 'admin/rooms/bookings';
}