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

48 lines
1.4 KiB
Text
Raw Normal View History

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