demarches-normaliennes/app/views/support/admin.html.haml
2024-06-17 11:59:02 +02:00

49 lines
1.4 KiB
Text

- content_for(:title, 'Contact')
#contact-form
.container
%h1
= t('.contact_team')
.description
= t('.admin_intro_html', contact_path: contact_path)
%br
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
= form_tag contact_path, method: :post, class: 'form' do |f|
- if !user_signed_in?
.contact-champ
= label_tag :email do
= t('.pro_mail')
%span.mandatory *
= text_field_tag :email, params[:email], required: true
.contact-champ
= label_tag :type do
= t('.your_question')
%span.mandatory *
= select_tag :type, options_for_select(@options, params[:type])
.contact-champ
= label_tag :phone do
= t('.pro_phone_number')
= text_field_tag :phone
.contact-champ
= label_tag :subject do
= t('subject', scope: [:utils])
= text_field_tag :subject, params[:subject], required: false
.contact-champ
= label_tag :text do
= t('message', scope: [:utils])
%span.mandatory *
= text_area_tag :text, params[:text], rows: 6, required: true
= invisible_captcha
= hidden_field_tag :tags, @tags&.join(',')
= hidden_field_tag :admin, true
.send-wrapper
= button_tag t('send_mail', scope: [:utils]), type: :submit, class: 'button send primary'