<commit_before><%= stylesheet_link_tag 'styles.css' -%>
<%= javascript_include_tag 'strain.js', 'biosample.js', 'sharing.js', 'resource.js' -%>
<script type="text/javascript">
    initialiseFold('add_projects_form');
    initialiseFold('sharing_form');
    updateFancyMultiselect('strain_project_ids');
</script>

<%= f.error_messages -%>

<div  id="strain_form">
  <div class="yui-g">
    <center>
      <div class="yui-u first" style="width: 42%; margin-left: 2em; margin-top: 1em; margin-bottom: 1em;">
        <p style="margin-bottom: 0.5em">
          <%= label_tag 'Name:', nil,  :style => 'float:left' %><span class="required">*</span>
          <%= f.text_field :title, :style => 'float:right' %>
        </p>

        <p style="margin-bottom: 1.5em">
          <%= label_tag "Provider's strain ID:", nil, :style => 'float:left' %>
          <%= f.text_field :provider_id, :style => 'float:right' %>
        </p>

        <p style="margin-bottom: 1.5em">
          <%= label_tag "Provider Name:", nil, :style => 'float:left' %>
          <%= f.text_field :provider_name, :style => 'float:right' %>
        </p>

      </div>
    </center>

    <center>
      <div class="yui-u" style="width: 42%;margin-right: 2em; margin-top: 1em; margin-bottom: 1em;">

        <p style="margin-bottom: 1.5em">
          <%= label_tag "Synonym:", nil,  :style => 'float:left' %>
          <%= f.text_field :synonym, :style => 'float:right' %>
        </p>

        <p style="margin-bottom: 1.5em">
          <%= label_tag "Comment:", nil, :style => 'float:left' %>
          <%= f.text_area :comment, :style => 'float:right', :cols => 33, :rows => 3 %>
        </p>

      </div>
    </center>
  </div>

  <div class="yui-g">
    <%= render :partial => "biosamples/genotype_form", :locals => {:item => @strain, :f => f, :action => action} %>
    <%= render :partial => "biosamples/phenotype_form", :locals => {:item => @strain, :f => f, :action => action} %>
  </div>
  <br/>

  <p>
    <%= f.label "Organism:" -%><span class="required">*</span>
    <%= f.select :organism_id,
                 options_for_select([["Not specified", ""]] + Organism.all(:order => :title).collect { |o| [o.title, o.id] }, @strain.organism.try(:id) || current_user.try(:person).try(:projects).try(:first).try(:organism_ids).try(:first)), {},
                 :onchange => "show_ajax_loader('strains_of_selected_organism');strains_of_selected_organism(this.value,'strain_parent_id', 'strain[parent_id]');"
    -%>
  </p>

  <p>
            <% strains = @strain.organism.nil? ? [] : @strain.organism.strains.without_default.select(&:can_view?) -%>
    <%= label_tag "Based on:", nil, :style => 'float:left' %>

  <div id='strains_of_selected_organism'>
    <%= f.collection_select :parent_id,
                            strains, :id, :info, :include_blank => "Not specified" -%><commit_msg>genotype_form and phenotype_form are moved to strains folder<commit_after><%= stylesheet_link_tag 'styles.css' -%>
<%= javascript_include_tag 'strain.js', 'biosample.js', 'sharing.js', 'resource.js' -%>
<script type="text/javascript">
    initialiseFold('add_projects_form');
    initialiseFold('sharing_form');
    updateFancyMultiselect('strain_project_ids');
</script>

<%= f.error_messages -%>

<div  id="strain_form">
  <div class="yui-g">
    <center>
      <div class="yui-u first" style="width: 42%; margin-left: 2em; margin-top: 1em; margin-bottom: 1em;">
        <p style="margin-bottom: 0.5em">
          <%= label_tag 'Name:', nil,  :style => 'float:left' %><span class="required">*</span>
          <%= f.text_field :title, :style => 'float:right' %>
        </p>

        <p style="margin-bottom: 1.5em">
          <%= label_tag "Provider's strain ID:", nil, :style => 'float:left' %>
          <%= f.text_field :provider_id, :style => 'float:right' %>
        </p>

        <p style="margin-bottom: 1.5em">
          <%= label_tag "Provider Name:", nil, :style => 'float:left' %>
          <%= f.text_field :provider_name, :style => 'float:right' %>
        </p>

      </div>
    </center>

    <center>
      <div class="yui-u" style="width: 42%;margin-right: 2em; margin-top: 1em; margin-bottom: 1em;">

        <p style="margin-bottom: 1.5em">
          <%= label_tag "Synonym:", nil,  :style => 'float:left' %>
          <%= f.text_field :synonym, :style => 'float:right' %>
        </p>

        <p style="margin-bottom: 1.5em">
          <%= label_tag "Comment:", nil, :style => 'float:left' %>
          <%= f.text_area :comment, :style => 'float:right', :cols => 33, :rows => 3 %>
        </p>

      </div>
    </center>
  </div>

  <div class="yui-g">
    <%= render :partial => "genotype_form", :locals => {:item => @strain, :f => f, :action => action} %>
    <%= render :partial => "phenotype_form", :locals => {:item => @strain, :f => f, :action => action} %>
  </div>
  <br/>

  <p>
    <%= f.label "Organism:" -%><span class="required">*</span>
    <%= f.select :organism_id,
                 options_for_select([["Not specified", ""]] + Organism.all(:order => :title).collect { |o| [o.title, o.id] }, @strain.organism.try(:id) || current_user.try(:person).try(:projects).try(:first).try(:organism_ids).try(:first)), {},
                 :onchange => "show_ajax_loader('strains_of_selected_organism');strains_of_selected_organism(this.value,'strain_parent_id', 'strain[parent_id]');"
    -%>
  </p>

  <p>
            <% strains = @strain.organism.nil? ? [] : @strain.organism.strains.without_default.select(&:can_view?) -%>
    <%= label_tag "Based on:", nil, :style => 'float:left' %>

  <div id='strains_of_selected_organism'>
    <%= f.collection_select :parent_id,
                            strains, :id, :info, :include_blank => "Not specified" -%>
{'fraction_non_alphanumeric': 0.21255870586188902, 'fraction_numerical': 0.008001391546355888, 'mean_word_length': 3.078014184397163, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 163, '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': '6252481', 'n_tokens_mistral': 2168, 'n_tokens_neox': 1995, 'n_words': 375}