demarches-normaliennes/app/views/champs/siret/index.js.erb
2018-08-01 11:55:35 +02:00

8 lines
517 B
Text

(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;
})();