[% META title = 'Admin » Screening Categories' -%]
<!-- BEGIN [% template.name %] -->
[% # PROCESS dumper.tt dump = screen_categories %]
[% # PROCESS dumper.tt dump = c.stash.errs %]
[% PROCESS admin/system_nav.tt page = 'screen_category' %]
[% screen_categories_dfv_js %]
<h2 align="center">Screen Categories</h2>
[% IF dfv_errors %]
<p class="error">[% c.config('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 %]">
<form method="post" action="[% app_url %]/admin/screen_category/update"
[% screening_terms_onsubmit %] name="screening_category" id="screening_category">
<div class="indent">
<table>
<tr>
<td class="label">Description:</td>
<td class="content">
[% PROCESS site/ajax_input.tt field = 'name' size = 30
id = 'screen_category' %]
</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_active %]
</td>
</tr>
</table>
<p class="indent">[% site.html.submit %]</p>
</div>
</form>
</div>
[% IF screen_categories.size %]
<div class="[% dfv_errors ? 'itemhidden' : 'visible' %]">
[% PROCESS site/page_count.tt %]
<table>
<tr>
<th></th>
<th>Description</th>
<th>Active</th>
</tr>
[% FOREACH item IN screen_categories %]
<tr>
<td>
[% IF cgi_pager; cgi_pager.first_pos_displayed + loop.count - 1; ELSE; loop.count; END %]
</td>
<td>
<input type="text" size="50" name="name" value="[% item.name | html %]"
[% site.html.disabled %] />
</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/screen_category/edit/[% item.id %]">Edit</a>
</td>
</tr>
[% END %]
</table>
</div>
[% PROCESS site/cgi_pager.tt %]
[% END %]
<!-- END [% template.name %] -->