<commit_before><% title('Registrierung') %>

<div class="step-personal" data-step="personalData">
  <div class="inner">
    <h5>Schritt 2/4</h5>
    <h2>Willkommen im <span><%= resource.graetzl.short_name %></span></h2>
    <p class="neighbourCount">
      <span><%= resource.graetzl.users.count %></span> Nachbarn warten bereits auf dich.<br>
      Ein paar Dinge müssen wir noch wissen, dann geht's los!
    </p>

    <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {}) do |f| %>
      <%= devise_error_messages! %>
      <div class="form-register">

        <div class="field">
          <%= f.fields_for :address do |address_fields| %>
            <%= address_fields.hidden_field :street_name %>
            <%= address_fields.hidden_field :street_number %>
            <%= address_fields.hidden_field :zip %>
            <%= address_fields.hidden_field :city %>
            <%= address_fields.hidden_field :coordinates %>
          <% end %>
        </div>

        <div class="field">
          <%= f.fields_for :graetzl do |graetzl_fields| %>
            <%= graetzl_fields.hidden_field :name %>
          <% end %>
        </div>

        <div class="username input-group">
        <%= f.text_field :username %>
        <%= f.label :username %>
        </div>

        <div class="input-group">
          <%= f.password_field :password, autocomplete: "off" %>
          <%= f.label :password %>
        </div>

        <div class="input-group">
          <%= f.password_field :password_confirmation, autocomplete: "off" %>
          <%= f.label :password_confirmation %>
        </div>

        <p class="text">... um dich besser kennen zu lernen</p>

        <div class="input-group">
          <%= f.text_field :first_name %>
          <%= f.label :first_name %>
        </div>

        <div class="input-group">
          <%= f.text_field :last_name %>
          <%= f.label :last_name %>
        </div>

        <div class="input-group">
          <%= f.email_field :email %>
          <%= f.label :email %>
        </div>

        <div class="select-group">
          <%= f.select :gender, User::GENDER_TYPES,
            { include_blank: 'Geschlecht' } %>
        </div>

        <div class="birthdate input-group">
          <%= f.text_field :birthday %>
          <%= f.label :birthday, 'Geburtsdatum (TT/MM/JJJJ)' %>
        </div>

        <div class="input-group">
          <%= f.label :newsletter, 'Newsletter abonnieren' %>
          <%= f.check_box(:newsletter )%>
        </div>

        <div class="input-group">
          <%= f.label :terms_and_conditions, "ich stimme den #{link_to 'AGBs', '#'} zu".html_safe %>
          <%= f.check_box(:terms_and_conditions )%>
        </div>

        <div class="wrap">
          <button class="btn-primary" type="button">
            <svg class="icon-camera"><use xlink:href="#icon-camera"></use></svg> Portrait hochladen
            <%= image_tag(resource.avatar_url(:thumb)) if resource.avatar? %>
            <%= f.file_field :avatar %>
            <%= f.hidden_field :avatar_cache %>
          </button>
        </div>

      </div>

      <div class="btn-navBar">
        <%= link_to 'Schritt zurück', 'javascript:history.back();' %>
        <%= f.button "Anmelden", class: 'btn-primary next' %>
      </div>
    <% end %>
  </div>
</div><commit_msg>fix back button for new user registration<commit_after><% title('Registrierung') %>

<div class="step-personal" data-step="personalData">
  <div class="inner">
    <h5>Schritt 2/4</h5>
    <h2>Willkommen im <span><%= resource.graetzl.short_name %></span></h2>
    <p class="neighbourCount">
      <span><%= resource.graetzl.users.count %></span> Nachbarn warten bereits auf dich.<br>
      Ein paar Dinge müssen wir noch wissen, dann geht's los!
    </p>

    <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {}) do |f| %>
      <%= devise_error_messages! %>
      <div class="form-register">

        <div class="field">
          <%= f.fields_for :address do |address_fields| %>
            <%= address_fields.hidden_field :street_name %>
            <%= address_fields.hidden_field :street_number %>
            <%= address_fields.hidden_field :zip %>
            <%= address_fields.hidden_field :city %>
            <%= address_fields.hidden_field :coordinates %>
          <% end %>
        </div>

        <div class="field">
          <%= f.fields_for :graetzl do |graetzl_fields| %>
            <%= graetzl_fields.hidden_field :name %>
          <% end %>
        </div>

        <div class="username input-group">
        <%= f.text_field :username %>
        <%= f.label :username %>
        </div>

        <div class="input-group">
          <%= f.password_field :password, autocomplete: "off" %>
          <%= f.label :password %>
        </div>

        <div class="input-group">
          <%= f.password_field :password_confirmation, autocomplete: "off" %>
          <%= f.label :password_confirmation %>
        </div>

        <p class="text">... um dich besser kennen zu lernen</p>

        <div class="input-group">
          <%= f.text_field :first_name %>
          <%= f.label :first_name %>
        </div>

        <div class="input-group">
          <%= f.text_field :last_name %>
          <%= f.label :last_name %>
        </div>

        <div class="input-group">
          <%= f.email_field :email %>
          <%= f.label :email %>
        </div>

        <div class="select-group">
          <%= f.select :gender, User::GENDER_TYPES,
            { include_blank: 'Geschlecht' } %>
        </div>

        <div class="birthdate input-group">
          <%= f.text_field :birthday %>
          <%= f.label :birthday, 'Geburtsdatum (TT/MM/JJJJ)' %>
        </div>

        <div class="input-group">
          <%= f.label :newsletter, 'Newsletter abonnieren' %>
          <%= f.check_box(:newsletter )%>
        </div>

        <div class="input-group">
          <%= f.label :terms_and_conditions, "ich stimme den #{link_to 'AGBs', '#'} zu".html_safe %>
          <%= f.check_box(:terms_and_conditions )%>
        </div>

        <div class="wrap">
          <button class="btn-primary" type="button">
            <svg class="icon-camera"><use xlink:href="#icon-camera"></use></svg> Portrait hochladen
            <%= image_tag(resource.avatar_url(:thumb)) if resource.avatar? %>
            <%= f.file_field :avatar %>
            <%= f.hidden_field :avatar_cache %>
          </button>
        </div>

      </div>

      <div class="btn-navBar">
        <%= link_to 'Schritt zurück', addresses_registration_path %>
        <%= f.button "Anmelden", class: 'btn-primary next' %>
      </div>
    <% end %>
  </div>
</div>
{'fraction_non_alphanumeric': 0.17272053372868792, 'fraction_numerical': 0.0017790956263899185, 'mean_word_length': 2.149393090569561, 'pattern_counts': {'":': 0, '<': 189, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2224036', 'n_tokens_mistral': 2350, 'n_tokens_neox': 2146, 'n_words': 409}