  [% META title = 'Admin &raquo; Clinicians &raquo; Search' -%]

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

	[% PROCESS admin/referral_nav.tt page = 'clinicians' %]
	
	<h2>Clinicians:</h2>
    [% PROCESS site/page_count.tt %]

	<div class="indent">
		<table>
			<tr>
				<th></th>
				<th>Name</th>
				<th>Code</th>
				<th>Active</th>
			</tr>

			[% FOREACH entry IN referrers %][% # PROCESS dumper.tt dump = d %]
			<tr>
				<td>
                    [% IF cgi_pager; cgi_pager.first_pos_displayed + loop.count - 1; ELSE; loop.count; END %]
                </td>
				<td>
					<input type="text" size="30" name="name" value="[% entry.name | html %]"
						[% site.html.disabled %] />
				</td>
				<td>
					<input type="text" size="8" name="national_code"
                           value="[% entry.national_code | html %]"
                        [% site.html.disabled %] />
				</td>
				<td>
					<select name="active" [% site.html.disabled %]>
					[% FOREACH option IN ['yes', 'no'] %]
						 <option value="[% option %]" [% 'selected' IF option == entry.active %]>
							[% option %]
						</option>
					[% END %]
					</select>
				</td>
				<td align="center">
					<a href="[% app_url %]/config/clinicians/edit/[% entry.id %]">Edit</a>
				</td>
			 </tr>
			[% END %]
		</table>
	</div>
    [% PROCESS site/cgi_pager.tt %]
	
	<h3>Search again</h3>
	<div class="indent">
		[% PROCESS search/referrer_search.tt referrer_type = 'clinicians' %]
	</div>