Skip to content

Commit

Permalink
Add checkbox to select/unselect all fields when exporting (Issue 1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardobarreto committed Aug 30, 2012
1 parent 3c83b27 commit 832219a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/rails_admin/main/export.html.haml
Expand Up @@ -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')
Expand Down

0 comments on commit 832219a

Please sign in to comment.