fixes for auth_val interface:

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Ryan Higgins 2007-10-29 17:13:07 -05:00 committed by Joshua Ferraro
parent 0483e34162
commit 289d65efb7
2 changed files with 12 additions and 11 deletions

View file

@ -99,11 +99,6 @@ if ($op eq 'add_form') {
lib => $data->{'lib'},
id => $data->{'id'}
);
if ($data->{'category'}) {
$template->param(category => "<input type=\"hidden\" name=\"category\" value=\"'$data->{'category'}'\" />$data->{'category'}");
} else {
$template->param(category => "<input type=\"text\" name=\"category\" id=\"category\" size=\"8\" maxlength=\"8\" />");
}
################## ADD_VALIDATE ##################################
# called by add_form, used to insert/modify data in DB
} elsif ($op eq 'add_validate') {
@ -126,6 +121,7 @@ if ($op eq 'add_form') {
$sth->finish;
$id = $input->param('id') unless $id;
$template->param(searchfield => $searchfield,
Tlib => $data->{'lib'},
Tvalue => $data->{'authorised_value'},
id =>$id,
);

View file

@ -32,9 +32,11 @@
<input type="hidden" name="op" value="add_validate" />
<fieldset class="rows"><ol>
<li>
<!-- TMPL_IF name="action_add_category" --><label for="category">Category</label><!-- TMPL_ELSE --><span class="label">Category</span><!-- /TMPL_IF -->
<!-- TMPL_VAR name="category" -->
<!-- TMPL_IF name="action_add_category" --><label for="category">Category</label>
<input type="text" name="category" id="category" size="16" maxlength="16" />
<!-- TMPL_ELSE --><span class="label">Category</span>
<input type="hidden" name="category" value="<!-- TMPL_VAR NAME='category' -->" /> <!-- TMPL_VAR NAME='category' -->
<!-- /TMPL_IF -->
</li>
<li>
<label for="authorised_value">Authorized value</label>
@ -56,11 +58,14 @@
<h3>Confirm Deletion</h3>
<table>
<tr>
<td>Category</td>
<td>Variable</td>
<td>Description</td>
<td><!-- TMPL_VAR name="searchfield" --></td>
<td>Value</td>
</tr>
<tr><td>Value</td><td><!-- TMPL_VAR name="Tvalue" --></td><td>&nbsp;</td></tr>
<tr>
<td><!-- TMPL_VAR name="searchfield" --></td>
<td><!-- TMPL_VAR name="Tvalue" --></td>
<td><!-- TMPL_VAR name="Tlib" --></td></tr>
</table>
<form action="<!-- TMPL_VAR name=" script_name " -->" method="post">
<input type="hidden" name="op" value="delete_confirmed" />