.effective-order = simple_form_for(order, (EffectiveOrders.simple_form_options || {}).merge(:url => effective_orders.orders_path)) do |f| = render :partial => 'order_items', :locals => {:order => order, :form => f} - 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.gsub(EffectiveOrders.minimum_charge.to_i.to_s, price_to_currency(EffectiveOrders.minimum_charge.to_i)) - if EffectiveOrders.collect_user_fields.present? && (f.object.user rescue nil).present? %h3 User Information = 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}"} %h3 Billing Address = effective_address_fields(f, :billing_address) - if order.save_billing_address != nil = f.input :save_billing_address, :as => :boolean, :label => 'Save as my default Billing Address' - if EffectiveOrders.require_shipping_address %div{:class => "col-sm-#{12 / num_addresses}"} %h3 Shipping Address - if EffectiveOrders.require_billing_address && EffectiveOrders.require_shipping_address .shipping_address_fields{:style => (f.object.shipping_address_same_as_billing? && (f.object.errors[:shipping_address] || []).blank?) ? 'display: none;' : 'display: block;'} = effective_address_fields(f, :shipping_address) - if order.save_shipping_address != nil = f.input :save_shipping_address, :as => :boolean, :label => 'Save as my default Shipping Address' = f.input :shipping_address_same_as_billing, :as => :boolean, :label => 'My Shipping address is the same as my Billing address' %hr = link_to_current_cart :label => 'Change Items', :class => 'btn btn-default' = f.submit 'Continue to Checkout Confirmation', :class => 'btn btn-primary pull-right', :rel => :nofollow, 'data-disable-with' => 'Continuing...'