<% if @issue.valid? %>
  $("#content").prepend($("<div/>").attr({"class":"flash notice"}).html("<%= j l(:notice_issue_successful_create, :id => link_to("#{@issue.to_s}", issue_path(@issue), :title => @issue.subject)).html_safe %>"))
  EASY.modalSelector.closeModal();
<% else %>
  $("#ajax-modal").prepend("<%= j error_messages_for(@issue) %>");
<% end %>
