<commit_before>#reporter
  - fields_for @event, :builder => ImmutableFormBuilder do |f|
    - f.fields_for(:reporter) do |r|
      = r.hidden_field(:secondary_entity_id)
      - r.fields_for(:person_entity) do |pe|
        - pe.fields_for(:person) do |p|
          = error_messages_for :object => p.object
          - core_element :last_name, p, :horiz do
            = p.label(:last_name, t('reporter_last_name'))
            = p.core_text_field(:last_name, {:size => 25, :maxlength => 25, :class => 'required_if_others'}, @event)
          - core_element :first_name, p, :horiz do
            = p.label(:first_name, t('reporter_first_name'))
            = p.core_text_field(:first_name, {:size => 25, :maxlength => 25}, @event)

        - phone = pe.object.telephones.last # Works around issue where 1.0 code was duping reporter phone with each save.
        - pe.fields_for(:telephones, phone) do |phone_fields|
          -if Telephone.use?(:country_code)
            - core_element :country_code, phone_fields, :horiz do
              = phone_fields.label(:country_code)
              = phone_fields.core_text_field(:country_code, {:size => 3}, @event)
          -if Telephone.use?(:area_code)
            - core_element :area_code, phone_fields, :horiz do
              = phone_fields.label(:area_code)
              = phone_fields.core_text_field(:area_code, {:size => 3}, @event)
          - core_element :phone_number, phone_fields, :horiz do
            = phone_fields.label(:phone_number)
            = phone_fields.core_text_field(:phone_number, {:size => 8}, @event)
          - core_element :extension, phone_fields, :horiz do
            = phone_fields.label(:extension)
            = phone_fields.core_text_field(:extension, {:size => 6}, @event)

      %span.horiz
        = r.label :_delete
        = r.check_box :_destroy<commit_msg>[25022753] A user can search for Reporters for a Morbidity or Contact Events rather than a drop-down<commit_after>#reporter
  - fields_for @event, :builder => ImmutableFormBuilder do |f|
    - f.fields_for(:reporter) do |r|
      = r.hidden_field(:secondary_entity_id)
      - r.fields_for(:person_entity) do |pe|
        - pe.fields_for(:person) do |p|
          = error_messages_for :object => p.object
          - core_element :last_name, p, :horiz do
            = p.label(:last_name, t('reporter_last_name'))
            = h(p.object.last_name)
          - core_element :first_name, p, :horiz do
            = p.label(:first_name, t('reporter_first_name'))
            = h(p.object.first_name)

        - phone = pe.object.telephones.last # Works around issue where 1.0 code was duping reporter phone with each save.
        - pe.fields_for(:telephones, phone) do |phone_fields|
          -if Telephone.use?(:country_code)
            - core_element :country_code, phone_fields, :horiz do
              = phone_fields.label(:country_code)
              = h(phone_fields.object.country_code)
          -if Telephone.use?(:area_code)
            - core_element :area_code, phone_fields, :horiz do
              = phone_fields.label(:area_code)
              = h(phone_fields.object.area_code)
          - core_element :phone_number, phone_fields, :horiz do
            = phone_fields.label(:phone_number)
            = h(phone_fields.object.phone_number)
          - core_element :extension, phone_fields, :horiz do
            = phone_fields.label(:extension)
            = h(phone_fields.object.extension)

      %span.horiz
        = r.label :_delete
        = r.check_box :_destroy
{'fraction_non_alphanumeric': 0.11952528962983894, 'fraction_numerical': 0.006781576716586606, 'mean_word_length': 2.5014836795252227, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '2492477', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1097, 'n_words': 223}