<commit_before>= render 'shared/form_error', object: @action_point

= simple_form_for @action_point, html: { class: 'form' } do |f|
  .form-group
    - if defined?(partial_form) && partial_form.present?
      input type="hidden" name="action_point[person_id]" value="#{@person.id}"
    - elsif @action_point.new_record?
      - if params.dig(:action_point, :person_id).blank?
        = f.input :person_id, as: :hidden
        label.control-label
          span.text-danger *
          | Person:&nbsp;
        input.select.form-control value="#{(Person.find_by_id(params.dig(:action_point, :person_id)) || @action_point.person)&.name}" type="text" data-autocomplete="#{autocomplete_person_name_people_path}" data-id-element="#action_point_person_id" data-auto-focus="true"
      - else
        = f.input :person_id, as: :hidden, input_html: { value: params[:action_point][:person_id] }
        label.control-label
          span.text-danger *
          | Person:&nbsp;
        a href="#{person_path(Person.find_by_id(params.dig(:action_point, :person_id)))}" #{(Person.find_by_id(params.dig(:action_point, :person_id))).name}
    - else
      label.control-label Person&nbsp;
      a href="#{person_path(@action_point.person)}" #{@action_point.person.name}

  .form-group
    label.control-label
      | Action description:
      span.text-danger *
    = f.input :value, as: :text, placeholder: 'What should be done', label: false, input_html: { rows: (defined?(partial_form) && partial_form.present?) ? 1 : 3 }

  .form-group
    label.control-label
      | Perform on:
      span.text-danger *
    = f.input :perform_on, as: :string, include_blank: true, placeholder: 'dd-mm-yyyy', label: false, input_html: { value: @action_point.perform_on&.strftime('%d-%m-%Y'), class: 'datepicker' }

  = f.input :is_completed, as: :boolean, label: 'Completed'

  .form-bordered
    .form-group.form-actions
      .text-center
        = f.button :submit, (@action_point.new_record? ? '+ Create Action' : 'Update Action'), class: 'btn btn-success'<commit_msg>change button name<commit_after>= render 'shared/form_error', object: @action_point

= simple_form_for @action_point, html: { class: 'form' } do |f|
  .form-group
    - if defined?(partial_form) && partial_form.present?
      input type="hidden" name="action_point[person_id]" value="#{@person.id}"
    - elsif @action_point.new_record?
      - if params.dig(:action_point, :person_id).blank?
        = f.input :person_id, as: :hidden
        label.control-label
          span.text-danger *
          | Person:&nbsp;
        input.select.form-control value="#{(Person.find_by_id(params.dig(:action_point, :person_id)) || @action_point.person)&.name}" type="text" data-autocomplete="#{autocomplete_person_name_people_path}" data-id-element="#action_point_person_id" data-auto-focus="true"
      - else
        = f.input :person_id, as: :hidden, input_html: { value: params[:action_point][:person_id] }
        label.control-label
          span.text-danger *
          | Person:&nbsp;
        a href="#{person_path(Person.find_by_id(params.dig(:action_point, :person_id)))}" #{(Person.find_by_id(params.dig(:action_point, :person_id))).name}
    - else
      label.control-label Person&nbsp;
      a href="#{person_path(@action_point.person)}" #{@action_point.person.name}

  .form-group
    label.control-label
      | Action description:
      span.text-danger *
    = f.input :value, as: :text, placeholder: 'What should be done', label: false, input_html: { rows: (defined?(partial_form) && partial_form.present?) ? 1 : 3 }

  .form-group
    label.control-label
      | Perform on:
      span.text-danger *
    = f.input :perform_on, as: :string, include_blank: true, placeholder: 'dd-mm-yyyy', label: false, input_html: { value: @action_point.perform_on&.strftime('%d-%m-%Y'), class: 'datepicker' }

  = f.input :is_completed, as: :boolean, label: 'Completed'

  .form-bordered
    .form-group.form-actions
      .text-center
        = f.button :submit, (@action_point.new_record? ? 'Create Action' : 'Update Action'), class: 'btn btn-success'
{'fraction_non_alphanumeric': 0.15848595848595848, 'fraction_numerical': 0.0009768009768009768, 'mean_word_length': 3.6545454545454548, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2117290', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1346, 'n_words': 247}