<%= simple_form_for @supporter, remote: true, html: {id: 'sign-form', class: 'overlay-container'} do |f| %>
  <% if @success %>
    <div class="overlay-content success">
      <p>Благодарим Ви!</p>
      <p>Изпратихме Ви имейл, в който има инструкции как да потвърдите подкрепата си.</p>
      <p><small><a href="close" data-close=".overlay-content">Скриване на това съобщение.</a></small></p>
    </div>
  <% end %>

  <div class="overlay-content loading" style="display: none;"></div>

  <%= f.hidden_field :area %>
  <%= f.input :full_name, placeholder: 'Весела Радостинова' %>
  <%= f.input :email, placeholder: 'vesela@radostinova.com' %>
  <%= f.input :is_organization %>
  <%= f.input :organization, placeholder: 'Вашата организация' %>
  <%= f.button :submit, 'Подкрепи', class: 'button standart green' %>
<% end %>

<%= simple_form_for @supporter,
                    remote: true,
                    authenticity_token: true,
                    html: {id: 'sign-form', class: 'overlay-container'} do |f| %>
  <% if @success %>
    <div class="overlay-content success">
      <p>Благодарим Ви!</p>
      <p>Изпратихме Ви имейл, в който има инструкции как да потвърдите подкрепата си.</p>
      <p><small><a href="close" data-close=".overlay-content">Скриване на това съобщение.</a></small></p>
    </div>
  <% end %>

  <div class="overlay-content loading" style="display: none;"></div>

  <%= f.hidden_field :area %>
  <%= f.input :full_name, placeholder: 'Весела Радостинова' %>
  <%= f.input :email, placeholder: 'vesela@radostinova.com' %>
  <%= f.input :is_organization %>
  <%= f.input :organization, placeholder: 'Вашата организация' %>
  <%= f.button :submit, 'Подкрепи', class: 'button standart green' %>
<% end %>

Fix invalid authenticity token errors
Fix invalid authenticity token errors

The fix is to force the authenticity_token param to be present in the
form, even though the form is an AJAX one.

These errors would occur when a user visits the site without JavaScript.
The reason for that is the support form's `remote: true` flag was
preventing an authenticity_token to be included in the form fields
because AJAX forms are whitelisted by default. However, when JS is
turned off, the form would not work. Having this param present in the
form does not prevent it from working when JS is enabled.
