<% provide :title, t("devise_views.organizations.registrations.new.title") %>
<h2><%= t("devise_views.organizations.registrations.new.title") %></h2>

<%= form_for(resource, as: :user, url: organization_registration_path) do |f| %>
  <%= render "shared/errors", resource: resource %>
  <div class="row">
    <div class="small-12 column">

      <%= f.fields_for :organization do |fo| %>
        <%= fo.text_field :name, autofocus: true, maxlength: Organization.name_max_length %>
        <%= fo.text_field :responsible_name,
                          maxlength: Organization.responsible_name_max_length,
                          hint: t("devise_views.organizations.registrations.new.responsible_name_note") %>
      <% end %>

      <%= f.email_field :email %>

      <%= f.phone_field :phone_number %>

      <%= f.invisible_captcha :address %>

      <%= f.password_field :password, autocomplete: "off" %>

      <%= f.password_field :password_confirmation, autocomplete: "off",
                                                   label: t("devise_views.organizations.registrations.new.password_confirmation_label") %>

      <%= f.check_box :terms_of_service,
                      label: t("devise_views.users.registrations.new.terms",
                               terms: new_window_link_to(t("devise_views.users.registrations.new.terms_link"),
                                                         "/conditions")) %>

      <div class="small-12 medium-6 small-centered">
        <%= f.submit t("devise_views.organizations.registrations.new.submit"), class: "button expanded" %>
      </div>
    </div>
  </div>
<% end %>

<%= render "devise/shared/links" %>
