<div class="card card-primary card-outline">
  <div class="card-header">
    <h3 class="card-title"><strong>Formularz bezpłatnej konsultacji</strong></h3>
  </div>
  <%= form_with(model: consultation_email, url: '/home/order_meeting_save', method: :post, remote: true, id: 'consultation_email_form') do |form| %>
  <div class="card-body">
    <div id="email_mess_div">
      <%= render '/shared/errors_list', error_object: consultation_email %>
    </div>
    <div class="form-group">
      <h5><%= I18n.t('consultation_email.form_line1') %> <strong><%= @dotation.formal_name %></strong></h5>
      <p><%= I18n.t('consultation_email.form_line2') %></p>
    </div>
    <%= hidden_field_tag 'd', params[:d] %>
    <div class="form-group">
      <%= form.label :phone_number %>
      <%= form.text_field :phone_number, class: 'form-control', placeholder: 'Podaj numer telefonu' %>
    </div>
    <div class="form-group">
       <%= form.label :email %>
       <%= form.email_field :email, class: 'form-control', placeholder: 'Wprowadź email' %>
    </div>
    <div class="form-group">
      <%= form.label :project_value %><br />
      <% ConsultationEmail::PROJECT_VALUES.each do |pv| %>
        <%= radio_button_tag 'consultation_email[project_value]', pv[0] %>
        <%= label 'consultation_email[project_value]', pv[1] %>
       <% end %>
    </div>
    <div class="form-group">
      <div class="alert alert-info">
        <h5><i class="icon fas fa-info"></i> Ważne</h5>
          <%= I18n.t('consultation_email.form_politics') %>
      </div>
    </div>
  </div>
  <div class="card-footer">
    <button type="submit" class="btn btn-primary">Zamów spotkanie</button>
  </div>
  <% end %>
</div>
