#4243 - Show Open Door Code from user profile does not work
Context
On user profile (people/:id), in the "Current G7 Rentals":
Clicking on "Show Open Door Code" opens the admin_help/remote_door_open page, where the following error message appears:
Storage unit can't be blank, Storage unit type can't be blank, and Storage unit type is not included in the list
Implementation
- fix the form in the
app/views/people/show/g7_rentals/_g7_rental_row.html.slim- remove existing
if rental.space.is_a?(BikeHangar)condition - add hidden fields instead:
- add
= f.hidden_field :storage_unit_type, value: rental.space.class.name, id: "g7_totp_code_form_storage_unit_type_#{rental.id}" - add
= f.hidden_field :storage_unit_id, value: rental.space_id, id: "g7_totp_code_form_storage_unit_id_#{rental.id}"
- remove existing
