[Git][noosfero/noosfero][master] save block_images values on block edition

Leandro Nunes gitlab at mg.gitlab.com
Fri Dec 9 15:23:06 BRST 2016


Leandro Nunes pushed to branch master at Noosfero / noosfero


Commits:
0d673be8 by Leandro Nunes dos Santos at 2016-12-09T14:22:37-03:00
save block_images values on block edition

- - - - -


1 changed file:

- app/helpers/block_helper.rb


Changes:

=====================================
app/helpers/block_helper.rb
=====================================
--- a/app/helpers/block_helper.rb
+++ b/app/helpers/block_helper.rb
@@ -16,15 +16,15 @@ module BlockHelper
     "
     <tr class=\"image-data-line\" data-row-number='#{row_number}'>
       <td>
-        #{select_tag 'block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(block.folder_choices, :images, :name, :id, :name, image[:image_id].to_i).html_safe}
+        #{select_tag 'block[block_images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(block.folder_choices, :images, :name, :id, :name, image[:image_id].to_i).html_safe}
       </td>
-      <td>#{text_field_tag 'block[images][][address]', image[:address], :class => 'highlight-address', :size => 20}</td>
-      <td>#{text_field_tag 'block[images][][position]', image[:position], :class => 'highlight-position', :size => 1}</td>
-      <td>#{check_box_tag 'block[images][][new_window]', '1', image[:new_window], :class => 'highlight-new_window', :size => 1}</td>
+      <td>#{text_field_tag 'block[block_images][][address]', image[:address], :class => 'highlight-address', :size => 20}</td>
+      <td>#{text_field_tag 'block[block_images][][position]', image[:position], :class => 'highlight-position', :size => 1}</td>
+      <td>#{check_box_tag 'block[block_images][][new_window]', '1', image[:new_window], :class => 'highlight-new_window', :size => 1}</td>
     </tr><tr class=\"image-title\" data-row-number='#{row_number}'>
       <td colspan=\"3\"><label>#{
         content_tag('span', _('Title')) +
-        text_field_tag('block[images][][title]', image[:title], :class => 'highlight-title', :size => 45)
+        text_field_tag('block[block_images][][title]', image[:title], :class => 'highlight-title', :size => 45)
       }</label></td>
       <td>#{button_without_text(:delete, _('Remove'), '#', class: 'delete-highlight', data: {confirm: _('Are you sure you want to remove this highlight')})}</td>
     </tr>



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/0d673be8451a9c81f2a0b4e7a4684fbcb8e0d561
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20161209/b4bab5e8/attachment-0001.html>


More information about the Noosfero-dev mailing list