Sha256: fddae16ccea3388de75a7befab3c656bb13bfcf18aa8b85ac858b66a9bb93f7b
Contents?: true
Size: 1.09 KB
Versions: 7
Compression:
Stored size: 1.09 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 = (@select2_users_ajax_path || 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: 'User' - else = f.static_field :owner = f.datetime_field :registered_at, required: true #effective-events-event-registrant-ajax - if f.object.event.present? = render 'effective/event_registrants/fields', f: f, event: event_registrant.event, namespace: :admin = 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