<%= label_tag "available_columns", l(:description_available_columns) %>
<%= select_tag 'available_columns', options_for_select(query_available_inline_columns_options(query)), :multiple => true, :size => 10, :style => "width:150px", :ondblclick => "moveOptions(this.form.available_columns, this.form.selected_columns);" %>

<%= label_tag "selected_columns", l(:description_selected_columns) %>
<%= select_tag tag_name, options_for_select(query_selected_inline_columns_options(query)), :id => 'selected_columns', :multiple => true, :size => 10, :style => "width:150px", :ondblclick => "moveOptions(this.form.selected_columns, this.form.available_columns);" %>



<%= javascript_tag do %> $(document).ready(function(){ $('.query-columns').closest('form').submit(function(){ $('#selected_columns option').prop('selected', true); }); }); <% end %>