<commit_before>-# Copyright (C) 2007, 2008, 2009, 2010, 2011 The Collaborative Software Foundation
-#
-# This file is part of TriSano.
-#
-# TriSano is free software: you can redistribute it and/or modify it under the terms of the
-# GNU Affero General Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
-#
-# TriSano is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
-# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License along with TriSano.
-# If not, see http://www.gnu.org/licenses/agpl-3.0.txt.

- f.fields_for :place, :builder => ExtendedFormBuilder do |p|
  %table.list
    %tr
      %th.forminformation
        =t "edit_place"
    %tr
      %td
        %span{ :class => "horiz" }
          = p.label(:name)
          = p.text_field(:name, :size => 25, :maxlength => 250)
        %span{ :class => "horiz" }
          = p.exposed_type_selector

- f.fields_for(:canonical_address, :builder => ExtendedFormBuilder) do |ca|

  %table.list
    %tr
      %th.forminformation
        =t "edit_address"
    %tr
      %td

        %span{ :class => "horiz" }
          = ca.label(:street_number)
          = ca.text_field(:street_number, {:size => 10, :maxlength=> 10})

        %span{ :class => "horiz" }
          = ca.label(:street_name)
          = ca.text_field(:street_name, {:size => 50, :maxlength=> 50})

        %span{ :class => "horiz" }
          = ca.label(:unit_number)
          = ca.text_field(:unit_number, {:size => 10, :maxlength=> 10})

        %br{:clear => "all"}

        %span{ :class => "horiz" }
          = ca.label(:city)
          = ca.text_field(:city, {:size => 30, :maxlength=> 255})

        %span{ :class => "horiz" }
          = ca.label(:state_id)
          = ca.dropdown_code_field(:state_id, 'state', {:include_blank => true}, {})

        %span{ :class => "horiz" }
          = ca.label(:county_id)
          = ca.dropdown_code_field(:county_id, 'county', {:include_blank => true}, {})

        %span{ :class => "horiz" }
          = ca.label(:postal_code)
          = ca.text_field(:postal_code, {:size => 7, :maxlength=> 10})

    %tr
      %th.forminformation
        =t "edit_phone"

    %tr
      %td
        - phone = f.object.telephones.last
        - f.fields_for(:telephones, phone, :builder => ExtendedFormBuilder) do |phone_fields|
          -if Telephone.use?(:country_code)
            %span{ :class => "horiz" }
              = phone_fields.label(:country_code)
              = phone_fields.text_field(:country_code, {:size => 3})
          -if Telephone.use?(:area_code)
            %span{ :class => "horiz" }
              = phone_fields.label(:area_code)
              = phone_fields.text_field(:area_code, {:size => 3})
          %span{ :class => "horiz" }
            = phone_fields.label(:phone_number)
            = phone_fields.text_field(:phone_number, {:size => 8})
          %span{ :class => "horiz" }
            = phone_fields.label(:extension)
            = phone_fields.text_field(:extension, {:size => 6})

<commit_msg>[#11191571] Adding the Google maps address link to the places form.<commit_after>-# Copyright (C) 2007, 2008, 2009, 2010, 2011 The Collaborative Software Foundation
-#
-# This file is part of TriSano.
-#
-# TriSano is free software: you can redistribute it and/or modify it under the terms of the
-# GNU Affero General Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
-#
-# TriSano is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
-# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License along with TriSano.
-# If not, see http://www.gnu.org/licenses/agpl-3.0.txt.

- f.fields_for :place, :builder => ExtendedFormBuilder do |p|
  %table.list
    %tr
      %th.forminformation
        =t "edit_place"
    %tr
      %td
        %span{ :class => "horiz" }
          = p.label(:name)
          = p.text_field(:name, :size => 25, :maxlength => 250)
        %span{ :class => "horiz" }
          = p.exposed_type_selector

- f.fields_for(:canonical_address, :builder => ExtendedFormBuilder) do |ca|

  %table.list
    %tr
      %th.forminformation
        =t "edit_address"
    %tr
      %td

        %span{ :class => "horiz" }
          = ca.label(:street_number)
          = ca.text_field(:street_number, {:size => 10, :maxlength=> 10})

        %span{ :class => "horiz" }
          = ca.label(:street_name)
          = ca.text_field(:street_name, {:size => 50, :maxlength=> 50})

        %span{ :class => "horiz" }
          = ca.label(:unit_number)
          = ca.text_field(:unit_number, {:size => 10, :maxlength=> 10})

        %br{:clear => "all"}

        %span{ :class => "horiz" }
          = ca.label(:city)
          = ca.text_field(:city, {:size => 30, :maxlength=> 255})

        %span{ :class => "horiz" }
          = ca.label(:state_id)
          = ca.dropdown_code_field(:state_id, 'state', {:include_blank => true}, {})

        %span{ :class => "horiz" }
          = ca.label(:county_id)
          = ca.dropdown_code_field(:county_id, 'county', {:include_blank => true}, {})

        %span{ :class => "horiz" }
          = ca.label(:postal_code)
          = ca.text_field(:postal_code, {:size => 7, :maxlength=> 10})

        =render_extensions :address_extension_renderers, :address_form => ca

    %tr
      %th.forminformation
        =t "edit_phone"

    %tr
      %td
        - phone = f.object.telephones.last
        - f.fields_for(:telephones, phone, :builder => ExtendedFormBuilder) do |phone_fields|
          -if Telephone.use?(:country_code)
            %span{ :class => "horiz" }
              = phone_fields.label(:country_code)
              = phone_fields.text_field(:country_code, {:size => 3})
          -if Telephone.use?(:area_code)
            %span{ :class => "horiz" }
              = phone_fields.label(:area_code)
              = phone_fields.text_field(:area_code, {:size => 3})
          %span{ :class => "horiz" }
            = phone_fields.label(:phone_number)
            = phone_fields.text_field(:phone_number, {:size => 8})
          %span{ :class => "horiz" }
            = phone_fields.label(:extension)
            = phone_fields.text_field(:extension, {:size => 6})


{'fraction_non_alphanumeric': 0.14478013760095723, 'fraction_numerical': 0.016751420879449596, 'mean_word_length': 2.4292307692307693, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 74, 'https://': 0, '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': '1997267', 'n_tokens_mistral': 2259, 'n_tokens_neox': 2088, 'n_words': 542}