<%= render 'spree/admin/shared/product_sub_menu' %> <%= render 'spree/admin/shared/product_tabs', current: 'Product Properties' %> <%= render 'spree/shared/error_messages', target: @product %> <% content_for :page_actions do %> <% end %> <%= form_for @product, :url => admin_product_url(@product), :method => :put do |f| %>
<%= image_tag 'select2-spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %> <%= f.fields_for :product_properties do |pp_form| %> <%= render 'product_property_fields', :f => pp_form %> <% end %>
<%= Spree.t(:property) %> <%= Spree.t(:value) %>
<%= render 'spree/admin/shared/edit_resource_links' %> <%= hidden_field_tag 'clear_product_properties', 'true' %>
<% end %> <%= javascript_tag do -%> var properties = <%= raw(@properties.to_json) %>; $('#product_properties').on('keydown', 'input.autocomplete', function() { already_auto_completed = $(this).is('ac_input'); if (!already_auto_completed) { $(this).autocomplete({source: properties}); $(this).focus(); } }); <% end -%>