%= simple_form_for user, :method => "post", :remote => true, :url => upload_image_admin_user_path(user), :html => {:multipart => true, :class => 'form-horizontal upload_image' } do |f| %>
<%= image_tag(user.image_url(:thumb) , alt: user.name, class: 'profile_img') %>
<% user.build_profile_image unless user.profile_image %>
<%= f.fields_for :profile_image do |p| %>
<%= p.input :image, :label => 'Upload Image', :label_html => { class: "upimg, fullcent"}, :value => '', :required => false, input_html: {id: "tutor_#{user.id}_profile_image_attributes_image"} %>
<%= p.input :crop_x, as: :hidden, input_html: { class: :crop_x } %>
<%= p.input :crop_y, as: :hidden, input_html: { class: :crop_y } %>
<%= p.input :crop_w, as: :hidden, input_html: { class: :crop_w } %>
<%= p.input :crop_h, as: :hidden, input_html: { class: :crop_h } %>
<% end %>
<% end %>