Commit graph

8 commits

Author SHA1 Message Date
Martin
8528939b75 correctif(champs/repetitions#remove): les row id etant des ulid commence par un int. utiliser l'ulid comme selecteur css n'est pas valide. il faut donc avoir un selecteur CSS 'safe', et envoyer le row_id 2023-01-19 10:48:01 +01:00
simon lehericey
a3e8c09e71 component all the champ 2022-09-01 09:48:27 +02:00
Paul Chavard
1a9f2f0eef refactor(champ): improuve repetition champ 2022-05-04 17:18:52 +02:00
Paul Chavard
2d1370d123 refactor(champ): simplify repetition champ 2022-05-03 16:14:54 +02:00
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
Pierre de La Morinerie
2532091302 form: improve wording of repetition blocks controls 2020-02-11 17:36:50 +01:00
Paul Chavard
a708b071dd Do not crash with champ repetable with no children 2019-11-06 12:54:07 +01:00
Paul Chavard
071448e1d9 Champ Repetition dossier editor 2019-02-04 16:19:07 +01:00