<div class="container">
  <div class="row">
    <div class="offset-lg-2 col-lg-8">
      <%= render partial: 'leader' %>
      <p>Please enter your email address to begin. We'll send you an email with important information once you have RSVP'd.</p>
      <%= form_with scope: :guest, url: guests_path, local: true do |form| %>
      <div class="row">
        <div class="col-md-12">
          <%= errors_for(@guest) %>
        </div>
      </div>

      <div class="form-group row">
        <div class="col-md-3">
          <%= form.label :email, class: 'col-form-label' %>
        </div>
        <div class="col-md-9">
          <%= form.email_field :email, id: 'guest_email', class: 'form-control', autofocus: true, required: true %>
        </div>
      </div>

      <div class="row guests-buttons">
        <div class="offset-md-3 col-md-6 text-center">
          <%- if ENV['RECAPTCHA_SECRET_KEY'].blank? -%>
          <%= form.submit 'Continue', class: 'btn btn-primary', data: { disable_with: 'Sending...' } %>
          <%- else -%>
          <%= invisible_recaptcha_tags text: 'Continue', class: 'btn btn-primary', data: { disable_with: 'Sending...' } %>
          <%- end -%>
        </div>
      </div>
      <% end %>
    </div>
  </div>
</div>
