demarches-normaliennes/app/views/users/dossiers
Pierre de La Morinerie 96037069ff autosave: remove the repetition row after deletion
Before, when autosaving a draft, removing a repetition row would
send `_destroy` inputs to the controller – but not remove the row
from the DOM. This led to the `_destroy` inputs being sent again
on the next autosave request, which made the controller raise
(because the row fields were already deleted before).

To fix this, we let the controller response remove the deleted
row(s) from the DOM.

Doing it using a controller response avoids the need to keep track
of operations on the Javascript side: the controller can easily
know which row was just deleted, and emit the relevant changes for
the DOM. This keeps the autosave requests robust: even if a request
is skipped (e.g. because of a network interruption), the next request
will still contain the relevant informations to succeed, and not let the
form in an unstable state.

Fix #5470
2020-08-25 14:39:34 +02:00
..
etablissement display only etablissement infos 2020-05-20 11:09:54 +02:00
show headers : aria-label in print button 2020-06-16 14:39:27 +00:00
_autosave.html.haml urls: fix link to autosave FAQ article 2020-05-18 16:53:19 +02:00
_dossier_actions.html.haml Fix html: Element div not allowed as child of element span 2019-11-19 15:14:06 +01:00
_index_footer.html.haml Better structure footer-site-links in list 2019-11-06 17:01:07 +01:00
brouillon.html.haml use of scroll-margins-for-sticky-footer where we have sticky-footers 2020-07-29 15:28:03 +02:00
brouillon.js.erb autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
demande.html.haml Add edit dossier link 2019-07-24 12:21:35 +02:00
etablissement.html.haml display only etablissement infos 2020-05-20 11:09:54 +02:00
identite.html.haml identite: remove the "*" for required labels 2020-04-02 17:34:00 +02:00
index.html.haml remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
merci.html.haml add missing alt 2019-12-03 10:07:04 +01:00
messagerie.html.haml app: rename new_user to users 2019-03-25 10:56:39 +01:00
modifier.html.haml app: rename new_user to users 2019-03-25 10:56:39 +01:00
show.html.haml app: rename new_user to users 2019-03-25 10:56:39 +01:00
siret.html.haml better spacing 2019-07-25 11:40:46 +02:00