<commit_before>:ruby
  if @rule.new_record?
    url = add_policy_rule_policy_path(@policy)
  else
    url = update_policy_rule_policy_path(@policy)
  end

= simple_form_for(@rule,
  :url => url,
  :remote => true,
  :html => {:class => 'form-vertical', :autocomplete => 'off', :id => 'edit-form'},
  :wrapper => :vertical_form,
  :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes,
  :radio_buttons => :vertical_radio_and_checkboxes,
  :file => :vertical_file_input,
  :boolean => :vertical_boolean}) do |f|

  = f.input :id, :as => :hidden

  - if @rule.new_record? and !@copy
    .row
      .col-xs-12
        = f.association :asset_type, :collection => @valid_types, :prompt => 'New Type', :required => false

    #new_type.row
      .col-sm-6
        .form-group
          %label.control-label New Asset Type Name
          = text_field_tag :new_asset_type_name, '', {class: 'form-control'}
      .col-sm-6
        .form-group
          %label.control-label New Asset Subtype Descriptien
          = text_field_tag :new_asset_type_description, '', {class: 'form-control'}


  .row
    .col-xs-4
      - field_custom = SystemConfigFieldCustomization.find_by(is_locked: true, table_name: 'policy_asset_types_rules', field_name: 'service_life_calculation_type_id', active: true)
      = f.association :service_life_calculation_type, :include_blank => false, :disabled => (field_custom.present? && eval(field_custom.code_frag))

    .col-xs-4
      = f.association :replacement_cost_calculation_type, :include_blank => false<commit_msg>TPLAT-1324 typo<commit_after>:ruby
  if @rule.new_record?
    url = add_policy_rule_policy_path(@policy)
  else
    url = update_policy_rule_policy_path(@policy)
  end

= simple_form_for(@rule,
  :url => url,
  :remote => true,
  :html => {:class => 'form-vertical', :autocomplete => 'off', :id => 'edit-form'},
  :wrapper => :vertical_form,
  :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes,
  :radio_buttons => :vertical_radio_and_checkboxes,
  :file => :vertical_file_input,
  :boolean => :vertical_boolean}) do |f|

  = f.input :id, :as => :hidden

  - if @rule.new_record? and !@copy
    .row
      .col-xs-12
        = f.association :asset_type, :collection => @valid_types, :prompt => 'New Type', :required => false

    #new_type.row
      .col-sm-6
        .form-group
          %label.control-label New Asset Type Name
          = text_field_tag :new_asset_type_name, '', {class: 'form-control'}
      .col-sm-6
        .form-group
          %label.control-label New Asset Subtype Descriptien
          = text_field_tag :new_asset_type_description, '', {class: 'form-control'}


  .row
    .col-xs-4
      - field_custom = SystemConfigFieldCustomization.find_by(is_locked: true, table_name: 'policy_asset_type_rules', field_name: 'service_life_calculation_type_id', active: true)
      = f.association :service_life_calculation_type, :include_blank => false, :disabled => (field_custom.present? && eval(field_custom.code_frag))

    .col-xs-4
      = f.association :replacement_cost_calculation_type, :include_blank => false
{'fraction_non_alphanumeric': 0.13669990350595046, 'fraction_numerical': 0.005146349308459312, 'mean_word_length': 3.6626686656671663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 41, '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': '2361934', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1043, 'n_words': 198}