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

    <%= render :partial => 'shared_form', :locals => {:display_owner => true} %>

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