  [% META title = 'Admin &raquo; Edit Trial' -%]

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

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

  [% specimens_dfv_js %]

  <h2 align="center">Edit Clinical Trial Details</h2>

    [% IF dfv_errors %]
    <dl>
        <dt class="error">[% c.cfg('msg').dfv_errors %]</dt>
        [% IF error_trial_name %]
            <dd>Trial name [% error_trial_name %]</dd>[% END %]
        [% IF error_active %]
            <dd>Active [% error_active %]</dd>[% END %]
    </dl>
    [% END %]

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

    <table>
        <tr>
            <th [% IF error_sample_code %]class="error"[% END %]>Trial name</th>
			<th [% IF error_active %]class="error"[% END %]>Active</th>
        </tr>

        <tr>
            <td>
                <input type="text" name="trial_name" size="45" value="[% data.trial_name | html %]" />
             </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>


