diff --git a/app/assets/images/Facebook_icon.jpg b/app/assets/images/Facebook_icon.jpg new file mode 100644 index 00000000..57db2e62 Binary files /dev/null and b/app/assets/images/Facebook_icon.jpg differ diff --git a/app/assets/images/Twitter_image.jpg b/app/assets/images/Twitter_image.jpg new file mode 100644 index 00000000..93f4e4e6 Binary files /dev/null and b/app/assets/images/Twitter_image.jpg differ diff --git a/app/assets/images/facebook_image.jpg b/app/assets/images/facebook_image.jpg new file mode 100644 index 00000000..740b078c Binary files /dev/null and b/app/assets/images/facebook_image.jpg differ diff --git a/app/assets/images/friend-source.jpg b/app/assets/images/friend-source.jpg new file mode 100644 index 00000000..90ad050a Binary files /dev/null and b/app/assets/images/friend-source.jpg differ diff --git a/app/assets/images/google_image.jpg b/app/assets/images/google_image.jpg new file mode 100644 index 00000000..3208d475 Binary files /dev/null and b/app/assets/images/google_image.jpg differ diff --git a/app/assets/images/question-mark.jpg b/app/assets/images/question-mark.jpg new file mode 100644 index 00000000..e85e58b0 Binary files /dev/null and b/app/assets/images/question-mark.jpg differ diff --git a/app/assets/images/search_image.jpg b/app/assets/images/search_image.jpg new file mode 100644 index 00000000..9f4dbda1 Binary files /dev/null and b/app/assets/images/search_image.jpg differ diff --git a/app/assets/images/television_image.jpg b/app/assets/images/television_image.jpg new file mode 100644 index 00000000..164c771a Binary files /dev/null and b/app/assets/images/television_image.jpg differ diff --git a/app/assets/images/television_image.png b/app/assets/images/television_image.png new file mode 100644 index 00000000..836af346 Binary files /dev/null and b/app/assets/images/television_image.png differ diff --git a/app/assets/stylesheets/application.css.scss.erb b/app/assets/stylesheets/application.css.scss.erb index a7691997..313b144a 100755 --- a/app/assets/stylesheets/application.css.scss.erb +++ b/app/assets/stylesheets/application.css.scss.erb @@ -381,3 +381,14 @@ td, th { text-align: center; padding: 10px; } + +input[type=text].modal-text { + height: 1.8rem; +} + +.modal-radio[type="radio"]:not(:checked), +.modal-radio[type="radio"]:checked { + left: 2px; + position: relative; + opacity: 1; +} diff --git a/app/controllers/bookings_controller.rb b/app/controllers/bookings_controller.rb index e459bf64..52b5e2da 100755 --- a/app/controllers/bookings_controller.rb +++ b/app/controllers/bookings_controller.rb @@ -25,7 +25,8 @@ def create tickets = [] ticket_params.each do |ticket_type_id, quantity| quantity.to_i.times do - user = UserTicket.new(ticket_type_id: ticket_type_id, booking: @booking) + user = UserTicket.new(ticket_type_id: ticket_type_id, booking: @booking, + event_source: source_params) tickets << user end end @@ -104,6 +105,14 @@ def ticket_params params.require(:tickets_quantity) end + def source_params + params.permit(:event_source, :other) + if params[:event_source] == "Other" + params[:event_source] = params[:other] unless params[:other].blank? + end + params[:event_source] + end + def set_event @event = Event.find(params[:event_id]) end diff --git a/app/views/bookings/partials/_all_bookings.html.erb b/app/views/bookings/partials/_all_bookings.html.erb index 6671be0f..a7f5aece 100644 --- a/app/views/bookings/partials/_all_bookings.html.erb +++ b/app/views/bookings/partials/_all_bookings.html.erb @@ -12,6 +12,8 @@ Amount Number of Tickets TicketID + Event Source + @@ -23,6 +25,8 @@ <%= number_to_currency booking.amount %> <%= booking.user_tickets_count %> <%= booking.uniq_id %> + <% event_source = booking.user_tickets.first.event_source %> + <%= event_source %> <% end %> diff --git a/app/views/events/_ticket_purchase_modal.html.erb b/app/views/events/_ticket_purchase_modal.html.erb index ad391d23..1cfcb328 100755 --- a/app/views/events/_ticket_purchase_modal.html.erb +++ b/app/views/events/_ticket_purchase_modal.html.erb @@ -1,8 +1,44 @@