[% META title = 'Admin » Lab Sections' -%]
<!-- BEGIN admin/lab/section/default.tt -->
[% PROCESS admin/lab_test_nav.tt page = 'lab_section' %]
[% # PROCESS dumper.tt dump = errors %]
[% lab_sections_dfv_js %]
<h2 align="center">Lab Sections</h2>
[% IF dfv_errors %]
<p class="error">[% c.cfg('msg').dfv_errors %]</p>
[% END %]
<p class="title">
[% div_name = 'new'; INCLUDE site/snippets/toggleview.tt %]
Add new entry
</p>
<div class="[% dfv_errors ? 'visible' : 'itemhidden' %]" id="[% div_name %]">
[% INCLUDE site/snippets/help.tt file = 'newlabsection' %]
<form method="post" action="[% app_url %]/admin/lab_section/update"
[% lab_sections_onsubmit %] name="lab_section" id="lab_section">
<div class="indent">
<table>
<tr>
<td class="label">Description:</td>
<td class="content">
[% PROCESS site/ajax_input.tt field = 'section_name' %]
[% error_section_name %]
</td>
</tr>
<tr>
<td class="label">Results summary:</td>
<td class="content">
<select name="has_result_summary" [% site.html.onfocus %]>
[% FOREACH option IN ['no', 'yes'] # default to no %]
<option value="[% option %]">[% option %]</option>
[% END %]
</select>
[% error_has_result_summary %]
</td>
</tr>
<tr>
<td class="label">Section notes:</td>
<td class="content">
<select name="has_section_notes" [% site.html.onfocus %]>
[% FOREACH option IN ['no', 'yes'] # default to no %]
<option value="[% option %]">[% option %]</option>
[% END %]
</select>
[% error_has_section_notes %]
</td>
</tr>
<tr>
<td class="label">Sign out:</td>
<td class="content">
<select name="has_test_sign_out" [% site.html.onfocus %]>
[% FOREACH option IN ['no', 'yes'] # default to no %]
<option value="[% option %]">[% option %]</option>
[% END %]
</select>
[% error_has_test_sign_out %]
</td>
</tr>
<tr>
<td class="label">Results import:</td>
<td class="content">
<select name="has_results_import" [% site.html.onfocus %]>
[% FOREACH option IN ['no', 'yes'] # default to no %]
<option value="[% option %]">[% option %]</option>
[% END %]
</select>
[% error_has_results_import %]
</td>
</tr>
<tr>
<td class="label">Remote system:</td>
<td class="content">
<select name="has_foreign_id" [% site.html.onfocus %]>
[% FOREACH option IN ['no', 'yes'] # default to no %]
<option value="[% option %]">[% option %]</option>
[% END %]
</select>
[% error_has_foreign_id %]
</td>
</tr>
<tr>
<td class="label">Active:</td>
<td class="content">
<select name="is_active" [% site.html.onfocus %]>
[% FOREACH option IN ['yes', 'no'] %]
<option value="[% option %]">[% option %]</option>
[% END %]
</select>
[% error_is_active %]
</td>
</tr>
</table>
<p class="indent">[% site.html.submit %]</p>
</div>
</form>
</div>
<p class="spacer"> </p>
[% IF sections.size %]
<table>
<tr>
<th></th>
<th>Description</th>
<th>
<span title="section records individual test results"
class="acronym">Results</span>
</th>
<th>
<span title="section has test-specific instructions"
class="acronym">Notes</span>
</th>
<th>
<span title="section allows block completion of all outstanding test results"
class="acronym">Sign-out</span>
</th>
<th>
<span title="section allows import of results via data file"
class="acronym">Import</span>
</th>
<th>
<span title="section has remote system interface"
class="acronym">Remote</span>
</th>
<th>Active</th>
</tr>
[% FOREACH item IN sections %]
<tr>
<td>[% loop.count %]</td>
<td>
<input type="text" size="30" name="[% item.id %]" value="[% item.section_name %]"
[% site.html.disabled %] />
</td>
<td>
<select name="has_result_summary" [% site.html.disabled %]>
[% FOREACH option IN ['yes', 'no'] %]
<option value="[% option %]" [% 'selected' IF option == item.has_result_summary %]>
[% option %]
</option>
[% END %]
</select>
</td>
<td>
<select name="has_section_notes" [% site.html.disabled %]>
[% FOREACH option IN ['yes', 'no'] %]
<option value="[% option %]" [% 'selected' IF option == item.has_section_notes %]>
[% option %]
</option>
[% END %]
</select>
</td>
<td>
<select name="has_test_sign_out" [% site.html.disabled %]>
[% FOREACH option IN ['yes', 'no'] %]
<option value="[% option %]" [% 'selected' IF option == item.has_test_sign_out %]>
[% option %]
</option>
[% END %]
</select>
</td>
<td>
<select name="has_results_import" [% site.html.disabled %]>
[% FOREACH option IN ['yes', 'no'] %]
<option value="[% option %]" [% 'selected' IF option == item.has_results_import %]>
[% option %]
</option>
[% END %]
</select>
</td>
<td>
<select name="has_foreign_id" [% site.html.disabled %]>
[% FOREACH option IN ['yes', 'no'] %]
<option value="[% option %]" [% 'selected' IF option == item.has_foreign_id %]>
[% option %]
</option>
[% END %]
</select>
</td>
<td>
<select name="is_active" [% site.html.disabled %]>
[% FOREACH option IN ['yes', 'no'] %]
<option value="[% option %]" [% 'selected' IF option == item.is_active %]>
[% option %]
</option>
[% END %]
</select>
</td>
<td align="center">
<a href="[% app_url %]/admin/lab_section/edit/[% item.id %]">Edit</a>
</td>
</tr>
[% END %]
</table>
[% END %]
<!-- END admin/lab/section/default.tt -->