function rooms_booking_form_submit_delete in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Form API submit callback for the delete button.
1 string reference to 'rooms_booking_form_submit_delete'
- rooms_booking_edit_form in modules/
rooms_booking/ rooms_booking.admin.inc - Form callback: create or edit a booking.
File
- modules/
rooms_booking/ rooms_booking.admin.inc, line 1357 - Rooms editing UI.
Code
function rooms_booking_form_submit_delete($form, &$form_state) {
if (isset($form_state['ajax'])) {
rooms_booking_delete($form_state['rooms_booking']);
drupal_set_message(t('The booking has been removed'));
$form_state['booking_deleted'] = TRUE;
}
else {
$form_state['redirect'] = 'admin/rooms/bookings/booking/' . $form_state['rooms_booking']->booking_id . '/delete';
}
}