Permalink
Browse files

Add checkbox to select/unselect all fields when exporting (Issue 1241)

  • Loading branch information...
1 parent 3c83b27 commit 832219af4880048ba593faaca6964a78266d3e30 @bernardofire bernardofire committed Aug 30, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/views/rails_admin/main/export.html.haml
@@ -4,7 +4,12 @@
= form_tag export_path(params.merge(:all => true)), :method => 'post', :class => 'form-horizontal denser' do
%input{:name => "send_data", :type => "hidden", :value => "true"}/
- %fieldset
+ %fieldset{:id => 'fields_to_export'}
+ %div.control-group
+ %div.controls
+ %label.checkbox{:for => 'check_all'}
+ = 'Select All Fields'
+ = check_box_tag 'all', 'all', true, { :id => 'check_all', :onclick => "is_checked = jQuery('#check_all').attr('checked'); elems = jQuery('#fields_to_export label input'); is_checked ? jQuery(elems).attr('checked', 'checked') : jQuery(elems).removeAttr('checked');" }
%legend
%i.icon-chevron-down
= t('admin.export.select')

0 comments on commit 832219a

Please sign in to comment.