Sha256: 46f8e3221a3bcbe451c72c4a7acd8effb8cbcd597805486e926aa6ac97862ade

Contents?: true

Size: 1.63 KB

Versions: 7

Compression:

Stored size: 1.63 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_admin_select2_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

Version Path
effective_events-0.20.6 app/views/admin/event_registrants/_form.html.haml
effective_events-0.20.5 app/views/admin/event_registrants/_form.html.haml
effective_events-0.20.4 app/views/admin/event_registrants/_form.html.haml
effective_events-0.20.3 app/views/admin/event_registrants/_form.html.haml
effective_events-0.20.2 app/views/admin/event_registrants/_form.html.haml
effective_events-0.20.1 app/views/admin/event_registrants/_form.html.haml
effective_events-0.20.0 app/views/admin/event_registrants/_form.html.haml