<commit_before><%= javascript_include_tag 'calendar_date_select/calendar_date_select' %>
<%= stylesheet_link_tag 'calendar_date_select/default' %>
<%= javascript_include_tag "sharing.js" -%>
<%= javascript_include_tag "resource.js"%>
<%= javascript_include_tag "biosample.js"%>

<%= f.error_messages %>

<% if @sample.new_record? && @sample.specimen.try(:new_record?)%>
    <% f.fields_for :specimen do |specimen_f| %>
        <%= render :partial => "specimens/form", :locals => {:f => specimen_f, :specimen => @sample.specimen, :action => action}%>
    <% end %>
<% else %>
    <p>
       <%= f.label "Choose a #{Seek::Config.sample_parent_term}" %> <span class="required">*</span><br/>
       <%= f.collection_select(:specimen_id, Specimen.all_authorized_for('view'), :id, :title,{:include_blank =>"Please Select..."},{:style=>"width:50%"}) %>
      </p>
<% end %>
<h2>Sample Details</h2>

<div style="width: 95%;">

  <p>
    <%= f.label "Sample name:" -%><span class="required">*</span><br/>
    <%= f.text_field :title, :style => "width: 350px;" -%>
  </p>
  <p>
    <%= f.label :description -%><br/>
    <%= f.text_area :comments, :style => "width: 85%;", :rows => 5 -%>
  </p>
  
  <% if Seek::Config.is_virtualliver %>

      <p>
        <%= f.label "Explantation time" -%><br/>
        <%= f.text_field :explantation, :style => "width: 350px;" -%>
      </p>

      <p>
        <%= f.label :donation_date -%><span class="required">*</span><br/>
        <%= f.calendar_date_select :donation_date, :time => "mixed" -%>
      </p>
  <% end %>

  <p>
    <%= f.label :lab_internal_identifier -%><span class="required">*</span><br/>
    <%= f.text_field :lab_internal_number, :style => "width: 350px;" -%>
  </p>

  <p>
    <%= f.label :sampling_date -%><br/>
    <%= f.calendar_date_select :sampling_date, :time => "mixed", :style=>"width:350px;" -%>
  </p>

  <p>
    <%= f.label :provider_name -%><br/>
    <%= f.text_field :provider_name, :style=>"width:350px;" -%>
  </p>

  <p>
    <%= f.label "Provider's sample identifier" -%><br/>
    <%= f.text_field :provider_id, :style=>"width:350px;" -%>
  </p>

  <p>
    <%= f.label "Comment" -%><br/>
    <%= f.text_field :comments, :style=>"width:350px;" -%>
  </p>

  <p>
    <%= f.label "Organism part" -%><br/>
    <%= f.select :organism_part, options_for_select(['whole cell', 'membrane fraction'].insert(0,'Not specified'), @sample.organism_part), :style => 'float:right;margin-right:30em' %>
  </p><commit_msg>different organism parts of sample for VL<commit_after><%= javascript_include_tag 'calendar_date_select/calendar_date_select' %>
<%= stylesheet_link_tag 'calendar_date_select/default' %>
<%= javascript_include_tag "sharing.js" -%>
<%= javascript_include_tag "resource.js"%>
<%= javascript_include_tag "biosample.js"%>

<%= f.error_messages %>

<% if @sample.new_record? && @sample.specimen.try(:new_record?)%>
    <% f.fields_for :specimen do |specimen_f| %>
        <%= render :partial => "specimens/form", :locals => {:f => specimen_f, :specimen => @sample.specimen, :action => action}%>
    <% end %>
<% else %>
    <p>
       <%= f.label "Choose a #{Seek::Config.sample_parent_term}" %> <span class="required">*</span><br/>
       <%= f.collection_select(:specimen_id, Specimen.all_authorized_for('view'), :id, :title,{:include_blank =>"Please Select..."},{:style=>"width:50%"}) %>
      </p>
<% end %>
<h2>Sample Details</h2>

<div style="width: 95%;">

  <p>
    <%= f.label "Sample name:" -%><span class="required">*</span><br/>
    <%= f.text_field :title, :style => "width: 350px;" -%>
  </p>
  <p>
    <%= f.label :description -%><br/>
    <%= f.text_area :comments, :style => "width: 85%;", :rows => 5 -%>
  </p>
  
  <% if Seek::Config.is_virtualliver %>

      <p>
        <%= f.label "Explantation time" -%><br/>
        <%= f.text_field :explantation, :style => "width: 350px;" -%>
      </p>

      <p>
        <%= f.label :donation_date -%><span class="required">*</span><br/>
        <%= f.calendar_date_select :donation_date, :time => "mixed" -%>
      </p>
  <% end %>

  <p>
    <%= f.label :lab_internal_identifier -%><span class="required">*</span><br/>
    <%= f.text_field :lab_internal_number, :style => "width: 350px;" -%>
  </p>

  <p>
    <%= f.label :sampling_date -%><br/>
    <%= f.calendar_date_select :sampling_date, :time => "mixed", :style=>"width:350px;" -%>
  </p>

  <p>
    <%= f.label :provider_name -%><br/>
    <%= f.text_field :provider_name, :style=>"width:350px;" -%>
  </p>

  <p>
    <%= f.label "Provider's sample identifier" -%><br/>
    <%= f.text_field :provider_id, :style=>"width:350px;" -%>
  </p>

  <p>
    <%= f.label "Comment" -%><br/>
    <%= f.text_field :comments, :style=>"width:350px;" -%>
  </p>

  <p>
    <%= f.label "Organism part" -%><br/>
    <% organism_part_options = Seek::Config.is_virtualliver ? ['whole organism','organ','tissue','intercellular','cell','subcellular','blood','serum']:['whole cell', 'membrane fraction'] %>
    <%= f.select :organism_part, options_for_select(organism_part_options.insert(0,'Not specified'), @sample.organism_part), :style => 'float:right;margin-right:30em' %>
  </p>
{'fraction_non_alphanumeric': 0.23766031869413137, 'fraction_numerical': 0.012825495530509134, 'mean_word_length': 3.7394106813996317, 'pattern_counts': {'":': 0, '<': 164, '<?xml version=': 0, '>': 202, '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': '4916222', 'n_tokens_mistral': 2150, 'n_tokens_neox': 1930, 'n_words': 333}