Commit 64717354878402844ec82cd59664cfecb4e2ed17
Exists in
master
and in
41 other branches
Merge branch 'fix_load_data_on_download_block_edition' into 'master'
Fix load data on download block edition Fields on download block have no loading related informations from database, this merge fixes it. @daniela, @joenio See merge request !119
Showing
2 changed files
with
6 additions
and
6 deletions
Show diff stats
src/noosfero-spb/software_communities/views/box_organizer/_download_list.html.erb
src/noosfero-spb/software_communities/views/box_organizer/_download_list_template.html.erb
1 | 1 | <li class='download-option download-forms'> |
2 | 2 | <ul> |
3 | 3 | <li> |
4 | - <%= labelled_form_field(_('Name'), text_field_tag('block[downloads][][name]')) %> | |
4 | + <%= labelled_form_field(_('Name'), text_field_tag('block[downloads][][name]', (defined? download) ? download[:name] : '')) %> | |
5 | 5 | </li> |
6 | 6 | |
7 | 7 | <li> |
8 | - <%= labelled_form_field(_('Link'), text_field_tag('block[downloads][][link]')) %> | |
8 | + <%= labelled_form_field(_('Link'), text_field_tag('block[downloads][][link]', (defined? download) ? download[:link] : '')) %> | |
9 | 9 | </li> |
10 | 10 | |
11 | 11 | <li> |
12 | - <%= labelled_form_field(_('Platforms'), text_field_tag('block[downloads][][software_description]')) %> | |
12 | + <%= labelled_form_field(_('Platforms'), text_field_tag('block[downloads][][software_description]', (defined? download) ? download[:software_description] : '')) %> | |
13 | 13 | </li> |
14 | 14 | |
15 | 15 | <li> |
16 | - <%= labelled_form_field(_('Minimum Requirements'), text_field_tag('block[downloads][][minimum_requirements]')) %> | |
16 | + <%= labelled_form_field(_('Minimum Requirements'), text_field_tag('block[downloads][][minimum_requirements]', (defined? download) ? download[:minimum_requirements] : '')) %> | |
17 | 17 | </li> |
18 | 18 | |
19 | 19 | <li> |
20 | - <%= labelled_form_field(_('Size'), text_field_tag('block[downloads][][size]')) %> | |
20 | + <%= labelled_form_field(_('Size'), text_field_tag('block[downloads][][size]', (defined? download) ? download[:size] : '')) %> | |
21 | 21 | </li> |
22 | 22 | |
23 | 23 | <li class='delete-download-button'><%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %></li> | ... | ... |