Bugzilla – Attachment 7872 Details for
Bug 7582
When adding a Z39.50 server the "checked" option should use a checkbox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7582 - When adding a Z39.50 server the "checked" option should use a checkbox
Bug-7582---When-adding-a-Z3950-server-the-checked-.patch (text/plain), 4.60 KB, created by
Jared Camins-Esakov
on 2012-02-25 20:30:25 UTC
(
hide
)
Description:
Bug 7582 - When adding a Z39.50 server the "checked" option should use a checkbox
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-02-25 20:30:25 UTC
Size:
4.60 KB
patch
obsolete
>From 8e6f10d66720199cd7d98fd4bf22b439ff187470 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 22 Feb 2012 12:24:54 -0500 >Subject: [PATCH] Bug 7582 - When adding a Z39.50 server the "checked" option should use a checkbox >Content-Type: text/plain; charset="UTF-8" > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > admin/z3950servers.pl | 3 ++- > .../prog/en/modules/admin/z3950servers.tt | 12 ++++++++---- > 2 files changed, 10 insertions(+), 5 deletions(-) > >diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl >index 44b3967..f0a4dbb 100755 >--- a/admin/z3950servers.pl >+++ b/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'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >index e565acf..12585b3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >+++ b/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 @@ > </li> > <li><label for="password">Password: </label> <input type="text" name="password" id="password" value="[% password %]" /> > </li> >- <li><label for="checked">Checked (searched by default): </label> <input type="text" size="1" name="checked" id="checked" value="[% checked %]" onblur="isNum(this)" /> </li> >+ <li><label for="checked">Checked (searched by default): </label> >+ [% IF ( checked ) %] >+ <input type="checkbox" name="checked" id="checked" value="1" checked="checked" /> >+ [% ELSE %] >+ <input type="checkbox" name="checked" id="checked" value="1" /> >+ [% END %] >+ </li> > <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% rank %]" onblur="isNum(this)" /> > </li> > <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label> >@@ -305,7 +309,7 @@ > [% ELSE %] > <tr> > [% END %] >-<td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% loo.password %]</td><td>[% loo.checked %]</td><td>[% loo.rank %]</td> <td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.name |url %]">Delete</a></td> </tr> >+<td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">[% loo.name %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% loo.password %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td> <td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td><a href="[% loo.script_name %]?op=add_form&searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&searchfield=[% loo.name |url %]">Delete</a></td> </tr> > [% END %]</tbody> > </table> > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7582
:
7813
|
7822
|
7854
| 7872