6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/simple_form_extension/inputs/file_input.rb', line 6
def input(wrapper_options = nil)
input_html_options[:class] << "file-upload"
"<div class=\"fileinput fileinput-new input-group\" data-provides=\"fileinput\">
<div class=\"form-control uneditable-input\" data-trigger=\"fileinput\">
<i class=\"fa fa-file fileinput-exists\"></i>
<span class=\"fileinput-filename\"></span>
</div>
<div class=\"input-group-btn\">
<div class=\"btn btn-default btn-file\" type=\"button\">
<span class=\"fileinput-new\">#{ _translate('file.select') }</span>
<span class=\"fileinput-exists\">#{ _translate('file.change') }</span>
#{@builder.file_field(attribute_name, input_html_options)}
</div>
<button class=\"btn btn-danger fileinput-exists\" data-dismiss=\"fileinput\" type=\"button\"><i class=\"fa fa-times\"></i></button>
</div>
</div>".html_safe
end
|