<commit_before>.row
  .col-md-12{:style => 'height:200px;overflow-y:auto;'}
    = render :partial => 'funding_requests_table', :locals => {:ali => @activity_line_item, :popup => true}

.row
  .col-md-12
    %fieldset
      %legend Add Funding Request
      = simple_form_for([@project, @activity_line_item, FundingRequest.new],
          :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 :funding_amount_id, :collection => @available_funds, :label => 'Fund', :label_method => 'name', :required => true       
        = f.input :amount, :required => true, :number => true, :range => [1000, 1000000]
        = f.submit "Add Funding Request", :class => 'btn btn-primary'<commit_msg>Add conditional logic to help user determine if they can add funding requests to an ALI<commit_after>.row
  .col-md-12{:style => 'height:200px;overflow-y:auto;'}
    = render :partial => 'funding_requests_table', :locals => {:ali => @activity_line_item, :popup => true}

.row
  .col-md-12
    %fieldset
      %legend Add Funding Request
      - if @activity_line_item.anticipated_cost == 0
        %p
          There are no costs associated with this ALI. Click "#{link_to('Here', edit_cost_capital_project_activity_line_item_path(@project, @activity_line_item))}" to set the expected cost of this ALI.
      - elsif @activity_line_item.difference <= 0
        %p
          This ALI is fully funded. No more funding requests can be added.
      - elsif get_remaining_budget(@project.organization, @activity_line_item.fy_year) < 1
        %p
          The budget for "#{@activity_line_item.fiscal_year}" has been exceeded. No more funding requests can be added for this fiscal year.
      -else      
        = simple_form_for([@project, @activity_line_item, FundingRequest.new],
            :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 :funding_amount_id, :collection => @available_funds, :label => 'Fund', :label_method => 'name', :required => true       
          = f.input :amount, :required => true, :number => true, :range => [1000, 1000000]
          = f.submit "Add Funding Request", :class => 'btn btn-primary'
{'fraction_non_alphanumeric': 0.132452981192477, 'fraction_numerical': 0.015606242496998799, 'mean_word_length': 3.604051565377532, 'pattern_counts': {'":': 0, '<': 5, '<?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': '977507', 'n_tokens_mistral': 807, 'n_tokens_neox': 758, 'n_words': 198}