<commit_before>module ActionView
  module Helpers
    module NegativeCaptchaHelpers
      def negative_captcha(captcha)
        [
          hidden_field_tag('timestamp', captcha.timestamp),
          hidden_field_tag('spinner', captcha.spinner),
        ].join.html_safe
      end

      def negative_text_field_tag(negative_captcha, field, options={})
        text_field_tag(
          negative_captcha.fields[field],
          negative_captcha.values[field],
          options
        ) +
          content_tag('div', :style => negative_captcha.css) do
          text_field_tag(field, '', :tabindex => '999', :autocomplete => 'off')
        end.html_safe
      end

      def negative_email_field_tag(negative_captcha, field, options={})
        email_field_tag(
          negative_captcha.fields[field],
          negative_captcha.values[field],
          options
        ) +
          content_tag('div', :style => 'position: absolute; left: -2000px;') do
          email_field_tag(field, '', :tabindex => '999', :autocomplete => 'off')
        end.html_safe
      end

      def negative_text_area_tag(negative_captcha, field, options={})
        text_area_tag(
          negative_captcha.fields[field],
          negative_captcha.values[field],
          options
        ) +
          content_tag('div', :style => negative_captcha.css) do
          text_area_tag(field, '', :tabindex => '999', :autocomplete => 'off')
        end.html_safe
      end

      def negative_hidden_field_tag(negative_captcha, field, options={})
        hidden_field_tag(
          negative_captcha.fields[field],
          negative_captcha.values[field],
          options
        ) +
        content_tag('div', :style => negative_captcha.css) do
          hidden_field_tag(field, '', :tabindex => '999')
        end.html_safe
      end

      def negative_file_field_tag(negative_captcha, field, options={})
        file_field_tag(
          negative_captcha.fields[field],
          options.merge(:value => negative_captcha.values[field])
        ) +
        content_tag('div', :style => negative_captcha.css) do
          file_field_tag(field, :tabindex => '999')
        end
      end

      def negative_check_box_tag(negative_captcha, field, options={})
        check_box_tag(
          negative_captcha.fields[field],
          '1',
          negative_captcha.values[field].present?,
          options
        ) +
        content_tag('div', :style => negative_captcha.css) do
          check_box_tag(field, '1', :tabindex => '999')
        end
      end

      def negative_password_field_tag(negative_captcha, field, options={})<commit_msg>Pass correct params to hidden check_box_tag<commit_after>module ActionView
  module Helpers
    module NegativeCaptchaHelpers
      def negative_captcha(captcha)
        [
          hidden_field_tag('timestamp', captcha.timestamp),
          hidden_field_tag('spinner', captcha.spinner),
        ].join.html_safe
      end

      def negative_text_field_tag(negative_captcha, field, options={})
        text_field_tag(
          negative_captcha.fields[field],
          negative_captcha.values[field],
          options
        ) +
          content_tag('div', :style => negative_captcha.css) do
          text_field_tag(field, '', :tabindex => '999', :autocomplete => 'off')
        end.html_safe
      end

      def negative_email_field_tag(negative_captcha, field, options={})
        email_field_tag(
          negative_captcha.fields[field],
          negative_captcha.values[field],
          options
        ) +
          content_tag('div', :style => 'position: absolute; left: -2000px;') do
          email_field_tag(field, '', :tabindex => '999', :autocomplete => 'off')
        end.html_safe
      end

      def negative_text_area_tag(negative_captcha, field, options={})
        text_area_tag(
          negative_captcha.fields[field],
          negative_captcha.values[field],
          options
        ) +
          content_tag('div', :style => negative_captcha.css) do
          text_area_tag(field, '', :tabindex => '999', :autocomplete => 'off')
        end.html_safe
      end

      def negative_hidden_field_tag(negative_captcha, field, options={})
        hidden_field_tag(
          negative_captcha.fields[field],
          negative_captcha.values[field],
          options
        ) +
        content_tag('div', :style => negative_captcha.css) do
          hidden_field_tag(field, '', :tabindex => '999')
        end.html_safe
      end

      def negative_file_field_tag(negative_captcha, field, options={})
        file_field_tag(
          negative_captcha.fields[field],
          options.merge(:value => negative_captcha.values[field])
        ) +
        content_tag('div', :style => negative_captcha.css) do
          file_field_tag(field, :tabindex => '999')
        end
      end

      def negative_check_box_tag(negative_captcha, field, options={})
        check_box_tag(
          negative_captcha.fields[field],
          '1',
          negative_captcha.values[field].present?,
          options
        ) +
        content_tag('div', :style => negative_captcha.css) do
          check_box_tag(field, '1', false, :tabindex => '999')
        end
      end

      def negative_password_field_tag(negative_captcha, field, options={})
{'fraction_non_alphanumeric': 0.1107338238068289, 'fraction_numerical': 0.009054895302773062, 'mean_word_length': 2.4361633182112765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, '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': '2747362', 'n_tokens_mistral': 1636, 'n_tokens_neox': 1533, 'n_words': 267}