This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %div.tac | |
| -# remotipart for ajax image upload | |
| = form_for Parent.new, url: upload_parent_photo_path, remote: true, html: { id: 'file-form' } do |f| | |
| #temp-photo.tac{ style: "position: relative; background: url('#{image_path(resource.avatar.url(:thumb))}') center center no-repeat; height: 120px" } | |
| -# prompt | |
| = link_to '#', class: 'btn btn-mini btn-light', style: 'opacity: 0.9; position: absolute; bottom: 0; left: 50%; width: 100px; margin-left: -55px' do | |
| Choose Photo | |
| -# almost transparent file field which actually receives mouse click and "covers" link above | |
| = f.file_field :avatar, id: 'temp-avatar', style: 'position: absolute; cursor: pointer; opacity: 0.01; top: 0; left: 0; width: 100%; height: 100%; ' |
NewerOlder