Retire semantic_form_for

Also a buttload of form cleanups...
This commit is contained in:
Henne Vogelsang 2022-02-23 17:52:16 +01:00
parent 350b1ebbbe
commit 81853d1ef9
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
136 changed files with 1825 additions and 1441 deletions

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
module EventTypesHelper
##
# Includes functions related to event_types
##
##
# ====Returns
# * +String+ -> number of registrations / max allowed registrations
def event_type_select_options(event_types = {})
event_types.map { |type| ["#{type.title} - #{show_time(type.length)}", type.id] }
end
end

View file

@ -46,14 +46,6 @@ module EventsHelper
end
end
def track_selector_input(form)
if @program.tracks.confirmed.cfp_active.any?
form.input :track_id, as: :select,
collection: @program.tracks.confirmed.cfp_active.pluck(:name, :id),
include_blank: '(Please select)'
end
end
def rating_tooltip(event, max_rating)
"#{event.average_rating}/#{max_rating}, #{pluralize(event.voters.length, 'vote')}"
end