RSS Git Download  Clone
Raw Blame History
    [% META title = 'Admin » Lab Test » Status Options' -%]

<!-- BEGIN admin/lab/section/statusoption/default.tt -->

  [% PROCESS admin/lab_test_nav.tt page = 'lab-test-status-opts' %]

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

    [% status_options_dfv_js %]

	<h2 align="center">Lab Test Status Options</h2>

    [% IF dfv_errors %]
        <p class="error">[% c.cfg('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/lab_test_status-options/update"
        [% status_options_onsubmit %] name="status-option" id="status-option">

		[% INCLUDE site/snippets/help.tt file = 'newstatusoption' %]

		<div class="indent">
		<table>
			<tr>
				<td class="label">Description:</td>
				<td class="content">
                    [% PROCESS site/ajax_input.tt field = 'description'
						id = 'test_status_option' %]
					[% error_description %]
				</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_is_active %]
					</td>
			</tr>
        </table>

        <p class="indent">[% site.html.submit %]</p>
        </div>
    </form>
    </div>

    <p class="spacer">&nbsp;</p>

    [% IF status_options.size %]
	<table>
        <tr>
            <th></th>
            <th>Description</th>
             <th>Active</th>
        </tr>

        [% FOREACH item IN status_options %]
        <tr>
            <td>[% loop.count %]</td>
            <td>
                <input type="text" size="30" name="[% item.id %]" [% site.html.disabled %]
                    value="[% item.description | html %]" />
            </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>

			[% IF item.is_editable.match('yes') %]
			<td align="center">
				<a href="[% app_url %]/admin/lab_test_status-options/edit/[% item.id %]">Edit</a>
			</td>
			[% ELSE %]
				<td class="borderless"></td>
			[% END %]
         </tr>
        [% END %]
    </table>
    [% END %]
<!-- END admin/lab/section/statusoption/default.tt -->