demarches-normaliennes/app/views/support/index.html.haml

76 lines
2.6 KiB
Text
Raw Normal View History

- 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
.container
%h1.new-h1
= t('.contact')
2018-08-29 11:44:12 +02:00
= form_tag contact_path, method: :post, multipart: true, class: 'form' do |f|
.description
%p= t('.intro_html')
%br
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
- if !user_signed_in?
2018-08-29 11:44:12 +02:00
.contact-champ
= label_tag :email do
Email
%span.mandatory *
= text_field_tag :email, params[:email], required: true, autocomplete: 'email'
2018-08-29 11:44:12 +02:00
.contact-champ
= label_tag :type do
= t('.your_question')
= hidden_field_tag :type, params[:type]
= invisible_captcha
%dl
- @options.each do |(question, question_type, link)|
%dt
- if link.present?
%button.button{ 'aria-expanded': 'false', 'aria-controls': question_type, data: { 'question-type': question_type } }= question
- else
%button.button.button-without-hint{ data: { 'question-type': question_type } }= question
- if link.present?
%dd
.support.card.featured.hidden{ id: question_type }
.card-title
= t('.our_answer')
.card-content
-# i18n-tasks-use t("support.index.#{question_type}.answer_html")
= t('answer_html', scope: [:support, :index, question_type], base_url: APPLICATION_BASE_URL, "link_#{question_type}": link)
2018-08-29 11:44:12 +02:00
.contact-champ
= label_tag :dossier_id, t('file_number', scope: [:utils])
2018-08-29 11:44:12 +02:00
= text_field_tag :dossier_id, @dossier_id
.contact-champ
= label_tag :subject do
= t('subject', scope: [:utils])
2018-08-29 11:44:12 +02:00
%span.mandatory *
2018-08-30 13:47:13 +02:00
= text_field_tag :subject, params[:subject], required: true
2018-08-29 11:44:12 +02:00
.contact-champ
= label_tag :text do
= t('message', scope: [:utils])
2018-08-29 11:44:12 +02:00
%span.mandatory *
2018-08-30 13:47:13 +02:00
= text_area_tag :text, params[:text], rows: 6, required: true
2018-08-29 11:44:12 +02:00
.contact-champ
= label_tag :piece_jointe do
= t('pj', scope: [:utils])
2019-11-28 17:49:40 +01:00
%p.notice.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_AMELIORATION } }
= t('.notice_pj_product')
2019-11-28 17:49:40 +01:00
%p.notice.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_AUTRE } }
= t('.notice_pj_other')
= file_field_tag :piece_jointe
2018-08-29 11:44:12 +02:00
= hidden_field_tag :tags, @tags&.join(',')
2018-08-29 11:44:12 +02:00
.send-wrapper
= button_tag t('send_mail', scope: [:utils]), type: :submit, class: 'button send primary'