app/views/reservations/new.html.haml
- @title ||= ti(:title, model: models_label(false))
- content_for(:actions, index_action_link)
- provide :head do
:css
.form-control-inline {
display:block;
height:34px;
margin: 8px auto;
}
.form-control-inline input {
width:85%;
heigth:inherit;
border: 1px solid #ccc
border-radius:4px;
font-size: 14px;
}
.form-control-inline button {
width:15%;
heigth:inherit;
}
.row
.col-sm-12.features-box.wow.fadeInLeft
.jumbotron
= simple_form_for(@reservation, method: :post, url: reservations_path) do |f|
= f.error_notification
.form-inputs
.col-md-12.col-sm-12.col-xs-12
= f.input :total_seats, readonly: true
= f.input :status, collection: Reservation::STATUSES, include_blank: false
= f.input :fan_names, as: :remove_array, label: 'Elenco Partecipanti', readonly: true
%p
%label Aggiungi partecipante
%small.text-danger#guest-error
%small.text-success#guest-success
.form-inline
= f.input :fan_last_name, as: :fake, label: false, placeholder: 'Cognome', input_html: { value: current_user.last_name }
= f.input :fan_first_name, as: :fake, label: false, placeholder: 'Nome', input_html: { value: current_user.first_name }
%button.btn.btn-primary#add-guest{ type: :button } Aggiungi Partecipante
= f.input :phone_number
= f.input :stop
= f.input :event_id, collection: Event.include_all.order(:date).bookable.upcoming, include_blank: false
= f.input :user_id, collection: User.order(:email).all, include_blank: false
= f.input :notes
.btn-group{ role: :group }
= f.button :submit, 'Save', class: 'btn-primary'
= link_to('Back', reservations_path, class: 'btn btn-default')
= render partial: 'reservations/js/fans_input'