View | Details | Raw Unified | Return to bug 41564
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-11 / +22 lines)
Lines 272-286 Link Here
272
    [% IF op == 'list' %]
272
    [% IF op == 'list' %]
273
        [% INCLUDE 'datatables.inc' %]
273
        [% INCLUDE 'datatables.inc' %]
274
    [% END %]
274
    [% END %]
275
    <script>
275
    [% IF server %]
276
        [% IF ( add_form ) %]
276
        <script>
277
            const server = {
278
                syntax: "[% server.syntax | html %]",
279
                encoding: "[% server.encoding | html %]",
280
                recordtype: "[% server.recordtype | html %]",
281
            };
282
        </script>
283
    [% END %]
284
285
    [% IF ( add_form ) %]
286
        <script>
277
            $(document).ready(function(){
287
            $(document).ready(function(){
278
                // Update selects for syntax, encoding and recordtype
288
                // Update selects for syntax, encoding and recordtype
279
                [% IF server %]
289
                if (typeof server !== 'undefined'){
280
                    $("#syntax").val('[% server.syntax | html %]');
290
                    $("#syntax").val(server.syntax);
281
                    $("#encoding").val('[% server.encoding | html %]');
291
                    $("#encoding").val(server.encoding);
282
                    $("#recordtype").val('[% server.recordtype | html %]');
292
                    $("#recordtype").val(server.recordtype);
283
                [% END %]
293
                }
284
                $( "#serverentry" ).validate({
294
                $( "#serverentry" ).validate({
285
                    rules: {
295
                    rules: {
286
                        servername: { required: true },
296
                        servername: { required: true },
Lines 316-322 Link Here
316
                var type= $('#recordtype').val();
326
                var type= $('#recordtype').val();
317
                window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map + '&type=' + type,'popup','width=800,height=400,resizable=yes,toolbar=false,scrollbars=yes,top');
327
                window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map + '&type=' + type,'popup','width=800,height=400,resizable=yes,toolbar=false,scrollbars=yes,top');
318
            }
328
            }
319
        [% ELSE %]
329
        </script>
330
    [% ELSE %]
331
        <script>
320
            $(document).ready(function() {
332
            $(document).ready(function() {
321
                $("#serverst").kohaTable({
333
                $("#serverst").kohaTable({
322
                    pagingType: "full",
334
                    pagingType: "full",
Lines 332-338 Link Here
332
                    }
344
                    }
333
                });
345
                });
334
            });
346
            });
335
        [% END %]
347
        </script>
336
    </script>
348
    [% END %]
337
[% END %]
349
[% END %]
338
[% INCLUDE 'intranet-bottom.inc' %]
350
[% INCLUDE 'intranet-bottom.inc' %]
339
- 

Return to bug 41564