Sha256: 0f92955e2a6a5f815947131cd0e9a3bbc740ab880f3abcf11dc322f8214c664d

Contents?: true

Size: 1.52 KB

Versions: 1

Compression:

Stored size: 1.52 KB

Contents

= effective_form_with(model: [:admin, order], engine: true) do |f|
  = f.hidden_field :user_type, value: (f.object.user || current_user).class.name

  = f.select :user_id, current_user.class.all, label: 'Buyer', required: true,
    ajax_url: effective_resources.users_admin_select2_ajax_index_path,
    hint: 'The user that should purchase this order.'

  = f.email_cc_field :cc, hint: "Cc the above on any emailed receipts or payment requests."

  - if f.object.new_record?
    = f.check_box :send_payment_request_to_buyer,
      label: 'Yes, send a payment request email to the buyer and any cc.',
      value: (f.object.send_payment_request_to_buyer.nil? ? EffectiveOrders.send_payment_request_to_buyer : f.object.send_payment_request_to_buyer?)

  %hr

  %h2 Order Items
  = f.has_many :order_items, remove: true do |fc|
    = render 'order_item_fields', f: fc

  %hr

  .row
    .col-md-6.effective-order-note-to-buyer
      %h2 Note to Buyer
      = f.text_area :note_to_buyer, disabled: f.object.purchased?, label: false,
        hint: (f.object.purchased? ? 'This message was displayed to the buyer during checkout and appears on the receipt.' : 'This message will be displayed to the buyer during checkout and will appear on the receipt.')

    .col-md-6.effective-order-internal-note
      %h2 Internal Note
      = f.text_area :note_internal, label: false,
        hint: 'For internal admin use only. This note will never be displayed to the buyer.'

  = render partial: '/admin/orders/order_actions', locals: { order: @order, form: f, f: f }

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
effective_orders-5.7.1 app/views/admin/orders/_form.html.haml