Skip to content

Commit

Permalink
[#162206] QR: Add a link back to the form for new quick reservations (#…
Browse files Browse the repository at this point in the history
…4221)

* Rename CSS class for clarity

* Add a link from QR show back to the new form page

* Use a link instead of a button
  • Loading branch information
giladshanan committed May 3, 2024
1 parent b803271 commit c93f289
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/app/quick_reservation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ body.quick_reservation {
padding-bottom: 3em;
}

a.end_link {
a.button_style {
background-color: $reservationLabelColor;
color: white;
text-decoration: none;
Expand Down
6 changes: 4 additions & 2 deletions app/views/quick_reservations/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
= form_with url: facility_instrument_quick_reservations_start_path(@facility, @instrument) do |f|
= f.submit t(".start")
- elsif @reservation.ongoing?
= end_reservation_link(@reservation, "end_link")
= end_reservation_link(@reservation, "button_style")
- else
%p= t(".come_back_later")
%a.end_link.disabled= t(".start")
%a.button_style.disabled= t(".start")
%p= t(".back_to_reservation_form")
= link_to t(".new"), new_facility_instrument_quick_reservation_path(@facility, @instrument)
2 changes: 2 additions & 0 deletions config/locales/views/en.quick_reservations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ en:
start: Start Reservation
end: End Reservation
come_back_later: Come back closer to reservation time to start your reservation.
back_to_reservation_form: Need to schedule a new reservation? Click the link below.
new: Schedule Another Reservation
reservation_information:
order_number: "Order #"
reservation_date: Reservation Date
Expand Down

0 comments on commit c93f289

Please sign in to comment.