<commit_before>= editing_mode
= simple_form_for @person, :html => {:multipart => true} do |f|
  %fieldset
    = f.error_notification
    .form-group
      = f.input :given_name, as: :string, label: '<NAME>'
    .form-group
      = f.input :surname, as: :string, required: false

    .form-group
      #memberships
        = f.fields_for :memberships do |membership_f|
          = render partial: 'membership_fields', locals: { membership_f: membership_f }

      = link_to 'Add new role', add_membership_people_path(id: @person.to_param), id: 'add_membership'

    .form-group
      %h2.line-above Contact details
      %label.form-label-bold{ for: :person_location } Location of work
      %p.form-hint= info_text('location_hint')
      = f.input :location, as: :string, label: false
    .form-group
      = f.input :primary_phone_number, as: :string
    .form-group
      = f.input :secondary_phone_number, as: :string, label: 'Any other phone number'
    .form-group
      = f.input :email, as: :string, label: 'Email address'

    .form-group
      %h3.line-above
        %label{ for: :person_description } Notes
      %p.form-hint= info_text('notes_field_hint')
      = f.input :description, label: false, input_html: { class: 'wider' }

    .form-group
      %h3 Working days

    .form-checkbox
      - Person::DAYS_WORKED.each do |day|
        = f.input day, as: :boolean, label: day_name(day)

    .form-group
      %h3.line-above Photograph
      %p.form-hint= info_text('photo_upload_hint')
      = f.input :image, as: :file, label: false

      = image_tag @person.image.medium, class: 'preview'
      %p
        - if @person.image.present?
          = link_to 'Crop image', edit_person_image_path(@person)

    .form-group
      = f.button :submit
      .cancel
        - if @person.new_record?
          = link_to 'Cancel', :back
        - else
          = link_to 'Cancel', @person<commit_msg>Simplify link to Cancel in edit profile page<commit_after>= editing_mode
= simple_form_for @person, :html => {:multipart => true} do |f|
  %fieldset
    = f.error_notification
    .form-group
      = f.input :given_name, as: :string, label: '<NAME>'
    .form-group
      = f.input :surname, as: :string, required: false

    .form-group
      #memberships
        = f.fields_for :memberships do |membership_f|
          = render partial: 'membership_fields', locals: { membership_f: membership_f }

      = link_to 'Add new role', add_membership_people_path(id: @person.to_param), id: 'add_membership'

    .form-group
      %h2.line-above Contact details
      %label.form-label-bold{ for: :person_location } Location of work
      %p.form-hint= info_text('location_hint')
      = f.input :location, as: :string, label: false
    .form-group
      = f.input :primary_phone_number, as: :string
    .form-group
      = f.input :secondary_phone_number, as: :string, label: 'Any other phone number'
    .form-group
      = f.input :email, as: :string, label: 'Email address'

    .form-group
      %h3.line-above
        %label{ for: :person_description } Notes
      %p.form-hint= info_text('notes_field_hint')
      = f.input :description, label: false, input_html: { class: 'wider' }

    .form-group
      %h3 Working days

    .form-checkbox
      - Person::DAYS_WORKED.each do |day|
        = f.input day, as: :boolean, label: day_name(day)

    .form-group
      %h3.line-above Photograph
      %p.form-hint= info_text('photo_upload_hint')
      = f.input :image, as: :file, label: false

      = image_tag @person.image.medium, class: 'preview'
      %p
        - if @person.image.present?
          = link_to 'Crop image', edit_person_image_path(@person)

    .form-group
      = f.button :submit
      .cancel
        = link_to 'Cancel', @person.new_record? ? :back : @person
{'fraction_non_alphanumeric': 0.12978106040622528, 'fraction_numerical': 0.0021102611448166712, 'mean_word_length': 2.656702025072324, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1663510', 'n_tokens_mistral': 1290, 'n_tokens_neox': 1251, 'n_words': 302}