RSS Git Download  Clone
Raw Blame History
  [% META title = 'Admin » Edit Specimen' -%]

    [% # PROCESS dumper.tt dump = errs %]
    [% # PROCESS dumper.tt dump = sample_types %]
    [% # PROCESS dumper.tt dump = specimen_sample_types %]

  [% PROCESS admin/misc_nav.tt page = 'specimens' %]

  [% specimens_dfv_js %]

  <h2 align="center">Edit Specimen Details</h2>

    [% IF dfv_errors %]
    <dl>
        <dt class="error">[% c.cfg('msg').dfv_errors %]</dt>
        [% IF error_sample_code %]
            <dd>Sample code [% error_sample_code %]</dd>[% END %]
        [% IF error_description %]
            <dd>Description [% error_description %]</dd>[% END %]
        [% IF error_sample_type_id %]
            <dd>Sample type [% error_sample_type_id %]</dd>[% END %]
        [% IF error_active %]
            <dd>Active [% error_active %]</dd>[% END %]
    </dl>
    [% END %]

    <form method="post" action="[% app_url %]/config/specimens/update/[% data.id %]" [% specimens_onsubmit %]
        name="specimen" id="specimen">

    <table>
        <tr>
            <th [% IF error_sample_code %]class="error"[% END %]>Sample Code</th>
			<th [% IF error_description %]class="error"[% END %]>Description</th>
            <th [% IF error_sample_type_id %]class="error"[% END %] colspan="4">
                <div>Sample type</div>
                    <div style="text-align: center">
                        <span title="liquid samples (PB, BMA, etc)"
                            class="acronym">L</span> |
                        <span title="biopsy - unfixed (LU, GU, etc)"
                            class="acronym">BU</span> |
                        <span title="biopsy - fixed (LF, GF, etc)"
                            class="acronym">BF</span> |
                        <span title="lab tests not required"
                            class="acronym">X</span>
                </div>
            </th>
			<th [% IF error_active %]class="error"[% END %]>Active</th>
        </tr>

        <tr>
            <td>
                <input type="text" name="sample_code" size="15" value="[% data.sample_code | html %]" />
             </td>
            <td>
                <input type="text" name="description" size="45" value="[% data.description | html %]" />
            </td>
            [% FOREACH type IN sample_types %]
            <td align="center">
                <input type="checkbox" name="sample_type_id" value="[% type.id %]"
                    [% 'checked' IF specimen_sample_types.item(type.id) %] />
            </td>
            [% END %]
            <td align="center">
                <input type="checkbox" name="sample_type_id" value="0"
                    [% 'checked' IF NOT specimen_sample_types.size %] />
            </td>
            <td>
				<select name="active">
				[% FOREACH option IN ['yes', 'no'] %]
                     <option value="[% option %]" [% 'selected' IF option == data.active %]>
                        [% option %]
                    </option>
			    [% END %]
				</select>
			</td>
             <td>
                [% site.html.submit %]
            </td>
        </tr>
    </table>

    </form>

    <p>[% site.html.back_button %]</p>