var form = $("form[rel='#{note.discussion_id}']");
$('.line-note-form-holder textarea').val("");
var row = form.closest("tr");
// find the reply button for this line
// is this the first note?
// (might not be there if this is the first note)
if (row.is(".js-temp-notes-holder")) {
var trRpl = $(".js-note-add-to-diff-line[data-noteable-type='#{note.noteable_type}'][data-noteable-id='#{note.noteable_id}'][data-line-code='#{note.line_code}']").closest("tr");