demarches-normaliennes/app/views
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
..
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 Internationalization of the Contact page in FR and EN 2020-08-27 11:03:34 +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 views: allow unselecting all values from a multiple dropdown 2020-08-27 11:13:40 +02:00
stats added footer on static pages 2020-03-25 09:50:41 +00:00
support Internationalization of the Contact page in FR and EN 2020-08-27 11:03:34 +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