Sha256: cc86625bed562987248cbc59c20b74e2fc2dfff65d83f0a02cb30b9146216fa5

Contents?: true

Size: 1.55 KB

Versions: 56

Compression:

Stored size: 1.55 KB

Contents

<%= form_for(@document, :as => :document,
            :url => main_app.crop_document_path(@document),
            :method => :put,
            :html => {:id=>"form_crop_photo", :class=>"mb-0 form-horizontal", :multipart => true, :target => "iframe_crop_photo"}) do |f| %>

  <div class="modal-body">

    <%= @document.errors[:base].to_sentence %>

    <%= hidden_field_tag :documentable_id, params[:documentable_id] %>
    <%= hidden_field_tag :documentable_type, params[:documentable_type] %>
    <%= hidden_field_tag :redirect_url, params[:redirect_url] %>
    <%= hidden_field_tag :document_type, params[:document_type] %>

    <% %w[x y w h].each do |i| %>
      <%= f.hidden_field "crop_#{i}", class: "crop_#{i}" %>
    <% end %>

    <div class="add-photos-path">
      <div class="row">
        <%= document_tag @document.document.present? ?
                  (@document.document_url) :
                  ('http://placehold.it/220x220'), :alt => '', :id => "new_photos", :class=>"img-thumbnail" %>
      </div>
    </div>

  </div>

  <div class="modal-footer">
    <div class="pull-right">
      <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
      <%= submit_tag "Crop Document", "data-reset-text"=>"Crop Document", "data-loading-text"=>"Cropping ...", :class=>"btn btn-primary ml-10" %>
    </div>

  </div>

  <div class="cl-10"></div>

<% end %>

<!-- when the form is submitted, the server response will appear in this iframe -->
<iframe id="iframe_crop_photo" name="iframe_crop_photo" width="100%" style="display:none;">
</iframe>

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
kuppayam-0.2.12.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.11.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.10.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.9.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.8.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.7.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.6.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.5.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.4.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.3.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.2.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.1.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.2.0.pre.materialize app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.1.39 app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.1.38 app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.1.37 app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.1.36 app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.1.35 app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.1.34 app/views/kuppayam/documents/_crop_form.html.erb
kuppayam-0.1.33 app/views/kuppayam/documents/_crop_form.html.erb