Sha256: 413cbd40b9f39139d689d2a4ee1e08f877ce72b226ce6c45d584e98a4cd0a906
Contents?: true
Size: 1.17 KB
Versions: 96
Compression:
Stored size: 1.17 KB
Contents
module ActiveScaffold module Helpers # Helpers that assist with the rendering of a Form Column module FormColumnHelpers def active_scaffold_input_file_column(column, options) if @record.send(column.name) # we already have a value? display the form for deletion. content_tag( :div, content_tag( :div, get_column_value(@record, column) + " " + hidden_field(:record, "delete_#{column.name}", :value => "false") + " | " + link_to_function(as_(:remove_file), "$(this).previous().value='true'; p=$(this).up(); p.hide(); p.next().show();"), {} ) + content_tag( :div, file_column_field("record", column.name, options), :style => "display: none" ), {} ) else # no, just display the file_column_field # AST - let's enjoy some of the AS formatting file_column_field("record", column.name, options.merge(active_scaffold_input_text_options(:class => "#{column.name}-input"))) end end end end end
Version data entries
96 entries across 96 versions & 1 rubygems