<%- if defined?(@exception) -%>
  <%- message = l(:error_creating_time_entry, :message => @exception.message)
      message_class = "error" -%>
  $("#time-entry-messages").html("<div class=\"flash <%= message_class %>\"><%= message %></div>");
<%- else -%>
  $("#ajax-modal").dialog("close");
<%- end -%>
<%- if !defined?(@exception) -%>
  <%- pbi_row = "pbi_#{@issue.parent.id}_row" -%>
  if ($("#<%= pbi_row %>").length > 0) {
    $("#<%= pbi_row %>").replaceWith("<%=
			escape_javascript(render :partial => "post_its/sprint_board/pbi_row", :formats => [:html],
		   												 :locals => {:project => @project, :pbi => @issue.parent,
  		  																	 :task_statuses => IssueStatus.task_statuses}).html_safe
		%>");
  }
<%- end -%>
