Sha256: afc2de50b1ff25091d3ca5407f2f0b791d208ef4976048eff25518c01aaa0889
Contents?: true
Size: 1.62 KB
Versions: 7
Compression:
Stored size: 1.62 KB
Contents
= effective_form_with(model: [:admin, event_registrant], engine: true) do |f| - if inline_datatable? = f.hidden_field :event_id - else = f.select :event_id, Effective::Event.sorted.all, 'data-load-ajax-url': effective_events.new_admin_event_registrant_path, 'data-load-ajax-div': '#effective-events-event-registrant-ajax' - if f.object.new_record? -# User - klass = (f.object.owner || current_user).class - ajax_url = (effective_resources.users_effective_ajax_index_path unless Rails.env.test?) = f.hidden_field :owner_type, value: klass.name = f.select :owner_id, klass.all, ajax_url: ajax_url, label: 'Registration User' - else = f.static_field :owner = f.datetime_field :registered_at, required: true #effective-events-event-registrant-ajax - if f.object.event.present? .card .card-body - if f.object.purchased? = f.static_field :event_ticket, label: 'Purchased ticket' = f.select :event_ticket_id, effective_events_event_tickets_collection(f.object.event, namespace), required: true - if f.object.event.allow_blank_registrants? && (f.object.new_record? || f.object.blank_registrant?) = f.check_box :blank_registrant, label: "I will return and add this ticket's information later" - else = f.hidden_field :blank_registrant, value: false = f.show_if(:blank_registrant, false) do = render('effective/event_registrants/fields', f: f) = f.check_box :archived, label: "Archive this registrant. It will be displayed as archived on the owner's event registration" = f.submit 'Save'
Version data entries
7 entries across 7 versions & 1 rubygems