demarches-normaliennes/app/views/shared
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
..
attachment creation of attachment_upload_helpers and integration in the code 2020-07-29 12:26:27 +02:00
champs Put IGN map behind a feature flag 2020-07-30 17:22:28 +02:00
dossiers autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
help help_dropdown_procedure contains now a <button> and not a <div>, which makes it accessible for keyboard navigation 2020-06-18 11:17:39 +02:00
password Administrateur password, remove one level of indirection 2019-08-12 13:43:03 +02:00
_france_connect_login.html.haml ajout de traductions 2020-07-29 09:27:16 +02:00
_mailer_round_button.html.haml helpers: add variants to mailer_round_button 2019-07-25 12:25:50 +02:00
_mailer_vertical_margin.html.haml helpers: add vertical_margin helper for mailers 2019-07-25 12:25:50 +02:00
_procedure_description.html.haml change procedure_auto_archive helper name and added a helper for 23 h 59 2020-05-28 13:22:02 +00:00
_tab_item.html.haml views: add tab_item and active_tab_item helpers 2018-08-16 16:36:37 +02:00