  [% META title = 'Admin &raquo; Edit Diagnosis Context Warning' -%]
<!-- BEGIN admin/config/diagnosiscontextwarnings/edit_diagnosis_context_warning.tt -->  

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

	[% PROCESS admin/request_nav.tt page = 'diagnostic-categories' %]

  <h2 align="center">Edit Diagnosis Context Warning</h2>

    [% IF dfv_errors %]
    <dl>
        <dt class="error">[% c.cfg('msg').dfv_errors %]</dt>
        [% IF error_context_warning_id %]
            <dd>Context warning [% error_context_warning_id %]</dd>[% END %]
    </dl>
    [% END %]

    <form method="post" action="[% app_url
		%]/config/diagnosis-context-warnings/update_diagnosis_context_warning/[% data.id %]"
        name="context_warning" id="context_warning">
		<input type="hidden" name="diagnosis_id" value="[% data.diagnosis.id %]" />
		
		[% IF data.diagnosis.active.match('no') %]
			<p class="warning">[diagnostic term not in current use]</p>
		[% END %]
		
    <table>
        <tr>
            <th>Diagnosis:</th>
			<td>[% data.diagnosis.name %]</td>
        </tr>

        <tr>
			<th scope="col">Context warning:</th>
            <td>
				<select name="context_warning_id">
					[% FOREACH entry IN context_warnings %]
					<option value="[% entry.id %]"
							[% 'selected' IF entry.id == data.context_warning_id %]>
						[% entry.description %]</option>
					[% END %]
				</select>
             </td>
        </tr>
		<tr>
			<td colspan="2" align="center">
				[% site.html.submit %]
				<input type="submit" value="Delete this entry" name=".delete" />
			</td>
		</tr>
    </table>

    </form>

    <p>[% site.html.back_button %]</p>
<!-- END admin/config/diagnosiscontextwarnings/edit_diagnosis_context_warning.tt -->  
