diff --git a/reservation.inc b/reservation.inc index 4928f4d..0eb09a2 100644 --- a/reservation.inc +++ b/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: