From 95acc0adb6182eac6ae7f3d44e8e02f0fcb34b07 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Mon, 21 Oct 2024 15:31:51 +0200 Subject: [PATCH 1/4] Add context to delete button --- .../attachment/edit_component/edit_component.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/attachment/edit_component/edit_component.html.haml b/app/components/attachment/edit_component/edit_component.html.haml index 45d8ceafc..423490e50 100644 --- a/app/components/attachment/edit_component/edit_component.html.haml +++ b/app/components/attachment/edit_component/edit_component.html.haml @@ -6,7 +6,7 @@ .flex.flex-gap-2{ class: class_names("attachment-error": attachment.virus_scanner_error?) } - if user_can_destroy? = render NestedForms::OwnedButtonComponent.new(formaction: destroy_attachment_path, http_method: :delete, opt: {class: "fr-btn fr-btn--tertiary fr-btn--sm fr-icon-delete-line", title: t(".delete_file", filename: attachment.filename)}) do - = t('.delete') + = t('.delete_file', filename: attachment.filename) - if downloadable?(attachment) = render Dsfr::DownloadComponent.new(attachment: attachment) @@ -24,7 +24,7 @@ .flex.flex-gap-2{ class: class_names("attachment-error": attachment.virus_scanner_error?) } - if user_can_destroy? = render NestedForms::OwnedButtonComponent.new(formaction: destroy_attachment_path, http_method: :delete, opt: {class: "fr-btn fr-btn--tertiary fr-btn--sm fr-icon-delete-line", title: t(".delete_file", filename: attachment.filename)}) do - = t('.delete') + = t('.delete_file', filename: attachment.filename) - if downloadable?(attachment) = render Dsfr::DownloadComponent.new(attachment:) From 4ad4f9be0b1fb66009a51996a95aac60d561526b Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Tue, 5 Nov 2024 14:23:08 +0100 Subject: [PATCH 2/4] fix(outdated code) Remove useless condition --- .../champ_label_component/champ_label_component.html.haml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/components/editable_champ/champ_label_component/champ_label_component.html.haml b/app/components/editable_champ/champ_label_component/champ_label_component.html.haml index 0be774df0..5dffbf6cd 100644 --- a/app/components/editable_champ/champ_label_component/champ_label_component.html.haml +++ b/app/components/editable_champ/champ_label_component/champ_label_component.html.haml @@ -5,9 +5,3 @@ - render EditableChamp::ChampLabelContentComponent.new form: @form, champ: @champ, seen_at: @seen_at - elsif @champ.legend_label? %legend.fr-fieldset__legend.fr-text--regular{ id: @champ.labelledby_id }= render EditableChamp::ChampLabelContentComponent.new form: @form, champ: @champ, seen_at: @seen_at -- elsif @champ.single_checkbox? - -# no label to add -- else - -# champ civilite (and other?) - .fr-label.fr-mb-1w{ id: @champ.labelledby_id } - = render EditableChamp::ChampLabelContentComponent.new form: @form, champ: @champ, seen_at: @seen_at From 82963efb608f7a306ebf7551271357d0be6a9373 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Tue, 5 Nov 2024 14:25:07 +0100 Subject: [PATCH 3/4] fix(typo) Correct misspelled attribute --- .../release_note/form_component/form_component.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/release_note/form_component/form_component.html.haml b/app/components/release_note/form_component/form_component.html.haml index 94d74ff9c..9102ae1be 100644 --- a/app/components/release_note/form_component/form_component.html.haml +++ b/app/components/release_note/form_component/form_component.html.haml @@ -24,7 +24,7 @@ = category.humanize - if categories_error? - .fr-messages-group{ id: "checkboxes-error-messages", aria_live: "assertive" } + .fr-messages-group{ id: "checkboxes-error-messages", "aria-live": "assertive" } - if categories_full_messages_errors.one? %p.fr-message.fr-message--error{ id: categories_errors_describedby_id }= categories_full_messages_errors.first - else From d44d8f526e8f668433b23eeb40ba027be83c9eba Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Tue, 5 Nov 2024 14:36:15 +0100 Subject: [PATCH 4/4] fix(trad) Correct misspelled key --- config/locales/models/champs/champs.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/models/champs/champs.en.yml b/config/locales/models/champs/champs.en.yml index ead703062..b647ec55d 100644 --- a/config/locales/models/champs/champs.en.yml +++ b/config/locales/models/champs/champs.en.yml @@ -1,4 +1,4 @@ -fr: +en: activerecord: errors: models: