Skip to content

Instantly share code, notes, and snippets.

@BunHouth
Created July 16, 2020 08:55
Show Gist options
  • Save BunHouth/9d13fb1c8396eca982b231fc23ba4e2c to your computer and use it in GitHub Desktop.
Save BunHouth/9d13fb1c8396eca982b231fc23ba4e2c to your computer and use it in GitHub Desktop.
- title nil
- meta_description nil
= render partial: 'shared/header', locals: { search_bar: false, fixed_top: false }
.container
%h1.booking-header
= t('.book_no_pay_later')
.row
.col-sm-6
- unless guest_signed_in?
.account-sign-in
= link_to new_guest_session_path, class: 'btn btn-primary btn-lg btn-flat btn-listing-sign-in' do
%span.sign-in-question
= t('.already_have_an_account')
%span.sign-in-label
= t('.sign_in')
= simple_form_for(@guest, url: perform_booking_hotel_path(@listing), method: :post) do |f|
.guest-infos
.guest-infos-header
.guest-infos-step-number
1
.guest-infos-description
%h4
= t('.your_information')
%p
= t('.please_fill_this_form')
.guest-infos-content
.row
.col-sm-4
= f.input :title, label: '* Title', collection: ['Mr.', 'Mrs.', 'Miss.'], wrapper_html: { class: 'form-group-select-wrapper' }, include_blank: false, label: t('.title')
.col-sm-4
= f.input :first_name, required: true, label: t('.first_name')
.col-sm-4
= f.input :last_name, required: true, label: t('.last_name')
.row
.col-sm-4
= f.association :country, value_method: :id, label_method: :name, wrapper_html: { class: 'form-group-select-wrapper' }, include_blank: false, label: t('.country')
.col-sm-8
= f.input :phone_number, label: false, required: true, wrapper_html: { id: 'guest-phone-number' } do
= f.input :phone_number, required: true, placeholder: '096 989 2979', label: t('.phone_number')
%span.caption{ style: 'color:rgba(51, 73, 95, 0.54);' }= t('.login_password_notice')
.row
%div{ class: guest_signed_in? ? 'col-sm-12' : 'col-sm-6' }
= f.input :email, required: true, label: false, wrapper_html: { id: 'guest-email' } do
= f.input :email, required: true, label: t('.email'), wrapper_html: { style: 'margin-bottom:2px;' }
%span.caption{ style: 'color:rgba(51, 73, 95, 0.54);' }= t('.login_email_notice')
- unless guest_signed_in?
.col-sm-6
= f.input :email_confirmation, required: true, label: t('.email')
= f.simple_fields_for :bookings do |b|
- if b.object.new_record?
= b.input :special_requests, as: :text, input_html: { rows: 5 }, label: t('.special_requests')
= b.input :check_in_date, as: :hidden, input_html: { value: @check_in_date }
= b.input :total_number_of_rooms, as: :hidden, input_html: { value: @number_of_rooms }
= b.simple_fields_for :booking_rooms do |br|
= br.input :rate, as: :hidden, input_html: { value: @avg_price_night }
= br.input :is_non_refundable, as: :hidden, input_html: { value: @is_non_refundable }
= br.input :cancellation_until, as: :hidden, input_html: { value: @cancellation_until }
= br.input :no_show_charge_percentage, as: :hidden, input_html: { value: @no_show_charge_percentage }
.hidden
= br.input :daily_rates, label: false, collection: @daily_rates, as: :check_boxes, include_hidden: false, input_html: { checked: true }
.payment-options
.payment-options-header
.payment-options-step-number
2
.payment-options-description
%h4
= t('.payment_option')
%p
= t('.book_now_pay_at_hotel')
.payment-options-content
.hidden.payment-buttons
.pay-at-hotel.paymenttype.active
= t('.pay_at_hotel')
= b.input :payment_option, as: :hidden, input_html: { value: 'PAY AT HOTEL' }
.pay-at-hotel-tab.active
.card-tab-container
.card-images
.card-instruction
= t('.complete_reservation_description')
.complete-button.mb-5
= f.submit t('.complete_reservation'), class: 'btn btn-primary btn-lg js-complete-reservation'
.col-sm-5.col-sm-offset-1
= render 'booking/property_detail'
.booking-listing-rooms
.dates
= render 'booking/detail'
.rooms
= render 'booking/taxes'
= render 'booking/first_booking' if @is_first_booking
= render 'booking/membership_booking' if @is_membership
= render 'booking/checkout_pricing'
:javascript
fbq('track', 'ViewContent', {
value: "#{total_price_after_discount}",
currency: 'USD'
});
= render 'shared/footer'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment