From 5ff213f612a1570867e69a9ca3d57edc4b0a8464 Mon Sep 17 00:00:00 2001 From: Stephane Bounmy Date: Thu, 29 Nov 2012 00:24:34 +0100 Subject: [PATCH] added tabindex to size chart --- app/views/spree/admin/size_charts/_form.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/spree/admin/size_charts/_form.html.erb b/app/views/spree/admin/size_charts/_form.html.erb index a3435a4..f790226 100644 --- a/app/views/spree/admin/size_charts/_form.html.erb +++ b/app/views/spree/admin/size_charts/_form.html.erb @@ -9,6 +9,7 @@ <%= type.name %> <% end %> + <% @tabindex = 1 %> <%= form.fields_for :size_values, form.object.find_or_initialize_size_values do |value_form| %> <% if @i == 0 %> <%= "".html_safe %> @@ -17,11 +18,12 @@ <%= value_form.hidden_field :size_type_id %> <%= value_form.hidden_field :option_value_id %> - <%= value_form.text_field :value %> + <%= value_form.text_field :value, :tabindex => @tabindex %> <%= "".html_safe if @i == @size_type_count - 1 %> <% @i += 1 %> - <% @i = 0 if @i == @size_type_count %> + <% @tabindex += 1 %> + <% @i, @tabindex = 0, 1 if @i == @size_type_count %> <% end %> <% end %>