Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1137 by Inlead: Disallow renewal of ILL loans. #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

guddo
Copy link
Member

@guddo guddo commented Sep 4, 2015

@@ -569,6 +569,7 @@ function ding_reservation_reservations_form($form, &$form_state, $reservations,
'#id' => $reservation->id,
'#title' => $title,
'#cover' => field_view_field('ting_object', $entity, 'ting_cover', 'user_list'),
'#disabled' => $reservation->reservation_type == 'interlibrary_loans',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to '#disabled' => TRUE,

The equality check is unneeded as $reservation->reservation_type is already checked in the switch statement and this is in the DING_RESERVATION_INTERLIBRARY_LOANS case. Comparing against a string value is also dangerous as the rest of the code uses predefined constants.

@kasperg
Copy link
Member

kasperg commented Nov 5, 2015

@guddo / @AnatolyMuntean I have reviewed this.

Even though this is a tiny change it is worth simplifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants