75 lines
3.2 KiB
Text
75 lines
3.2 KiB
Text
- content_for(:title, t('.contact'))
|
|
- content_for :footer do
|
|
= render partial: "root/footer"
|
|
|
|
#contact-form
|
|
.container
|
|
%h1.new-h1
|
|
= t('.contact')
|
|
|
|
= form_tag contact_path, method: :post, multipart: true, class: 'fr-form-group', data: {controller: :support } do
|
|
|
|
.description
|
|
.recommandations
|
|
= t('.intro_html')
|
|
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
|
|
|
|
- if !user_signed_in?
|
|
.fr-input-group
|
|
= label_tag :email, class: 'fr-label' do
|
|
Email
|
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
|
= email_field_tag :email, params[:email], required: true, autocomplete: 'email', class: 'fr-input'
|
|
|
|
%fieldset.fr-fieldset{ name: "type" }
|
|
%legend.fr-fieldset__legend
|
|
= t('.your_question')
|
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
|
.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
|
|
|
|
- if link.present?
|
|
.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|
|
|
- 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)
|
|
|
|
.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'
|
|
|
|
.fr-input-group
|
|
= label_tag :subject, class: 'fr-label' do
|
|
= t('subject', scope: [:utils])
|
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
|
= text_field_tag :subject, params[:subject], required: true, class: 'fr-input'
|
|
|
|
.fr-input-group
|
|
= label_tag :text, class: 'fr-label' do
|
|
= t('message', scope: [:utils])
|
|
= render EditableChamp::AsteriskMandatoryComponent.new
|
|
= text_area_tag :text, params[:text], rows: 6, required: true, class: 'fr-input'
|
|
|
|
.fr-upload-group
|
|
= label_tag :piece_jointe, class: 'fr-label' do
|
|
= t('pj', scope: [:utils])
|
|
%span.fr-hint-text
|
|
= t('.notice_upload_group')
|
|
|
|
%p.notice.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_AMELIORATION } }
|
|
= t('.notice_pj_product')
|
|
%p.notice.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_AUTRE } }
|
|
= t('.notice_pj_other')
|
|
= file_field_tag :piece_jointe, class: 'fr-upload', max: 200.megabytes
|
|
|
|
= hidden_field_tag :tags, @tags&.join(',')
|
|
|
|
= invisible_captcha
|
|
|
|
.send-wrapper.fr-my-3w
|
|
= button_tag t('send_mail', scope: [:utils]), type: :submit, class: 'fr-btn send'
|