javascript to make a modal submit a form in rails
<p>I have a rails form that is a partial to a page and after the user fills out the form they hit a button which brings up a bootstrap modal and the submit for that form is in the footer of the modal. I cant get the form to submit, I believe I need some javascript but I am not too versed in javascript. Here is my partial with the modal, what javascript do I need to make this submit?</p>

<pre><code>&lt;%= form_for [:client, Reportapproval.new], :validate =&gt; true do |f| %&gt;   &lt;div class="actions"&gt;
 &lt;%= f.hidden_field :blah, :value =&gt; current_client.name %&gt;   &lt;/div&gt;   &lt;div class="block-inline"&gt;
  &lt;label&gt;Blah Blah&lt;/label&gt;&lt;br&gt;
   &lt;%= f.select :client... %&gt;      &lt;/div&gt;   &lt;%= f.text_field :client... %&gt;
  &lt;label&gt;
   &lt;%= f.hidden_field :client... %&gt;
  &lt;/label&gt;   &lt;div class="text-center"&gt;
  &lt;button type="button" class="btn btn-success" data-toggle="modal" data-target="#client_disclaimer_modal"&gt;
    Request a report from this renter
  &lt;/button&gt; &lt;!--- This button opens the modal---&gt;   &lt;/div&gt;

&lt;!-- Disclaimer Modal --&gt;   &lt;div class="modal fade" id="clent_disclaimer_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"&gt;
&lt;div class="modal-dialog" role="document"&gt;
  &lt;div class="modal-content"&gt;
    &lt;div class="modal-header"&gt;
      &lt;h4 class="modal-title" id="myModalLabel"&gt;Client Disclaimer Agreement&lt;/h4&gt;
    &lt;/div&gt;
    &lt;div class="modal-body"&gt;
      &lt;strong&gt;NOTICE...&lt;br&gt;
    &lt;/div&gt;
    &lt;div class="modal-footer"&gt;
      &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
      &lt;%= f.submit "Agree &amp; Submit", class: 'btn btn-default' %&gt;
     &lt;/div&gt;
    &lt;/div&gt;
   &lt;/div&gt;   
  &lt;/div&gt; 
 &lt;/div&gt;  
 &lt;br /&gt;  
&lt;% end %&gt;
</code></pre>