Sha256: 1ffba6ecc6c5aaaac0def270f18303cdf33f1b184eae8fefc0313608b1ce735b

Contents?: true

Size: 1.62 KB

Versions: 47

Compression:

Stored size: 1.62 KB

Contents

= effective_form_with(model: [:admin, order], url: (order.persisted? ? effective_orders.admin_order_path(order) : effective_orders.admin_orders_path)) do |f|
  - if f.object.new_record?
    = f.select :user_id, @users || User.all.to_a.sort { |user1, user2| user1.to_s <=> user2.to_s }, label: 'Buyer', required: true

    %h2 Order Items
    .order_items
      - f.object.order_items.build unless f.object.order_items.present?
      = f.fields_for :order_items, f.object.order_items do |order_item|
        = render 'order_item_fields', f: order_item

      .links
        = link_to_add_association "Add line item".html_safe, f, :order_items, class: 'btn btn-success', partial: 'order_item_fields'

    %hr

    = f.check_box :send_payment_request_to_buyer,
      label: 'Yes, send a payment request email to the buyer.',
      value: (f.object.send_payment_request_to_buyer.nil? ? EffectiveOrders.mailer[:send_payment_request_to_buyer] : f.object.send_payment_request_to_buyer?)

  .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

47 entries across 47 versions & 1 rubygems

Version Path
effective_orders-4.4.3 app/views/admin/orders/_form.html.haml
effective_orders-4.4.2 app/views/admin/orders/_form.html.haml
effective_orders-4.4.1 app/views/admin/orders/_form.html.haml
effective_orders-4.4.0 app/views/admin/orders/_form.html.haml
effective_orders-4.3.2 app/views/admin/orders/_form.html.haml
effective_orders-4.3.1 app/views/admin/orders/_form.html.haml
effective_orders-4.3.0 app/views/admin/orders/_form.html.haml
effective_orders-4.2.7 app/views/admin/orders/_form.html.haml
effective_orders-4.2.6 app/views/admin/orders/_form.html.haml
effective_orders-4.2.5 app/views/admin/orders/_form.html.haml
effective_orders-4.2.4 app/views/admin/orders/_form.html.haml
effective_orders-4.2.3 app/views/admin/orders/_form.html.haml
effective_orders-4.2.2 app/views/admin/orders/_form.html.haml
effective_orders-4.2.1 app/views/admin/orders/_form.html.haml
effective_orders-4.2.0 app/views/admin/orders/_form.html.haml
effective_orders-4.1.5 app/views/admin/orders/_form.html.haml
effective_orders-4.1.4 app/views/admin/orders/_form.html.haml
effective_orders-4.1.3 app/views/admin/orders/_form.html.haml
effective_orders-4.1.2 app/views/admin/orders/_form.html.haml
effective_orders-4.1.1 app/views/admin/orders/_form.html.haml