<!-- BEGIN [% component.name %] -->
    [% # INCLUDE dumper.tt dump = lab_section %]
    [% # INCLUDE dumper.tt dump = is_locked %]
    [% # INCLUDE dumper.tt dump = request.as_tree %]

    <p class="warning">Request new lab tests:
      [% div_name = 'extraction'; INCLUDE site/snippets/toggleview.tt %]		
    </p>
    
    <form action="[% app_url %]/result/update/[% request.id %]" method="post"
        name="labTest" id="labTest">
        <input type="hidden" name="_section_name" value="[% lab_section.name %]" />
        <input type="hidden" name="_section_id" value="[% lab_section.id %]" />
        <input type="hidden" name="retain_req_status" value="1" />
        [% IF is_locked # don't need to go through manual unlock for this: %]
          <input type="hidden" name="storage_auto_unlock" value="1" />
        [% END %]

        <table class="itemhidden" id="[% div_name %]">
            [% IF is_locked %]
              <tr class="borderless">
                <td class="info">
                    <div class="indent">                      
                        <img src="/images/locked_small.png" />
                        <!-- // using auto-unlock // record requires
                        <a href="[% app_url %]/request/unlock_request/[% request.id %]">
                            unlocking</a> -->
                        [record will be auto-unlocked]
                        <img src="/images/locked_small.png" />                      
                    </div>
                </td>
              </tr>
            [% END %]

            <tr class="borderless">
                <td align="right">
                  [% FOREACH pair IN lab_tests; # INCLUDE dumper.tt dump = pair;
                    label = pair.key; # INCLUDE dumper.tt dump = request_lab_tests.${label};
                    test_id = pair.value;
                    re = '[^complete]\w+'; # disable any status except complete:
                    class = request_lab_tests.${label}.match(re) ? 'grey' : 'normal';
                  %]
                    <div class="[% class %] indent">
                        [% label %]:
                        <input type="checkbox" name="test_id" value="[% test_id %]"
                            [% 'disabled=1' IF class.match('grey') %] />
                    </div>
                  [% END %]
                </td>
                [% UNLESS _is_locked # using auto-unlock now so don't need to disable: %]
                    <td rowspan="[% lab_tests.size %]">[% site.html.go_btn %]</td>
                [% END %]
            </tr>
        </table>
    </form>
<!-- END [% component.name %] -->