Merge branch 'bug_7368' into 3.12-master
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / z3950servers.tt
index e565acf..3205e6f 100644 (file)
@@ -1,9 +1,9 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Administration &rsaquo; [% IF ( else ) %]Z39.50 Servers[% END %]
-[% IF ( add_form ) %] Z39.50 Servers &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 Server [% searchfield %][% ELSE %]New Z39.50 Server[% END %][% END %]
-[% IF ( delete_confirm ) %]Z39.50 Servers &rsaquo; Confirm Deletion[% END %]
-[% IF ( add_validate ) %]Z39.50 Servers &rsaquo; Z39.50 Server Added[% END %]
-[% IF ( delete_confirmed ) %]Z39.50 Servers &rsaquo; Z39.50 Server Deleted[% END %]</title>
+<title>Koha &rsaquo; Administration &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
+[% IF ( add_form ) %] Z39.50 servers &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
+[% IF ( delete_confirm ) %]Z39.50 servers &rsaquo; Confirm deletion[% END %]
+[% IF ( add_validate ) %]Z39.50 servers &rsaquo; Z39.50 server added[% END %]
+[% IF ( delete_confirmed ) %]Z39.50 servers &rsaquo; Z39.50 server deleted[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 
 [% IF ( add_form ) %]
@@ -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);
                 }
 </script>
         [% END %]
 </head>
-<body>
+<body id="admin_z3950servers" class="admin">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'z3950-admin-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( else ) %]Z39.50 Servers[% END %]
-[% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 Server [% searchfield %][% ELSE %]New Z39.50 Server[% END %][% END %]
-[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> &rsaquo; Confirm Deletion[% END %]
-[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> &rsaquo; Z39.50 Server Added[% END %]
-[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> &rsaquo; Z39.50 Server Deleted[% END %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
+[% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
+[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Confirm deletion[% END %]
+[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server added[% END %]
+[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server deleted[% END %]</div>
 
 <div id="doc3" class="yui-t2">
    
         <form action="[% script_name %]" name="Aform" method="post">
         <input type="hidden" name="op" value="add_validate" />
 [% IF ( searchfield ) %]
-                <h1>Modify Z39.50 Server</h1>
+                <h1>Modify Z39.50 server</h1>
         [% ELSE %]
-                <h1>New Z39.50 Server</h1>
+                <h1>New Z39.50 server</h1>
         [% END %]                
         <fieldset class="rows">
         <ol>[% IF ( searchfield ) %]
-                <li><span class="label">Z39.50 Server: </span>        <input type="hidden" name="searchfield" value="[% searchfield %]" />[% searchfield %]</li>
+                <li><span class="label">Z39.50 server: </span>        <input type="hidden" name="searchfield" value="[% searchfield %]" />[% searchfield %]</li>
         [% ELSE %]
-                <li><label for="searchfield">Z39.50 Server: </label>        <input type="text" name="searchfield" id="searchfield" size="65" maxlength="100" onblur="toUC(this)" /></li>
+                <li><label for="searchfield">Z39.50 server: </label>        <input type="text" name="searchfield" id="searchfield" size="65" maxlength="100" onblur="toUC(this)" /></li>
         [% END %]
 
                <li><label for="host">Hostname: </label>        <input type="text" name="host" id="host" size="30" value="[% host %]" />
                </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>   
 [% END %]
 </select>
 </li>
+    <li><label for="timeout">Timeout (0 its like not set): </label>
+               <input type="text" name="timeout" id="timeout" size="4" value="[% timeout %]" onblur="isNum(this)" /> seconds
+       </li>
 </ol>
         </fieldset>
                
 [% END %]
 
 [% IF ( add_validate ) %]
-<h3>Z39.50 Server Added</h3>
+<h3>Z39.50 server added</h3>
 <form action="[% script_name %]" method="post">
         <input type="submit" value="OK" />
         </form>
 
 [% IF ( delete_confirm ) %]
        [% reqsel %]
-<h3>Confirm Deletion of Server [% searchfield %]</h3>  
+<h3>Confirm deletion of server [% searchfield %]</h3>
         <ul>
                 <li><strong>Target: </strong>        [% searchfield %]</li>
                 <li><strong>Hostname: </strong>[% host %]</li>
                 <li><strong>Rank: </strong>[% rank %]</li>
                 <li><strong>Syntax: </strong>[% syntax %]</li>
                 <li><strong>Encoding: </strong>[% encoding %]</li>
+                <li><strong>Timeout: </strong>[% timeout %]</li>
        </ul>                <form action="[% script_name %]" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="submit" value="Delete this Server" /></form>  <form action="[% script_name %]" method="post"><input type="submit" value="Do Not Delete" /></form>
 
 
 [% END %]
 
 [% IF ( delete_confirmed ) %]
-<h3>Z39.50 Server Deleted</h3>
+<h3>Z39.50 server deleted</h3>
 <form action="[% script_name %]" method="post">
                 <input type="submit" value="OK" />
 </form>
        }       //]]>
        </script>
        <ul class="toolbar">
-       <li><a id="newserver" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form">New Z39.50 Server</a></li>
+    <li><a id="newserver" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form">New Z39.50 server</a></li>
 </ul></div>
 
-<h3>Z39.50 Servers Administration</h3>
+<h3>Z39.50 servers administration</h3>
 
         [% IF ( searchfield ) %]
                 You searched for [% searchfield %]
         [% END %]              
 <table id="serverst">
-                <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th>                         <th>Syntax</th><th>Encoding</th><th colspan="2">&nbsp;</th>
+                <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th>                         <th>Syntax</th><th>Encoding</th><th>Timeout</th><th colspan="2">&nbsp;</th>
                 </tr></thead>
                 <tbody>[% FOREACH loo IN loop %]
                 [% UNLESS ( loop.odd ) %]
                 [% ELSE %]
                     <tr>
                 [% END %]
-<td><a href="[% loo.script_name %]?op=add_form&amp;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&amp;searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&amp;searchfield=[% loo.name |url %]">Delete</a></td>                </tr>
+<td><a href="[% loo.script_name %]?op=add_form&amp;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>[% loo.timeout %]</td><td><a href="[% loo.script_name %]?op=add_form&amp;searchfield=[% loo.name |url %]">Edit</a></td><td><a href="[% loo.script_name %]?op=delete_confirm&amp;searchfield=[% loo.name |url %]">Delete</a></td>                </tr>
                 [% END %]</tbody>
        </table>