Browse Source

fixed issue where users were redirected to non existence page after deleting a reservation users now get sent back to front

d9
ppound 3 years ago
parent
commit
11ce218d09
  1. 10
      reservation.inc

10
reservation.inc

@ -280,12 +280,18 @@ function reserve_form_reserve_reservation_delete_form_alter(array &$form, FormSt
$year = reserve_which_year($month, $day);
$yyyymmdd = date('Y-m-d', strtotime($year . '-' . $month . '-' . $day));
$form['ebundle'] = ['#type' => 'hidden', '#value' => $ebundle];
$form['month'] = ['#type' => 'hidden', '#value' => date('m', strtotime($yyyymmdd))];
$form['day'] = ['#type' => 'hidden', '#value' => date('d', strtotime($yyyymmdd))];
$form['actions']['submit']['#submit'][] = 'reserve_return_to_home_page';
}
$form['actions']['submit']['#submit'][] = 'reserve_return_to_reservations_page';
/**
* Custom submit handler for login form.
*/
function reserve_return_to_home_page($form, FormStateInterface $form_state) {
$url = Url::fromRoute('<front>');
$form_state->setRedirectUrl($url);
}
/**

Loading…
Cancel
Save