diff --git a/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl b/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl new file mode 100644 index 0000000000..ecfcb789c1 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23010_add_PreventWithdrawingItemsStatus.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "23010", + description => "Add new PreventWithDrawingItemsStatus system preference", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) + VALUES ('PreventWithDrawingItemsStatus',NULL,'','Prevent the withdrawing of items based on statuses','Choice') + } + ); + + say $out "Added new system preference 'PreventWithDrawingItemsStatus'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 09b8afd6fd..eaccc4829a 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -645,6 +645,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PreservationNotForLoanDefaultTrainIn', '', '', 'Not for loan to apply to items removed from the preservation waiting list', 'TextArea'), ('PreservationNotForLoanWaitingListIn', '', '', 'Not for loan to apply to items added to the preservation waiting list', 'TextArea'), ('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'), +('PreventWithdrawingItemsStatus', '1', '', 'Prevent the withdrawing of items based on certain statuses' , 'multiple'), ('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'), ('PrintNoticesMaxLines','0','','If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.','Integer'), ('PrivacyPolicyConsent','','Enforced|Permissive|Disabled','Data privacy policy consent in the OPAC', 'Choice'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 9719f3c87e..9cd73cfe85 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -677,6 +677,13 @@ Circulation: 1: Block 0: "Don't block" - returning of items that have been withdrawn. + - + - "Prevent the ability to withdraw items with the following statuses:" + - pref: PreventWithdrawingItemsStatus + multiple: + intransit: In-transit + checkedout: Checked out + - - - pref: BlockReturnOfLostItems choices: @@ -1527,4 +1534,4 @@ Circulation: choices: 1: Enable 0: Disable - - "the curbside pickup module." + - "the curbside pickup module." \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js index 065d400e34..5336f87f67 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js +++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js @@ -4,6 +4,9 @@ var browser = KOHA.browser(searchid, parseInt(biblionumber, 10)); browser.show(); $(document).ready(function () { + $( + '#cataloguing_additem_newitem #f[action^="/cgi-bin/koha/cataloguing/additem.pl"]' + ); // Remove the onclick event defined in browser.js, // otherwise the deletion confirmation will not work correctly $('a[href*="biblionumber="]').off("click");