sanger/limber

View on GitHub
app/views/tube_creation/phix_addition.html.erb

Summary

Maintainability
Test Coverage
<%= page('phix-addition-page') do %>
  <%= content do %>
    <%= card id: 'main-content' do %>
      <div>
        <h3>Instructions</h3>
        <p>This step records that a PhiX control has been added, and the particular tube that it came from.</p>
        <p>Scan the PhiX tube barcode into the panel on the right of the screen and click <i>Add PhiX and continue</i>.</p>
      </div>
    <% end %>
  <% end %>
  <%= sidebar do %>
    <%= card title: 'Scan PhiX tube barcode', without_block: true do %>
      <div id="validation_report"></div>
      <div class="card-body">
      <%= form_for(
        @labware_creator,
        url: limber_plate_children_path(@labware_creator.parent_uuid),
        as: :plate,
        html: { method: :post }) do |form| %>

        <%= form.hidden_field :parent_uuid %>
        <%= form.hidden_field :purpose_uuid %>
        <div class="labware-container scan-labware form-group row">
          <label for="spikedbuffer_tube_barcode"
                  class="plate-label col-md-2" >PhiX tube barcode</label>
          <input type="text"
                  id="spikedbuffer_tube_barcode"
                  name="plate[spikedbuffer_tube_barcode]"
                  class="form-control col-md-8"
                  required="required"/>
        </div>
        <%= form.submit 'Add PhiX and continue', class: 'btn btn-success btn-lg', id: 'create-labware-with-phix' %>
      <% end %>
      </div>
    <% end %>

    <%= card title: 'Other actions', without_block: true do %>
      <div class="card-body">
      <div class="instructions">
        <p>Only skip adding PhiX if you know of a good reason.</p>
      </div>
      <%= form_for(
        @labware_creator,
        url: limber_plate_children_path(@labware_creator.parent_uuid),
        as: :plate,
        html: { method: :post }) do |form| %>

        <%= form.hidden_field :parent_uuid %>
        <%= form.hidden_field :purpose_uuid %>

        <%= form.submit 'Continue without PhiX', class: 'btn btn-secondary btn-lg', id: 'create-labware-skip-step' %>
      <% end %>
      </div>
    <% end %>
  <% end %>
<% end %>