<!-- BEGIN [% template.name %] -->
  [% META title = 'Worklist &raquo; Print Sample Linkage Forms' -%]

    [% # INCLUDE dumper.tt dump = r.as_tree FOREACH r IN requests %]

  <h3 class="header">
    Print sample linkage forms for [% slf_type.replace('_', ' ').upper %] samples
  </h3>

  [% IF requests.size %]
  <form name="labels" action="[% app_url%]/local_worklist/genomics_slf_data"
        method="post">
    <input type="hidden" name="slf_type" value="[% slf_type %]" />
    <table class="indent">
    [% FOREACH data IN requests; # PROCESS dumper.tt dump = data; %]
        <tr class="borderless">
            <td>[% data.last_name.upper %] [% data.first_name.ucfirst %]</td>
            <td>[% data.nhs_number %]</td>
            <td align="right">[% INCLUDE site/lab_number.tt want_url = 1 %]</td>
            <td><input type="checkbox" name="request_id" value="[% data.id %]" /></td>
        </tr>
     [% END %]
    </table>

    <p class="indent">
      <input type="button" name="CheckAll" value="Select all"
        onClick="checkAll(document.labels.request_id)">
      <input type="button" name="UnCheckAll" value="Clear all"
        onClick="uncheckAll(document.labels.request_id)">
      <!-- open pdf in new tab: -->
      <input type='submit' value='Submit' name='.submit' class='button'
        onclick="this.form.target='_blank';return true;" />
      <span class="info">&#171; opens in new tab/window</span>
    </p>
  </form>
  [% ELSE %]
    <p class="info indent">No elegible requests found</p>
    <p class="indent">[% site.html.back_button %]</p>
  [% END %]

  <hr />
  <p class="warning">[NB: participant ID [% IF slf_type.match('rare_disease') %]
      and family ID values need [% ELSE; 'needs'; END %] to be completed for
      elegibility for printing sample linkage forms]
  </p>
<!-- END [% template.name %] -->
