  [% META title = 'Admin &raquo; Request Status Options' -%]  
<!-- BEGIN admin/config/statusoptions/default.tt -->

	[% status_options_dfv_js %]

	[% PROCESS admin/options_nav.tt page = 'status-options' %]

	<h2 align="center">Request Status Options</h2>

    [% IF dfv_errors %]
        <p class="error">[% c.config('msg').dfv_errors %]</p>
    [% END %]

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

	[% IF any_point # needs corresponding hard-coding in app logic %]
	<!--
    <p class="title">
		<a href="javascript:toggleview_arrow('new','togglenew')" id='togglenew' class="image">
			<img alt="" src="/images/open.gif" class="menu" /></a> Add new entry
	</p>

	<div class="[% dfv_errors ? 'visible' : 'itemhidden' %]" id="new">

    <form method="get" action="[% app_url %]/config/status-options/update"
        name="new_status_option" id="new_status_option" [% status_options_onsubmit %]>
      <div class="indent">
        <table>
          <tr>
            <td class="label">Description:</td>
            <td class="content">
							[% PROCESS site/ajax_input.tt field = 'description'
								id = "description" size = 20 %]
              [% 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>
                    
          <tr>
            <td class="borderless" colspan="2" align="center">[% site.html.submit %]</td>
          </tr>
        </table>
      </div>
      
    </form>
  </div>
  -->
  [% END %]

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

	[% IF status_opts.size # only empty if new db %]
	<div class="[% dfv_errors ? 'itemhidden' : 'visible' %]">
		<table>
			<tr>
				<th></th>
				<th>Option name</th>
				<th>Active</th>
			</tr>

			[% FOREACH entry IN status_opts %]
			<tr>
				<td>
          [% loop.count %]
        </td>
				<td>
					<input type="text" size="20" name="description"
              value="[% entry.description | html %]" />
				</td>
				<td>
					<select name="active" [% site.html.disabled %]>
					[% FOREACH option IN ['yes', 'no'] %]
						 <option value="[% option %]" [% 'selected' IF option == entry.is_active %]>
							[% option %]
						</option>
					[% END %]
					</select>
				</td>
				<td align="center">
          [% IF entry.is_editable.match('yes') %]
					<a href="[% app_url %]/config/status-options/edit/[% entry.id %]">Edit</a>
          [% END %]
				</td>
			 </tr>
			[% END %]

		</table>
	</div>
	[% END %]
<!-- END admin/config/statusoptions/default.tt -->
