<% add_decidim_page_title(t(".sign_up")) %> <% content_for :devise_links do %> <%= render "decidim/devise/shared/links" %> <% end %>

<%= t(".sign_up") %>

<%= t(".subtitle") %>

<%= t(".already_have_an_account?") %> <%= link_to t(".sign_in"), new_user_session_path %>

<% cache current_organization do %> <%= render "decidim/devise/shared/omniauth_buttons" %> <% end %>
<%= decidim_form_for(@form, namespace: "registration", as: resource_name, url: registration_path(resource_name), html: { class: "register-form new_user", id: "register-form" }) do |f| %> <%= invisible_captcha %>
<%= form_required_explanation %>
<%= f.text_field :name, help_text: t(".username_help") %>
<%= f.text_field :nickname, help_text: t(".nickname_help", organization: current_organization.name), prefix: { value: "@", small: 1, large: 1 } %>
<%= f.email_field :email %>
<%= f.password_field :password, help_text: t(".password_help", minimun_characters: NOBSPW.configuration.min_password_length), autocomplete: "off" %>
<%= f.password_field :password_confirmation %>

<%= t(".tos_title") %>

<%= strip_tags(translated_attribute(terms_and_conditions_page.content)) %>

<%= f.check_box :tos_agreement, label: t(".tos_agreement", link: link_to(t(".terms"), page_path("terms-and-conditions"))) %>

<%= t(".newsletter_title") %>

<%= f.check_box :newsletter, label: t(".newsletter"), checked: @form.newsletter %>
<%= f.submit t("devise.registrations.new.sign_up"), class: "button expanded" %>
<%= yield :devise_links %>
<% end %>
<%= render "decidim/devise/shared/newsletter_modal" %>