Commit 873eaf67edec88dd6dd1fe097bb197e76c5c0d69
1 parent
8c272d87
Exists in
master
and in
3 other branches
Improve image edition in response
Showing
1 changed file
with
4 additions
and
5 deletions
Show diff stats
views/cms/proposals_discussion_plugin/_response.html.erb
... | ... | @@ -20,12 +20,11 @@ |
20 | 20 | <%= labelled_form_field(_('Response'), text_area(:article, :body, :class => 'mceEditor')) %> |
21 | 21 | </div> |
22 | 22 | |
23 | - <div id="response-image-builder"> | |
24 | - <%= f.fields_for :image_builder, @article.image do |i| %> | |
25 | - <%= file_field_or_thumbnail(_('Image:'), @article.image, i)%> | |
26 | - <%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %> | |
23 | + <% if @article %> | |
24 | + <%= fields_for 'article[image_builder]', @article.image do |i| %> | |
25 | + <%= file_field_or_thumbnail(_('Image:'), @article.image, i) %> | |
27 | 26 | <% end %> |
28 | - </div> | |
27 | + <% end %> | |
29 | 28 | |
30 | 29 | </div> |
31 | 30 | ... | ... |