@@ -, +, @@ --- admin/z3950servers.pl | 3 ++- .../prog/en/modules/admin/z3950servers.tt | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) --- a/admin/z3950servers.pl +++ a/admin/z3950servers.pl @@ -91,6 +91,7 @@ if ($op eq 'add_form') { my $dbh=C4::Context->dbh; my $sth=$dbh->prepare("select * from z3950servers where name=?"); $sth->execute($input->param('searchfield')); + my $checked = $input->param('checked') ? 1 : 0; if ($sth->rows) { $sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=?,encoding=? where name=?"); $sth->execute($input->param('host'), @@ -99,7 +100,7 @@ if ($op eq 'add_form') { $input->param('userid'), $input->param('password'), $input->param('searchfield'), - $input->param('checked'), + $checked, $input->param('rank'), $input->param('syntax'), $input->param('encoding'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ -57,8 +57,6 @@ } if (isNaN(f.rank.value)) {_alertString += "- rank must be a number\n"; } - if (isNaN(f.checked.value) || f.checked.value<0 || f.checked.value>1) {_alertString += "- checked must be 0 or 1\n"; - } if (_alertString.length==0) {document.Aform.submit(); } else {alertString2 = "Form not submitted because of the following problem(s)\n";alertString2 += "------------------------------------------------------------------------------------\n\n";alertString2 += _alertString;alert(alertString2); } @@ -109,7 +107,13 @@
  • -
  • +
  • + [% IF ( checked ) %] + + [% ELSE %] + + [% END %] +
  • @@ -305,7 +309,7 @@ [% ELSE %] [% END %] -[% loo.name %][% loo.host %]:[% loo.port %][% loo.db %][% loo.userid %][% loo.password %][% loo.checked %][% loo.rank %] [% loo.syntax %][% loo.encoding %]EditDelete +[% loo.name %][% loo.host %]:[% loo.port %][% loo.db %][% loo.userid %][% loo.password %][% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %][% loo.rank %] [% loo.syntax %][% loo.encoding %]EditDelete [% END %] --