<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Customer Returns' } %> <% content_for :page_title do %> <%= Spree.t(:new_customer_return) %> <% end %> <% content_for :page_actions do %>
  • <%= button_link_to Spree.t(:back_to_customer_return_list), spree.admin_order_customer_returns_url(@order), :icon => 'arrow-left' %>
  • <% end %> <% if @rma_return_items.any? || @new_return_items.any? %> <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @customer_return } %> <%= form_for [:admin, @order, @customer_return] do |f| %>
    <%= Spree.t(:items_in_rmas) %> <% if @rma_return_items.any? %> <%= render partial: 'return_item_selection', locals: {f: f, return_items: @rma_return_items} %> <% else %>
    <%= Spree.t(:none) %>
    <% end %>
    <%= Spree.t(:other_items_in_other) %> <% if @new_return_items.any? %> <%= render partial: 'return_item_selection', locals: {f: f, return_items: @new_return_items} %> <% else %>
    <%= Spree.t(:none) %>
    <% end %>
    <%= f.field_container :stock_location do %> <%= f.label :stock_location_id, Spree::StockLocation.model_name.human %> <%= f.select :stock_location_id, Spree::StockLocation.order_default.to_a.collect{|l|[l.name.humanize, l.id]}, {include_blank: true}, {class: 'select2 fullwidth', "data-placeholder" => Spree.t(:select_a_stock_location)} %> <%= f.error_message_on :stock_location_id %> <% end %>
    <%= button Spree.t('actions.create'), 'ok' %> <%= button_link_to Spree.t('actions.cancel'), admin_order_customer_returns_url(@order), :icon => 'remove' %>
    <% end %> <% else %>
    <%= Spree.t(:all_items_have_been_returned) %>, <%= link_to Spree.t(:back_to_customer_return_list), spree.admin_order_customer_returns_path(@order) %>.
    <% end %>