Permalink
Browse files

Fix for issue #2

  • Loading branch information...
1 parent aaf480d commit b16bbc1b241995b8b920ce149e1bac3907702877 @jaycode jaycode committed with Marcin Naglik Jan 21, 2010
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/form_ui.rb
View
@@ -12,13 +12,12 @@ def active_scaffold_input_paperclip(column, options)
content_tag(
:div,
link_to(content, @record.send(column.name).url, :popup => true) + " " +
- hidden_field("record[#{column.name}]".to_sym, "delete_#{column.name}", :value => "false") +
" | " +
- link_to_function(as_(:remove_file), "$(this).previous().value='true'; p=$(this).up(); p.hide(); p.next().show();")
+ link_to_function(as_(:remove_file), "$(this).previous().value='true'; p=$(this).up(); p.hide(); p.next().insert('" + hidden_field("record[#{column.name}]".to_sym, "delete_#{column.name}", :value => "false") + "'); p.next().insert('" + file_field(:record, column.name, options) + "'); p.next().show()")
) +
content_tag(
:div,
- file_field(:record, column.name, options),
+ '',
:style => "display: none"
)
else

0 comments on commit b16bbc1

Please sign in to comment.