|
5 | 5 | <div class="progressbar fileupload-progressbar nofade"><div style="width:0%;"></div></div>
|
6 | 6 | <span class="btn success fileinput-button">
|
7 | 7 | <span><%= t('pictures.add_files') %>...</span>
|
| 8 | + <%= f.text_field :title %> |
| 9 | + <%= f.text_area :description %> |
8 | 10 | <%= f.file_field :picture %>
|
9 | 11 | </span>
|
10 | 12 | <button type="submit" class="btn primary start"><%= t('pictures.start_upload') %></button>
|
|
77 | 79 | {% } %}
|
78 | 80 | </script>
|
79 | 81 |
|
80 |
| - |
81 | 82 | <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
|
82 | 83 | <%= javascript_include_tag 'jquery.ui.widget.js' %>
|
83 | 84 | <!-- The Templates and Load Image plugins are included for the FileUpload user interface -->
|
|
90 | 91 | <!-- add include_tag js files to config.assets.precompile in ...environments/production.rb if you have it in vendor/ assets -->
|
91 | 92 |
|
92 | 93 | <script type="text/javascript" charset="utf-8">
|
93 |
| - $(function () { |
94 |
| - // Initialize the jQuery File Upload widget: |
95 |
| - $('#fileupload').fileupload(); |
96 |
| - // |
97 |
| - // Load existing files: |
98 |
| - $.getJSON($('#fileupload').prop('action'), function (files) { |
99 |
| - var fu = $('#fileupload').data('fileupload'), |
100 |
| - template; |
101 |
| - fu._adjustMaxNumberOfFiles(-files.length); |
102 |
| - template = fu._renderDownload(files) |
103 |
| - .appendTo($('#fileupload .files')); |
104 |
| - // Force reflow: |
105 |
| - fu._reflow = fu._transition && template.length && |
106 |
| - template[0].offsetWidth; |
107 |
| - template.addClass('in'); |
108 |
| - $('#loading').remove(); |
109 |
| - }); |
| 94 | + $(function () { |
| 95 | + // Initialize the jQuery File Upload widget: |
| 96 | + $('#fileupload').fileupload(); |
110 | 97 |
|
| 98 | + // Load existing files: |
| 99 | + $.getJSON($('#fileupload').prop('action'), function (files) { |
| 100 | + var fu = $('#fileupload').data('fileupload'), |
| 101 | + template; |
| 102 | + fu._adjustMaxNumberOfFiles(-files.length); |
| 103 | + template = fu._renderDownload(files) |
| 104 | + .appendTo($('#fileupload .files')); |
| 105 | + // Force reflow: |
| 106 | + fu._reflow = fu._transition && template.length && |
| 107 | + template[0].offsetWidth; |
| 108 | + template.addClass('in'); |
| 109 | + $('#loading').remove(); |
111 | 110 | });
|
| 111 | + }); |
112 | 112 | </script>
|
0 commit comments