From be856b105d9ebe06990c21eb0fde3c3a1de1b373 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 7 Jan 2022 22:31:35 +0000 Subject: [PATCH] Bug 29824: Allow editing of quick spine labels To test: 1. Apply patch 2. Go to the quick spine label tool and enter a barcode of an item with a itemcallnumber 3. Notice the 'Edit this label' button at the bottom of the page, click it 4. Edit the itemcallnumber in some way: add some line breaks, remove some, insert some new characters, remove some characters. 5. You can now print the label with your edits. Note: This changes nothing in the database, if you relaod the same item/itemcallnumer it will have returned to its original form --- .../prog/en/modules/labels/spinelabel-print.tt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt index 43ee65ea64..ae1838d6d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt @@ -26,6 +26,7 @@ [% END %] @@ -46,6 +47,12 @@ e.preventDefault(); window.close(); }); + $('.edit-label').click( function() { + $('#spinelabel').attr('contenteditable', function(index, attr){ + return attr == 'true' ? null : 'true'; + }); + $('.edit-label .fa').toggleClass('fa-lock').toggleClass('fa-unlock'); + }); }); -- 2.20.1