(function() { <% if @blank || @error %> var html = "<%= escape_javascript(render partial: 'shared/champs/siret/delete_etablissement', locals: { message: @error, position: @champ.order_place, etablissement: @etablissement }) %>"; <% else %> var html = "<%= escape_javascript(render partial: 'shared/champs/siret/etablissement', locals: { position: @champ.order_place, etablissement: @etablissement }) %>"; <% end %> document.querySelector("#etablissement-for-<%= @champ.id %>").innerHTML = html; })();