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

  [% # PROCESS dumper.tt dump = screening_list.size %]


    [% PROCESS admin/system_nav.tt page = 'screen_term' %]

    [% screening_terms_dfv_js %]

	<h2 align="center">Edit Screen Term</h2>

    [% IF dfv_errors %]
    <dl>
        <dt class="error">[% c.cfg('msg').dfv_errors %]</dt>
        [% IF error_description %]
            <dd>Description [% error_description %]</dd>[% END %]
        [% IF error_category_id %]
            <dd>Category [% error_category_id %]</dd>[% END %]
        [% IF error_active %]
            <dd>Active [% error_active %]</dd>[% END %]
    </dl>
    [% END %]

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

    <form method="post" action="[% app_url %]/admin/screen_term/update/[% data.id %]"
        [% screening_terms_onsubmit %] name="screening_term" id="screening_term">

    <table>
        <tr>
            <th [% IF error_description %]class="error"[% END %]>Description</th>
			<th [% IF error_category_id %]class="error"[% END %]>Category</th>
			<th [% IF error_active %]class="error"[% END %]>Active</th>
        </tr>

        <tr>
            <td>
                <input type="text" size="50" name="description" value="[% data.description | html %]" />
			</td>
            <td class="type">
                <select name="category_id">
                    [% FOREACH entry IN screen_categories %]
                     <option value="[% entry.id %]" [% 'selected' IF entry.id == data.category_id %]>
                        [% entry.name %]
                    </option>
                    [% END %]
                </select>
            </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>
