<commit_before>- resource ||= current_user
- content_for(:extrajs) do
  %script{ src: "https://www.google.com/recaptcha/api.js?hl=#{I18n.locale}" }
  = javascript_include_tag "moment/min/moment-with-locales.min"
  = javascript_include_tag "moment-timezone/builds/moment-timezone-with-data-2010-2020.min"
= form_for resource, url: users_path, html: { class: "sign-up" } do |f|
  %h1=t :join_the_largest_group_of_naturalists_in_the_world
  .form-group.text-field.email
    = f.text_field :email, autocorrect: "off", autocapitalize: "off", required: true, placeholder: t( :email ), type: "email", class: "form-control"
    - unless resource.errors[:email].blank?
      .error= formatted_error_sentence_for( resource, :email )
  .form-group.text-field.username
    = f.text_field :login, autocorrect: "off", autocapitalize: "off", required: true, placeholder: t( :username ), class: "form-control"
    - unless resource.errors[:login].blank?
      .error= formatted_error_sentence_for( resource, :login )
  .form-group.text-field.password
    = f.password_field :password, class: "text form-control", required: true, placeholder: t(:password)
    - unless resource.errors[:password].blank?
      .error= formatted_error_sentence_for( resource, :password )
  .form-group.text-field.password-confirmation
    = f.password_field :password_confirmation, class: "text form-control", required: true, placeholder: t(:password_confirmation)
    - unless resource.errors[:password_confirmation].blank?
      .error= formatted_error_sentence_for( resource, :password_confirmation )
  - if @site.using_recaptcha?
    .form-group.recaptcha
      .g-recaptcha{ data: { sitekey: @site.google_recaptcha_key, callback: "recaptchaCallback" }, style: "text-align: center" }
      - if resource.errors && !resource.errors[:recaptcha].blank?
        .error= resource.errors[:recaptcha].to_sentence
  #licensing.form-group.checkbox
    %label
      %input#license-all{ type: "checkbox", checked: true }
      #license-fields.hidden
        = f.check_box :preferred_observation_license, { checked: true }, Observation::CC_BY_NC
        = f.check_box :preferred_photo_license, { checked: true }, Observation::CC_BY_NC
        = f.check_box :preferred_sound_license, { checked: true }, Observation::CC_BY_NC
      %span
        =t :yes_license_my_observations_so_scientists_can_use
        %a{ href: "#", data: { toggle: "popover", content: t(:check_this_box_if_html), placement: "top" }, title: t(:about_licenses) }
          =t :learn_more
  .form-group.hidden
    = f.select :time_zone, ActiveSupport::TimeZone.all.sort.map{|tz| [tz.to_s, tz.name, { "data-tz-name": tz.tzinfo.name } ]}, { }, { class: "time_zone_select" }
  .form-group.centered
    = f.submit t(:create_an_account), class: "btn btn-inat btn-primary btn-lg", disabled: @site.using_recaptcha?
  .form-group.centered
    = link_to t(:already_have_an_account_log_in_html), login_path, class: "btn btn-link"
  .form-group.centered.bigtext
    =t :or_all_caps
  .form-group.centered.provider-authorizations
    - %w{facebook google_oauth2}.each do |provider_name|
      - provider, url = ProviderAuthorization::AUTH_URLS.detect{|p,u| p == provider_name }
      - provider_label = ProviderAuthorization::PROVIDER_NAMES[provider].downcase
      - btn_label = t("sign_up_with_provider", provider: ProviderAuthorization::PROVIDER_NAMES[provider] )<commit_msg>Optional assignment operators doesn't work quite like I expected it to for method calls.<commit_after>- u = resource || current_user
- content_for(:extrajs) do
  %script{ src: "https://www.google.com/recaptcha/api.js?hl=#{I18n.locale}" }
  = javascript_include_tag "moment/min/moment-with-locales.min"
  = javascript_include_tag "moment-timezone/builds/moment-timezone-with-data-2010-2020.min"
= form_for resource, url: users_path, html: { class: "sign-up" } do |f|
  %h1=t :join_the_largest_group_of_naturalists_in_the_world
  .form-group.text-field.email
    = f.text_field :email, autocorrect: "off", autocapitalize: "off", required: true, placeholder: t( :email ), type: "email", class: "form-control"
    - unless u.errors[:email].blank?
      .error= formatted_error_sentence_for( resource, :email )
  .form-group.text-field.username
    = f.text_field :login, autocorrect: "off", autocapitalize: "off", required: true, placeholder: t( :username ), class: "form-control"
    - unless u.errors[:login].blank?
      .error= formatted_error_sentence_for( resource, :login )
  .form-group.text-field.password
    = f.password_field :password, class: "text form-control", required: true, placeholder: t(:password)
    - unless u.errors[:password].blank?
      .error= formatted_error_sentence_for( resource, :password )
  .form-group.text-field.password-confirmation
    = f.password_field :password_confirmation, class: "text form-control", required: true, placeholder: t(:password_confirmation)
    - unless u.errors[:password_confirmation].blank?
      .error= formatted_error_sentence_for( resource, :password_confirmation )
  - if @site.using_recaptcha?
    .form-group.recaptcha
      .g-recaptcha{ data: { sitekey: @site.google_recaptcha_key, callback: "recaptchaCallback" }, style: "text-align: center" }
      - if u.errors && !u.errors[:recaptcha].blank?
        .error= u.errors[:recaptcha].to_sentence
  #licensing.form-group.checkbox
    %label
      %input#license-all{ type: "checkbox", checked: true }
      #license-fields.hidden
        = f.check_box :preferred_observation_license, { checked: true }, Observation::CC_BY_NC
        = f.check_box :preferred_photo_license, { checked: true }, Observation::CC_BY_NC
        = f.check_box :preferred_sound_license, { checked: true }, Observation::CC_BY_NC
      %span
        =t :yes_license_my_observations_so_scientists_can_use
        %a{ href: "#", data: { toggle: "popover", content: t(:check_this_box_if_html), placement: "top" }, title: t(:about_licenses) }
          =t :learn_more
  .form-group.hidden
    = f.select :time_zone, ActiveSupport::TimeZone.all.sort.map{|tz| [tz.to_s, tz.name, { "data-tz-name": tz.tzinfo.name } ]}, { }, { class: "time_zone_select" }
  .form-group.centered
    = f.submit t(:create_an_account), class: "btn btn-inat btn-primary btn-lg", disabled: @site.using_recaptcha?
  .form-group.centered
    = link_to t(:already_have_an_account_log_in_html), login_path, class: "btn btn-link"
  .form-group.centered.bigtext
    =t :or_all_caps
  .form-group.centered.provider-authorizations
    - %w{facebook google_oauth2}.each do |provider_name|
      - provider, url = ProviderAuthorization::AUTH_URLS.detect{|p,u| p == provider_name }
      - provider_label = ProviderAuthorization::PROVIDER_NAMES[provider].downcase
      - btn_label = t("sign_up_with_provider", provider: ProviderAuthorization::PROVIDER_NAMES[provider] )
{'fraction_non_alphanumeric': 0.13801203934811335, 'fraction_numerical': 0.0035237116429305535, 'mean_word_length': 4.453963170536429, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3214670', 'n_tokens_mistral': 2319, 'n_tokens_neox': 2243, 'n_words': 412}