Sha256: 92efb8dc3d5af8af9ce56b1ce9af0a0e8af05d0841c5bbf5cb236fef438b46a5

Contents?: true

Size: 796 Bytes

Versions: 8

Compression:

Stored size: 796 Bytes

Contents

= effective_form_with(model: [:admin, stamp], engine: true) do |f|
  - if inline_datatable?
    = f.hidden_field :owner_id
    = f.hidden_field :owner_type

  - else
    - ajax_url = (@select2_ajax_path || effective_resources.users_admin_select2_ajax_index_path) unless Rails.env.test?
    - f.object.owner_type ||= current_user.class.name

    = f.hidden_field :owner_type

    = f.select :owner_id, current_user.class.all, label: 'User', ajax_url: ajax_url,
      'data-load-ajax-url': effective_products.new_admin_stamp_path,
      'data-load-ajax-div': '#effective-stamps-ajax'

  #effective-stamps-ajax
    = render 'effective/stamps/fields', f: f, stamp: f.object

    = f.submit do
      - if f.object.new_record?
        = f.save 'Save and Mark Paid'
      - else
        = f.save 'Save'

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
effective_products-0.3.8 app/views/admin/stamps/_form_stamp.html.haml
effective_products-0.3.7 app/views/admin/stamps/_form_stamp.html.haml
effective_products-0.3.6 app/views/admin/stamps/_form_stamp.html.haml
effective_products-0.3.5 app/views/admin/stamps/_form_stamp.html.haml
effective_products-0.3.4 app/views/admin/stamps/_form_stamp.html.haml
effective_products-0.3.3 app/views/admin/stamps/_form_stamp.html.haml
effective_products-0.3.2 app/views/admin/stamps/_form_stamp.html.haml
effective_products-0.3.1 app/views/admin/stamps/_form_stamp.html.haml