<button type="button" class="btn btn-success mb-3" data-behavior="clipboard" href="<%= polymorphic_url [:new, @account, @project, @contract_template, @release, :amendment] %>">
  <i class="fa fa-clipboard"></i>
  <%= t '.copy_url' %>
</button>


<div class="card shadow-sm">
  <div class="card-body">
    <%= errors_summary_for @release %>
    <%= bootstrap_form_with model: @release, method: :post, url: public_send("account_project_contract_template_#{@contract_template.release_type}_release_amendments_path"), local: true do |form| %>
      <%= card_field_set_tag t('.signed_contract_preview') do %>
        <embed class="embeded-contract-preview" type="application/pdf" src="<%= url_for([@release, :contracts, format: "pdf"]) %>" width="80%" height="1200" />
      <% end %>

      <%= card_field_set_tag t(".amendment.heading") do %>
        <p><%= @contract_template.amendment_clause %></p>
      <% end %>

      <hr>

      <div class="form-row">
        <%= form.text_field :amendment_signer_name, required: true, wrapper_class: "col-sm-6" %>
      </div>

      <%= card_field_set_tag t(".signature.heading") do %>
        <%= render "shared/signature_fields", signature_field: :amendment_signature_base64, form: form %>
      <% end %>

      <div class="mt-5">
        <%= form.button t("shared.submit_release_long"), class: "btn btn-block btn-lg btn-success", data: { disable_with: t("shared.disable_with") } %>
      </div>
    <% end %>
  </div>
</div>
