Add default dossier_id to contact form on dossier pages
This commit is contained in:
parent
a943856141
commit
7ac4dc355f
3 changed files with 10 additions and 3 deletions
|
@ -56,7 +56,11 @@ module ApplicationHelper
|
||||||
|
|
||||||
def contact_link(title, options = {})
|
def contact_link(title, options = {})
|
||||||
if Flipflop.support_form?
|
if Flipflop.support_form?
|
||||||
params = { tags: options[:tags], type: options[:type] }.compact
|
params = {
|
||||||
|
tags: options[:tags],
|
||||||
|
type: options[:type],
|
||||||
|
dossier_id: options[:dossier_id]
|
||||||
|
}.compact
|
||||||
link_to title, contact_url(params), options
|
link_to title, contact_url(params), options
|
||||||
else
|
else
|
||||||
mail_to CONTACT_EMAIL, title,
|
mail_to CONTACT_EMAIL, title,
|
||||||
|
|
|
@ -9,4 +9,7 @@
|
||||||
\-
|
\-
|
||||||
= link_to 'CGU / Mentions légales', CGU_URL
|
= link_to 'CGU / Mentions légales', CGU_URL
|
||||||
\-
|
\-
|
||||||
|
- if @facade.present? && @facade.respond_to?(:dossier)
|
||||||
|
= contact_link 'Contact', dossier_id: @facade.dossier&.id
|
||||||
|
- else
|
||||||
= contact_link 'Contact'
|
= contact_link 'Contact'
|
||||||
|
|
|
@ -36,4 +36,4 @@
|
||||||
–
|
–
|
||||||
= link_to "Mentions légales", MENTIONS_LEGALES_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"
|
= link_to "Mentions légales", MENTIONS_LEGALES_URL, :class => "footer-link", :target => "_blank", rel: "noopener noreferrer"
|
||||||
–
|
–
|
||||||
= contact_link "Contact technique", class: "footer-link"
|
= contact_link "Contact technique", class: "footer-link", dossier_id: dossier.id
|
||||||
|
|
Loading…
Add table
Reference in a new issue