demarches-normaliennes/app/views/shared/dossiers
Pierre de La Morinerie 0800bf68d0 views: allow unselecting all values from a multiple dropdown
Currently, deselecting all values from a multiple dropdown rendered as
checkboxes doesn't have any effect when submitting the form (the
previous values are still there, instead of being deselected).

This is because unchecked checkboxes are not sent by the browser – so
the "empty selection" never gets sent.

Rails `form.check_box` usually works around this by inserting an empty
hidden checkbox element, that will be sent even if all others are
de-selected. But the documentation warns that this is not possible when
iterating over an array (rather than a model). Which is our case here.

To fix this, this commit uses `collection_check_boxes` instead. It will
insert the proper hidden checkboxes in all cases, and fix our use case.

See https://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-collection_check_boxes
2020-08-27 11:13:40 +02:00
..
editable_champs views: allow unselecting all values from a multiple dropdown 2020-08-27 11:13:40 +02:00
messages corrige mise en forme commentaire 2020-08-10 17:36:23 +02:00
_champ_row.html.haml Fix the thousand separator in order to copy/paste without space 2020-02-17 11:31:12 +01:00
_champs.html.haml highlight routing criteria label when updated 2020-03-04 14:56:59 +01:00
_demande.html.haml suppression du message d'alerte suite aux problèmes d'upload 2020-07-27 10:32:03 +02:00
_edit.html.haml replacing ' with ’ in text 2020-06-16 14:39:27 +00:00
_header.html.haml dossier: extract the invitation dropdown to a partial 2018-09-24 16:29:36 +02:00
_identite_entreprise.html.haml affiche les chiffres clés des 3 derniers bilans 2020-06-09 17:51:54 +02:00
_identite_entreprise_bilan_detail.html.haml affiche les chiffres clés des 3 derniers bilans 2020-06-09 17:51:54 +02:00
_identite_individual.html.haml change date format for all, use try_format_date of helper 2019-06-12 17:48:12 +02:00
_infos_generales.html.haml Refactor attachment view 2019-05-21 14:21:13 +02:00
_messagerie.html.haml Maj message quand messagerie désactivée 2019-11-18 14:28:05 +01:00
_submit_is_over.html.haml Rename demarche archivée to demarche close 2019-11-28 15:07:16 +01:00
_user_infos.html.haml gestionnaire: move dossier partials to a shared location 2018-08-14 15:06:44 +02:00