Browse Source

limit repeating bookings to administrators only

d9
ppound 3 years ago
parent
commit
9fbeb49afd
  1. 6
      reservation.inc

6
reservation.inc

@ -131,6 +131,12 @@ function reserve_form_reserve_reservation_form_alter(array &$form, FormStateInte
$form['user_id']['#access'] = false;
$form['reservation_series_id']['#access'] = false;
$form['reservation_ebundle']['#access'] = false;
//UPEI doesn't want repeat except of admins
$user = \Drupal::currentUser();
if(!in_array('administrator', array_values($user->getRoles()))){
$form['reservation_repeat_type']['#access'] = FALSE;
$form['reservation_repeat_until']['#access'] = FALSE;
}
}
// if we are editing; let's do some extra things:

Loading…
Cancel
Save