Sha256: d8a8d5fbd5b5326c85c927fe11845fe551482a4b1ff69eba1661b0cea42693c3

Contents?: true

Size: 1.88 KB

Versions: 10

Compression:

Stored size: 1.88 KB

Contents

.effective-order
  = simple_form_for(order, (EffectiveOrders.simple_form_options || {}).merge(url: checkout_step1_form_url(order, namespace))) do |f|
    = hidden_field_tag(:purchased_url, purchased_url) if defined?(:purchased_url)
    = hidden_field_tag(:declined_url, declined_url) if defined?(:declined_url)

    = render partial: 'effective/orders/order_items', locals: { order: order, form: f }

    - unless f.object.pending? || (current_cart && current_cart.blank?)
      = link_to 'Change Items', effective_orders.cart_path, rel: :nofollow, class: 'btn btn-default'

    - if order.errors[:order_items].present?
      %p.inline-errors= order.errors[:order_items].first

    - if order.errors[:total].present?
      %p.inline-errors= order.errors[:total].first

    - if EffectiveOrders.collect_user_fields.present? && (f.object.user rescue nil).present?
      = render partial: 'effective/orders/order_user_fields', locals: { form: f, user: f.object.user }

    - num_addresses = [EffectiveOrders.require_billing_address, EffectiveOrders.require_shipping_address].count(true)

    - if num_addresses > 0
      .row
        - if EffectiveOrders.require_billing_address
          %div{class: "col-sm-#{12 / num_addresses}"}
            %h2 Billing Address
            = effective_address_fields(f, :billing_address)

        - if EffectiveOrders.require_shipping_address
          %div{class: "col-sm-#{12 / num_addresses}"}
            %h2 Shipping Address
            = effective_address_fields(f, :shipping_address)

    - if EffectiveOrders.collect_note
      = render partial: 'effective/orders/order_note_fields', locals: { form: f }

    - if EffectiveOrders.terms_and_conditions
      = render partial: 'effective/orders/order_terms_and_conditions_fields', locals: { form: f }

    %p.text-right
      = f.submit 'Save and Continue', class: 'btn btn-primary', rel: :nofollow, data: { disable_with: 'Saving...' }

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
effective_orders-3.2.3 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.2.2 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.2.1 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.2.0 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.1.7 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.1.6 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.1.4 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.1.3 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.1.0 app/views/effective/orders/_checkout_step1.html.haml
effective_orders-3.0.4 app/views/effective/orders/_checkout_step1.html.haml