<form id="delete-template-form" method="post" action="<%= ApplicationController.root_context -%>/permission_templates/delete">
  <input type="hidden" name="id" value="<%= @permission_template.id -%>">
  <fieldset>
    <div class="modal-head">
      <h2><%= message 'permission_template.delete_confirm_title' -%></h2>
    </div>
    <div class="modal-body">
      <div id="permission-template-error" class="permission-template error errors" style="display:none;" />
      <div class="info">
        <img src="<%= ApplicationController.root_context -%>/images/information.png" style="vertical-align: text-bottom"/>
        <%= message 'permission_template.do_you_want_to_delete_template_xxx', :params => @permission_template.name -%>
      </div>
    </div>
    <div class="modal-foot">
      <input type="submit" value="<%= message 'permission_template.delete_template' -%>" id="confirm-submit"/>
      <a href="#" onclick="return closeModalWindow()" id="confirm-cancel"><%= h message('cancel') -%></a>
    </div>
  </fieldset>
</form>

<script>
  $j("#delete-template-form").modalForm({success: function (data) {
    window.location.reload();
  }});
</script>
