fix actions multiples dropdown instruction

This commit is contained in:
Lisa Durand 2023-12-06 16:57:29 +01:00
parent 51c5a8d0f7
commit f311f9e7d8
4 changed files with 20 additions and 16 deletions

View file

@ -18,6 +18,7 @@
textarea {
margin-bottom: $default-spacer;
min-height: 10em;
}
.help {

View file

@ -64,24 +64,27 @@ class Dossiers::BatchOperationComponent < ApplicationComponent
label: t(".operations.accepter"),
operation_description: t(".operations.accepter_description"),
operation: BatchOperation.operations.fetch(:accepter),
operation_class_name: 'accept',
placeholder: t(".placeholders.accepter")
},
{
label: t(".operations.refuser"),
operation_description: t(".operations.refuser_description"),
operation: BatchOperation.operations.fetch(:refuser),
operation_class_name: 'refuse',
placeholder: t(".placeholders.refuser")
operation_class_name: 'fr-icon-checkbox-circle-fill fr-text-default--success',
placeholder: t(".placeholders.accepter"),
instruction_operation: 'accept'
},
{
label: t(".operations.classer_sans_suite"),
operation_description: t(".operations.classer_sans_suite_description"),
operation: BatchOperation.operations.fetch(:classer_sans_suite),
operation_class_name: 'without-continuation',
placeholder: t(".placeholders.classer_sans_suite")
operation_class_name: 'fr-icon-intermediate-circle-fill fr-text-mention--grey',
placeholder: t(".placeholders.classer_sans_suite"),
instruction_operation: 'without-continuation'
},
{
label: t(".operations.refuser"),
operation_description: t(".operations.refuser_description"),
operation: BatchOperation.operations.fetch(:refuser),
operation_class_name: 'fr-icon-close-circle-fill fr-text-default--warning',
placeholder: t(".placeholders.refuser"),
instruction_operation: 'refuse'
}
]
},

View file

@ -16,5 +16,5 @@ fr:
confirm: Confirmez-vous le traitement multiple des dossiers sélectionnés ?
placeholders:
accepter: "Expliquez aux demandeurs pourquoi leur dossier est accepté (facultatif)"
refuser: "Expliquez aux demandeurs pourquoi leur dossier est accepté (obligatoire)"
classer_sans_suite: "Expliquez aux demandeurs pourquoi leur dossier est accepté (obligatoire)"
refuser: "Expliquez aux demandeurs pourquoi leur dossier est refusé (obligatoire)"
classer_sans_suite: "Expliquez aux demandeurs pourquoi leur dossier est classé sans suite (obligatoire)"

View file

@ -5,13 +5,13 @@
- opt[:instruction].each do |opt|
- menu.with_item do
= link_to('#', onclick: "DS.showMotivation(event, '#{opt[:operation_class_name]}');", role: 'menuitem') do
= link_to('#', onclick: "DS.showMotivation(event, '#{opt[:instruction_operation]}');", role: 'menuitem') do
%span{ class: "icon #{opt[:operation_class_name]}" }
.dropdown-description
%h4= opt[:label]
= opt[:operation_description]
- menu.with_item(class: "hidden inactive form-inside fr-pt-1v") do
= render partial: 'instructeurs/dossiers/instruction_button_motivation_batch', locals: { instruction_operation: opt[:operation_class_name], form:, opt: }
= render partial: 'instructeurs/dossiers/instruction_button_motivation_batch', locals: { instruction_operation: opt[:instruction_operation], form:, opt: }
- else
= form.button opt[:label], class: ['fr-btn fr-btn--sm fr-btn--icon-left fr-ml-1w', icons[opt[:operation].to_sym]], disabled: true, name: "#{form.object_name}[operation]", value: opt[:operation], data: { operation: opt[:operation] }