<% if @audio_confirmation_data.is_valid %>
$("#audio_confirmations").html("<%= j render("video_analyses/audio_confirmations", audio_confirmations: @audio_confirmations_data.audio_confirmations) %>");

<% if @audio_confirmation_data.should_toggle_checkmark %>
  $('#audio_matches .releasable-match').has('td:contains("<%= @audio_confirmation_data.presented_source_file_name %>")').has('td:contains("<%= @audio_confirmation_data.timecode_in %>")').attr("data-confirmed", true).data("confirmed", true)
  $('#music_releases .music-releasable').has('figure:contains("<%= @audio_confirmation_data.source_file_name %>")').attr("data-confirmed", true).data("confirmed", true)
<% end %>

$("#new_audio_confirmation_modal").modal("toggle");
$('.modal-backdrop').remove();
<% else %>
<% end %>