Commit graph

12 commits

Author SHA1 Message Date
Paul Chavard
1850d80b82 refactor(dossier): use new champs_for_revision method 2024-03-04 10:59:11 +01:00
Martin
d161a624c5 a11y(bloc-repetable): ETQ usager qui navigue au clavier, lorsque je supprime une repetition, le focus revient soit sur le premier champ de la derniere repetition, soit sur le bouton ajouter une repetition [si il y a pas de repetition presente] 2023-03-31 08:51:39 +02:00
Martin
a3f1e1926a a11y(bloc-repetable): ETQ usager qui navigue au clavier, lorsque j'ajoute un champs repetable, le focus vient sur le 1er champs du bloc repetable 2023-03-31 08:51:39 +02:00
Paul Chavard
4ec9a4be37 fix(dossier): do not crash when a repetition is empty 2023-02-06 11:53:32 +01:00
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