* feat(dossier): prefill drop down list champ
* decorate the types de champ to avoid if / else
In order to avoid doing if this a drop down ? / else at several places,
we decorate the types de champ and let the decorator give the possible
and example values.
* show all possible values when there are too many
* allow to prefill 'other' option
* review: remove duplicate
* review: refactor for readability
* validate that value is in options
* review: exclude disabled options
* extract parent for yes no and checkbox champs
* checkbox stores true / false instead of on / off
* normalize blank value to nil
* normalize invalid value to false
* after party task: normalize checkbox values
* after party task: normalize yes_no values
This reverts commit 9e26ee932e.
Finalement les champs génériques ne doivent pas avoir de placeholder
personnalisable, ce sera uniquement via la description.
fix(lint): lint haml
fix(spec): enable flipper and allow procedure to receive flipper check when checking banner presence
fix(doc): add missing documentation on readme regarding system testing with a visual feedback
fix(typo): add missing accent
clean(PR): feedback from Tchak, better to wrap feature check for expirability by procedure within dossier.expirable? helper
Calling business logic in a factory is a code-smell, because it
usually requires the object to be saved into database, and may have
unintended consequences when the business logic is changed.
Also, this allows to just build a published procedure, without saving it
to the database.
The check for whether the checkbox should be checked or not was made by
matching the whole string. Thus, given two options 'valid' and
'invalid', the check for the presence of 'valid' would succeed even when
only 'invalid' was present in the values (because
`'valid'.includes?('invalid')`.
The code now checks against the list of items in the selected_options.