Sha256: 0d5fefc6e9a55fda03b3310492d2177246c109dc1ef189578323ac9161791b3f
Contents?: true
Size: 982 Bytes
Versions: 1
Compression:
Stored size: 982 Bytes
Contents
- file = @object.send(field.method_name).presence .toggle{:style => ('display:none;' if file && field.delete_method && @object.send(field.delete_method) == '1')} - if value = field.pretty_value = value %span.row = form.file_field(field.name, field.html_attributes) - if field.optional? && field.errors.blank? && file && field.delete_method %span.label.notice{:style => 'cursor:pointer;', :onclick => "jQuery(this).siblings('[type=checkbox]').click(); jQuery(this).siblings('.toggle').toggle('slow'); jQuery(this).toggleClass('important notice'); "} = I18n.t('admin.actions.delete').capitalize + " #{field.method_name}" = form.check_box(field.delete_method, :style => 'display:none;' ) - if field.cache_method = form.hidden_field(field.cache_method) = javascript_tag do jQuery(function($) { $("##{field.dom_name} .delete input[type='checkbox']").live('click', function() { $(this).parents('.input').first().children('.toggle').toggle('slow'); }); })
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
elucid-rails_admin-0.0.1 | app/views/rails_admin/main/_form_file_upload.html.haml |