demarches-normaliennes/app/views
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
..
active_storage/blobs Add ActionText 2019-07-03 13:15:49 +02:00
admin views: explicitely marks form_with as non-remote forms 2020-08-05 13:02:56 +02:00
administrateur_mailer remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
administrateurs remove useless session views 2019-08-14 18:04:26 +02:00
administration_mailer remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
administrations/sessions omniauth: protect against CSRF 2019-07-15 18:16:00 +02:00
attachments dossier: make the upload label a real label 2020-03-25 14:43:09 +01:00
avis_mailer remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
champs autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
commencer france connect avant les boutons de login/signup 2020-07-29 09:18:51 +02:00
demandes remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
devise_mailer remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
dossier_mailer change procedure_auto_archive helper name and added a helper for 23 h 59 2020-05-28 13:22:02 +00:00
dossiers use traitement model 2020-07-08 18:15:15 +02:00
fields Remove Rempli column for type de champ 2020-02-11 13:35:55 +00:00
groupe_instructeur_mailer Changed the routes to pass all new design admin pages under 2020-07-07 14:08:01 +00:00
instructeur_mailer remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
instructeurs autofocus on 'input: password' removed according to accessibility audit requirements. No change noticed 2020-08-19 14:35:34 +00:00
invite_mailer remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
invites user: revoque un invité sur un dossier 2020-07-14 18:25:31 +02:00
layouts Fix syntax for using APPLICATION_NAME in mailers/layout 2020-08-06 12:45:19 +02:00
manager Changed the routes to pass all new design admin pages under 2020-07-07 14:08:01 +00:00
new_administrateur Adapt configuration email view to the new UI 2020-08-06 16:56:24 +02:00
notification_mailer admin: display CTA buttons in emails preview 2019-07-25 12:25:50 +02:00
root Merge pull request #5411 from betagouv/toggle-switch-creation 2020-07-29 10:34:19 +02:00
shared autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00
stats added footer on static pages 2020-03-25 09:50:41 +00:00
support remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
user_mailer remplacement de demarches-simplifiees.fr par un paramètre dans les vues 2020-07-23 16:16:36 +02:00
users autosave: remove the repetition row after deletion 2020-08-25 14:39:34 +02:00