2021-09-16 21:51:16 +02:00
|
|
|
- content_for(:title, t('.contact'))
|
2020-03-23 17:56:40 +01:00
|
|
|
- content_for :footer do
|
|
|
|
= render partial: "root/footer"
|
2018-08-29 11:44:12 +02:00
|
|
|
|
|
|
|
#contact-form
|
2024-04-11 09:20:44 +02:00
|
|
|
.fr-container
|
|
|
|
%h1
|
2021-09-16 21:51:16 +02:00
|
|
|
= t('.contact')
|
2018-08-29 11:44:12 +02:00
|
|
|
|
2022-12-19 15:11:27 +01:00
|
|
|
= form_tag contact_path, method: :post, multipart: true, class: 'fr-form-group', data: {controller: :support } do
|
2020-06-11 11:37:48 +02:00
|
|
|
|
2023-01-25 18:06:38 +01:00
|
|
|
.description
|
2023-01-25 17:49:13 +01:00
|
|
|
.recommandations
|
2024-04-04 11:33:16 +02:00
|
|
|
= t('.intro_html')
|
2024-04-04 11:34:42 +02:00
|
|
|
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
|
2020-06-11 11:37:48 +02:00
|
|
|
|
2019-09-17 11:01:20 +02:00
|
|
|
- if !user_signed_in?
|
2022-12-19 15:11:27 +01:00
|
|
|
.fr-input-group
|
|
|
|
= label_tag :email, class: 'fr-label' do
|
2018-08-29 11:44:12 +02:00
|
|
|
Email
|
2024-06-25 16:10:22 +02:00
|
|
|
= t('.notice_email')
|
2024-04-04 12:15:31 +02:00
|
|
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
2022-12-19 15:11:27 +01:00
|
|
|
= email_field_tag :email, params[:email], required: true, autocomplete: 'email', class: 'fr-input'
|
2018-08-29 11:44:12 +02:00
|
|
|
|
2022-12-19 15:11:27 +01:00
|
|
|
%fieldset.fr-fieldset{ name: "type" }
|
|
|
|
%legend.fr-fieldset__legend
|
2021-09-16 21:51:16 +02:00
|
|
|
= t('.your_question')
|
2024-04-04 12:15:31 +02:00
|
|
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
2022-12-19 15:11:27 +01:00
|
|
|
.fr-fieldset__content
|
|
|
|
- @options.each do |(question, question_type, link)|
|
|
|
|
.fr-radio-group
|
|
|
|
= radio_button_tag :type, question_type, false, required: true, data: {"support-target": "inputRadio" }
|
|
|
|
= label_tag "type_#{question_type}", { 'aria-controls': link ? "card-#{question_type}" : nil, class: 'fr-label' } do
|
|
|
|
= question
|
2021-12-29 14:00:47 +01:00
|
|
|
|
2022-12-19 15:11:27 +01:00
|
|
|
- if link.present?
|
2023-06-21 12:24:45 +02:00
|
|
|
.fr-ml-3w.hidden{ id: "card-#{question_type}", "aria-hidden": true , data: { "support-target": "content" } }
|
|
|
|
= render Dsfr::CalloutComponent.new(title: t('.our_answer')) do |c|
|
2024-05-13 16:48:59 +02:00
|
|
|
- c.with_html_body do
|
|
|
|
-# i18n-tasks-use t("support.index.#{question_type}.answer_html")
|
|
|
|
= t('answer_html', scope: [:support, :index, question_type], base_url: Current.application_base_url, "link_#{question_type}": link)
|
2022-08-30 12:37:08 +02:00
|
|
|
|
2022-12-19 15:11:27 +01:00
|
|
|
.fr-input-group
|
|
|
|
= label_tag :dossier_id, t('file_number', scope: [:utils]), class: 'fr-label'
|
|
|
|
= text_field_tag :dossier_id, @dossier_id, class: 'fr-input'
|
2020-02-11 15:35:42 +01:00
|
|
|
|
2022-12-19 15:11:27 +01:00
|
|
|
.fr-input-group
|
|
|
|
= label_tag :subject, class: 'fr-label' do
|
2020-08-25 15:01:54 +02:00
|
|
|
= t('subject', scope: [:utils])
|
2024-04-04 12:15:31 +02:00
|
|
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
2022-12-19 15:11:27 +01:00
|
|
|
= text_field_tag :subject, params[:subject], required: true, class: 'fr-input'
|
2018-08-29 11:44:12 +02:00
|
|
|
|
2022-12-19 15:11:27 +01:00
|
|
|
.fr-input-group
|
|
|
|
= label_tag :text, class: 'fr-label' do
|
2020-08-25 15:01:54 +02:00
|
|
|
= t('message', scope: [:utils])
|
2024-04-04 12:15:31 +02:00
|
|
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
2022-12-19 15:11:27 +01:00
|
|
|
= text_area_tag :text, params[:text], rows: 6, required: true, class: 'fr-input'
|
2018-08-29 11:44:12 +02:00
|
|
|
|
2022-12-19 15:11:27 +01:00
|
|
|
.fr-upload-group
|
|
|
|
= label_tag :piece_jointe, class: 'fr-label' do
|
2020-08-25 15:01:54 +02:00
|
|
|
= t('pj', scope: [:utils])
|
2023-04-18 14:04:32 +02:00
|
|
|
%span.fr-hint-text
|
|
|
|
= t('.notice_upload_group')
|
2022-12-19 15:11:27 +01:00
|
|
|
|
2019-11-28 17:49:40 +01:00
|
|
|
%p.notice.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_AMELIORATION } }
|
2021-09-16 21:51:16 +02:00
|
|
|
= t('.notice_pj_product')
|
2019-11-28 17:49:40 +01:00
|
|
|
%p.notice.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_AUTRE } }
|
2021-09-16 21:51:16 +02:00
|
|
|
= t('.notice_pj_other')
|
2024-06-24 16:30:41 +02:00
|
|
|
= file_field_tag :piece_jointe, class: 'fr-upload'
|
2018-08-29 11:44:12 +02:00
|
|
|
|
2018-08-30 13:48:03 +02:00
|
|
|
= hidden_field_tag :tags, @tags&.join(',')
|
2018-08-29 11:44:12 +02:00
|
|
|
|
2022-07-28 12:31:55 +02:00
|
|
|
= invisible_captcha
|
|
|
|
|
2022-12-19 15:11:27 +01:00
|
|
|
.send-wrapper.fr-my-3w
|
|
|
|
= button_tag t('send_mail', scope: [:utils]), type: :submit, class: 'fr-btn send'
|