 [% META title = 'Admin &raquo; Lab Section Status Options &raquo; Edit' -%]
 <!-- BEGIN [% template.name %] -->

  [% # PROCESS admin/lab_test_nav.tt page = 'lab_section' %]

    [% # PROCESS dumper.tt dump = data %]
    [% # PROCESS dumper.tt dump = o.as_tree FOREACH o IN status_options %]

	<h2 align="center">Edit Lab Section Status Options</h2>

    <p class="indent">
        [% site.html.back_button %]
    </p>

    <h3>Section: [% lab_section.section_name %]</h3>

   <form method="post"
        action="[% app_url %]/admin/lab_section_status-options/update/[% lab_section.id %]">
        <table class="indent">
            <tr>
                <th>Option</td>
                <th>Order</th>
            </tr>
            [% FOREACH opt IN status_options;
                NEXT UNLESS opt.is_editable.match('yes') %]
            <tr>
                [% class = data.item(opt.id) ? 'title' : 'normal' %]
                <td align="right">
                    <span class="[% class %]">[% opt.description %]</span>:
                </td>
                <td>
                    <select name="option_data">
                        <option value="">--</option>
                    [% FOREACH i IN [1 .. status_options.size] %]
                        <option value="[% opt.id %]~~[% i %]" [% 'selected'
                            IF data.item(opt.id) == i %]>[% i %]</option>
                    [% END %]
                    </select>
                </td>
            </tr>
            [% END %]
        </table>
        <p class="indent">
            [% site.html.submit %]
            [% site.html.reset %]
        </p>
    </form>
 <!-- END [% template.name %] -->
