Select Thumbnail

Select an image, then click "Finish" to upload and insert it if you are certain your image is already web-ready. Otherwise, click "Next" to crop and resize your image before using it.

<%= form_tag({ action: 'receive_image', id: @pg, overwrite: 1 }, { id: 'upload-image-form', multipart: true }) do %>
File: <%= file_field 'file', 'data', :class => 'form', :style => 'margin-bottom: 0; min-width: 150px' %>
Valid image types: jpeg, png, gif
<%= submit_tag 'Next', id: 'upload-image-next-button', class: 'form_button', style: 'min-width: 70px' %> <%= submit_tag 'Finish', id: 'upload-image-finish-button', class: 'form_button', style: 'min-width: 70px' %> <%= link_to_function "Cancel", "cancelSelectThumbnail()" %>
<%- end -%> <%= form_remote_tag(update: 'select_thumbnail_dialog_content', html: { id: 'mainform' }, url: { action: 'crop_thumb', id: @pg }) do %> <%= text_field_tag 'next_clicked', '0', style: 'display: none' %> <%= text_field_tag 'filename', '', style: 'display: none' %> <%- end -%>