<form id="copy-filter-form" method="post" action="<%= ApplicationController.root_context -%>/measures/copy">
  <input type="hidden" name="id" value="<%= @filter.id -%>">
  <fieldset>
    <div class="modal-head">
      <h2>Copy Filter</h2>
    </div>

    <%= render :partial => 'shared_form' %>

    <div class="modal-foot">
      <input type="submit" value="<%= h message('copy') -%>" id="copy-submit"/>
      <a href="#" onclick="return closeModalWindow()" id="copy-cancel"><%= h message('cancel') -%></a>
    </div>
  </fieldset>
</form>
<script>
  $j("#copy-filter-form").modalForm({success: function (data) {
    window.location = baseUrl + '/measures/filter/' + data;
  }});
</script>