Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix : icône lien externe en double edition masse motif #4928

Open
wants to merge 1 commit into
base: production
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions app/views/admin/territories/motifs/batch_edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ h1 Modification en masse de #{@motifs.size} motifs
.input-group
= f.text_field :name, value: (unique_values.size > 1 ? "" : unique_values.keys.first), class: "form-control", required: true
.input-group-append
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "btn btn-primary"
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "fr-btn"

.card.p-3.mb-4
= form_with(url: batch_update_admin_territory_motifs_path, method: :post, html: { id: "service_form" }) do |f|
Expand All @@ -42,7 +42,7 @@ h1 Modification en masse de #{@motifs.size} motifs
.input-group
= f.select :service_id, current_territory.services.reject(&:secretariat?).map { [_1.name, _1.id] }, { selected: (unique_values.size > 1 ? "" : unique_values.keys.first.id), include_blank: true, required: true }, { class: "custom-select" }
.input-group-append
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "btn btn-primary"
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "fr-btn"

.card.p-3.mb-4
= form_with(url: batch_update_admin_territory_motifs_path, method: :post, html: { id: "duration_form" }) do |f|
Expand All @@ -62,7 +62,7 @@ h1 Modification en masse de #{@motifs.size} motifs
.input-group
= f.number_field :default_duration_in_min, value: (unique_values.keys.size > 1 ? nil : unique_values.keys.first), class: "form-control", required: true
.input-group-append
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "btn btn-primary"
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "fr-btn"

.card.p-3.mb-4
= form_with(url: batch_update_admin_territory_motifs_path, method: :post, html: { id: "color_form" }) do |f|
Expand All @@ -79,7 +79,7 @@ h1 Modification en masse de #{@motifs.size} motifs
.input-group
= f.color_field :color, value: current_colors.first, class: "form-control", list: "current_colors", required: true
.input-group-append
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "btn btn-primary"
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "fr-btn"

- %i[restriction_for_rdv instruction_for_rdv custom_cancel_warning_message].each do |instruction_attr_name|
.card.p-3.mb-4
Expand All @@ -104,12 +104,10 @@ h1 Modification en masse de #{@motifs.size} motifs
small.form-text.text-muted.mb-2 Ces #{@motifs.size} motifs ont le même texte
= f.text_area instruction_attr_name, value: (unique_values.size > 1 ? nil : unique_values.keys.first), class: "form-control"
.mt-1
= link_to image_path("motif_form/#{instruction_attr_name}.png"), target: "_blank" do
span> Voir un exemple
i.fa.fa-external-link-alt>
= link_to "Voir un exemple", image_path("motif_form/#{instruction_attr_name}.png"), target: "_blank", class: "fr-link"

.float-right
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "btn btn-primary"
= f.submit "Appliquer à ces #{@motifs.size} motifs", class: "fr-btn"

.rdv-text-align-center.mb-4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pour ma gouverne, qu’est-ce qui ne marchait pas avec la marge à ce niveau?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je n’ai pas creusé dans le détail, mais quand on le met ici le bouton passe sous le footer
image
D’ailleurs un jour, il faudra certainement revoir le footer de ces pages parce qu’il manque un morceau (certainement parce qu’on utilise le même que sur les pages avec le bandeau à gauche)

= link_to("Retour", admin_territory_motifs_path, class: "btn btn-outline-primary")
.rdv-text-align-center
= link_to("Retour", admin_territory_motifs_path, class: "fr-btn fr-btn--secondary fr-mb-3w")
Loading