public
Last active

multiselect-view

  • Download Gist
gistfile1.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<div class="group">
<%= f.label :shops, :class => 'label' %>
<div class="multiselect" data-multiselect="/admin/shops/autocomplete_shop_name">
<input class="multiselecttext text_field" data-multiselect="/admin/shops/autocomplete_shop_name" id="match" name="match" type="text" value='<%= t(".search")%>' />
<br/><br/>
<select class="multiselectmatch" data-multiselect="/admin/shops/autocomplete_shop_name" id="shop_match" multiple="multiple" name="shop_match[]" size="10">
</select>
<select class="multiselectselected" data-multiselect="/admin/shops/autocomplete_shop_name" id="shop_selected" multiple="multiple" name="shop_selected[]" size="10">
<%= options_from_collection_for_select(@user.shops, :id, :name) %>
</select>
<div class="multiselectbuttons">
<input name="match2selected" type="submit" value='<%= t(".add")%>' />
<br />
<input class="all" name="match2selected" type="submit" value='<%= t(".addall")%>' />
<br />
<input name="selected2match" type="submit" value='<%= t(".remove")%>' />
<br />
<input class="all" name="selected2match" type="submit" value='<%= t(".removeall")%>' />
</div>
<%= hidden_field_tag "user[shop_ids][]", "#{@user.shop_ids.join(",")}", :class => 'multiselectids', :id => 'shop_ids_' %>
</div>
</div>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.