demarches-normaliennes/app/views/invites/create.js.erb
Pierre de La Morinerie 1ca2ca9121 invite: support remote forms
This allows to keep the draft content when inviting a new user.
2018-08-01 17:41:12 +02:00

6 lines
354 B
Text

var formView = "<%= escape_javascript(render partial: 'invites/form', locals: { dossier: @dossier }) %>";
document.querySelector("#invites-form").outerHTML = formView;
var flashMessagesView = "<%= escape_javascript(render partial: 'layouts/flash_messages') %>";
document.querySelector("#flash_messages").outerHTML = flashMessagesView;
<% flash.clear %>