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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (-9 / +6 lines)
Lines 588-602 Link Here
588
                                '<a href="' + aData['diff_url'] + '">' + _("View") + '</a>'
588
                                '<a href="' + aData['diff_url'] + '">' + _("View") + '</a>'
589
                            );
589
                            );
590
                        }
590
                        }
591
                        if (aData['matched']) {
591
                        if (aData["matched"]) {
592
                            $('td:eq(6)', nRow).html(
592
                            let buttons = '<a class="btn btn-default btn-xs" target="_blank" href="' + record_details_url + aData["matched"] + '"><i class="fa-solid fa-eye"></i> ' + _("View") + "</a> ";
593
                                '<a class="btn btn-default btn-xs" target="_blank" href="' + record_details_url
593
                            if (permissions.CAN_user_editcatalogue_edit_catalogue) {
594
                                + aData['matched'] + '"><i class="fa-solid fa-eye"></i> ' + _("View") + '</a> '
594
                                buttons += '<a class="btn btn-default btn-xs" target="_blank" href="' + record_edit_url + aData["matched"] + '"><i class="fa-solid fa-pencil" aria-hidden="true"></i> ' + _("Edit") + "</a>";
595
                                if (perms.CAN_user_editcatalogue_edit_catalogue){
595
                            }
596
                                    + '<a class="btn btn-default btn-xs" target="_blank" href="' + record_edit_url
596
                            $("td:eq(6)", nRow).html(buttons);
597
                                    + aData['matched'] + '"><i class="fa-solid fa-pencil" aria-hidden="true"></i> ' + _("Edit") + '</a>'
598
                                }
599
                            );
600
                        }
597
                        }
601
                    },
598
                    },
602
                });
599
                });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-32 / +37 lines)
Lines 567-594 Link Here
567
                        });
567
                        });
568
                    return false;
568
                    return false;
569
                });
569
                });
570
            }
571
570
572
            $('select[name="patron_attributes"]').change(function () {
571
                $('select[name="patron_attributes"]').change(function() {
573
                updateAttrValues(this);
572
                    updateAttrValues(this);
574
            });
573
                } );
575
574
576
            $('select[name="patron_attributes"]').change();
575
                $('select[name="patron_attributes"]').change();
577
576
578
            $(".clear-date").on("click", function (e) {
577
                $(".clear-date").on("click",function(e){
579
                e.preventDefault();
578
                    e.preventDefault();
580
                var fieldID = this.id.replace("clear-date-", "");
579
                    var fieldID = this.id.replace("clear-date-","");
581
                $("#" + fieldID).val("");
580
                    $("#" + fieldID).val("");
582
            });
581
                });
583
            $("#cataloguing_additem_newitem").on("click", ".add_attributes", function (e) {
582
                $("#cataloguing_additem_newitem").on("click",".add_attributes",function(e){
584
                e.preventDefault();
583
                    e.preventDefault();
585
                add_attributes();
584
                    add_attributes();
586
            });
585
                });
587
            $("#cataloguing_additem_newitem").on("click", ".del_attributes", function (e) {
586
                $("#cataloguing_additem_newitem").on("click",".del_attributes",function(e){
588
                e.preventDefault();
587
                    e.preventDefault();
589
                del_attributes(this);
588
                    del_attributes(this);
590
            });
589
                });
591
            $("#patron_batchmod_form").on("submit", function () {
590
591
                $('form[name="f"]').on("submit", function(){
592
                    // Add the checkboxes to the DOM before we submit the form
593
                    var form = this;
594
                    var checkboxes = $(patron_table).find('input:checkbox:checked').serializeArray();
595
                    $.each(checkboxes, function(){
596
                        let borrowernumber = this.value;
597
                        if(!$(form).find('input[name="borrowernumber"][value="'+borrowernumber+'"]').length){
598
                            $(form).append(
599
                                $('<input>')
600
                                    .attr('type', 'hidden')
601
                                    .attr('name', 'borrowernumber')
602
                                    .val(borrowernumber)
603
                            );
604
                        }
605
                    });
606
                });
607
            }
608
609
            $("#patron_batchmod_form").on("submit", function(){
592
                /* Reset form fields on inactive tabs */
610
                /* Reset form fields on inactive tabs */
593
                var tab = $(this).find("ul.nav-tabs li a.active").attr("href");
611
                var tab = $(this).find("ul.nav-tabs li a.active").attr("href");
594
                if (tab == "#usecardnumber_panel") {
612
                if (tab == "#usecardnumber_panel") {
Lines 600-617 Link Here
600
                    $("#borrowernumberuploadfile, #cardnumberuploadfile, #borrowernumberlist, #cardnumberlist").val("");
618
                    $("#borrowernumberuploadfile, #cardnumberuploadfile, #borrowernumberlist, #cardnumberlist").val("");
601
                }
619
                }
602
            });
620
            });
603
604
            $('form[name="f"]').on("submit", function () {
605
                // Add the checkboxes to the DOM before we submit the form
606
                var form = this;
607
                var checkboxes = $(patron_table).find("input:checkbox:checked").serializeArray();
608
                $.each(checkboxes, function () {
609
                    let borrowernumber = this.value;
610
                    if (!$(form).find('input[name="borrowernumber"][value="' + borrowernumber + '"]').length) {
611
                        $(form).append($("<input>").attr("type", "hidden").attr("name", "borrowernumber").val(borrowernumber));
612
                    }
613
                });
614
            });
615
        });
621
        });
616
622
617
        function updateAttrValues(select_attr) {
623
        function updateAttrValues(select_attr) {
618
- 

Return to bug 41580