diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
index 472d5d80ac..1708a7e0ec 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
@@ -588,15 +588,12 @@
'' + _("View") + ''
);
}
- if (aData['matched']) {
- $('td:eq(6)', nRow).html(
- ' ' + _("View") + ' '
- if (perms.CAN_user_editcatalogue_edit_catalogue){
- + ' ' + _("Edit") + ''
- }
- );
+ if (aData["matched"]) {
+ let buttons = ' ' + _("View") + " ";
+ if (permissions.CAN_user_editcatalogue_edit_catalogue) {
+ buttons += ' ' + _("Edit") + "";
+ }
+ $("td:eq(6)", nRow).html(buttons);
}
},
});
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
index 5cca9f84fe..de8d9c78ce 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
@@ -567,28 +567,46 @@
});
return false;
});
+
+ $('select[name="patron_attributes"]').change(function() {
+ updateAttrValues(this);
+ } );
+
+ $('select[name="patron_attributes"]').change();
+
+ $(".clear-date").on("click",function(e){
+ e.preventDefault();
+ var fieldID = this.id.replace("clear-date-","");
+ $("#" + fieldID).val("");
+ });
+ $("#cataloguing_additem_newitem").on("click",".add_attributes",function(e){
+ e.preventDefault();
+ add_attributes();
+ });
+ $("#cataloguing_additem_newitem").on("click",".del_attributes",function(e){
+ e.preventDefault();
+ del_attributes(this);
+ });
+
+ $('form[name="f"]').on("submit", function(){
+ // Add the checkboxes to the DOM before we submit the form
+ var form = this;
+ var checkboxes = $(patron_table).find('input:checkbox:checked').serializeArray();
+ $.each(checkboxes, function(){
+ let borrowernumber = this.value;
+ if(!$(form).find('input[name="borrowernumber"][value="'+borrowernumber+'"]').length){
+ $(form).append(
+ $('')
+ .attr('type', 'hidden')
+ .attr('name', 'borrowernumber')
+ .val(borrowernumber)
+ );
+ }
+ });
+ });
}
- $('select[name="patron_attributes"]').change(function () {
- updateAttrValues(this);
- });
-
- $('select[name="patron_attributes"]').change();
-
- $(".clear-date").on("click", function (e) {
- e.preventDefault();
- var fieldID = this.id.replace("clear-date-", "");
- $("#" + fieldID).val("");
- });
- $("#cataloguing_additem_newitem").on("click", ".add_attributes", function (e) {
- e.preventDefault();
- add_attributes();
- });
- $("#cataloguing_additem_newitem").on("click", ".del_attributes", function (e) {
- e.preventDefault();
- del_attributes(this);
- });
- $("#patron_batchmod_form").on("submit", function () {
+ $("#patron_batchmod_form").on("submit", function(){
/* Reset form fields on inactive tabs */
var tab = $(this).find("ul.nav-tabs li a.active").attr("href");
if (tab == "#usecardnumber_panel") {
@@ -600,18 +618,6 @@
$("#borrowernumberuploadfile, #cardnumberuploadfile, #borrowernumberlist, #cardnumberlist").val("");
}
});
-
- $('form[name="f"]').on("submit", function () {
- // Add the checkboxes to the DOM before we submit the form
- var form = this;
- var checkboxes = $(patron_table).find("input:checkbox:checked").serializeArray();
- $.each(checkboxes, function () {
- let borrowernumber = this.value;
- if (!$(form).find('input[name="borrowernumber"][value="' + borrowernumber + '"]').length) {
- $(form).append($("").attr("type", "hidden").attr("name", "borrowernumber").val(borrowernumber));
- }
- });
- });
});
function updateAttrValues(select_attr) {