Class: FileInputDownloadInput

Inherits:
SimpleForm::Inputs::FileInput
  • Object
show all
Defined in:
app/inputs/file_input_download_input.rb

Instance Method Summary collapse

Instance Method Details

#div_buttonObject



16
17
18
19
20
# File 'app/inputs/file_input_download_input.rb', line 16

def div_button
  template.(:div, class: 'input-group-append') do
    yield
  end
end

#input(wrapper_options) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'app/inputs/file_input_download_input.rb', line 2

def input(wrapper_options)

  template.(:div, class: 'input-group') do

    tmp = ActiveSupport::SafeBuffer.new

    tmp << super
    tmp << div_button { options[:download_button].show } if options[:download_button]
    tmp << div_button { options[:remove_checkbox].show } if options[:remove_checkbox]

    tmp
  end
end