From a9d4fd957a75bcdd254fa42bd1dc7cab7086f376 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Tue, 7 Jun 2022 23:48:42 +1200 Subject: [PATCH] Bug 30931: (alternate) Display a hint in item editor that the dateaccessioned will be filled with current date if left blank This hint WILL show when: - Adding a new item - Receiving a serial issue This hint WILL NOT show when: - Batch modifying items - Editing existing items Test plan: 1. Apply patch 2. Add an item to a biblio record. Notice there is a hint message for the 952$d (date acquired) subfield. 3. Edit an existing item. Notice there is no hint message displaying for the 952$d subfield. 4. Batch modify an item by submitting an item barcode into Tools > Batch item modification. Notice no hint message is displayed for the 952$d subfield. 5. Receive a serial (The subscription must be setup to create an item upon receival to test this). 6. Notice there is a hint message displaying for the 952$d (Date acquired) subfield in both the main issue you are receiving and the supplemental issue form as well Sponsored-by: Catalyst IT --- koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc | 7 +++++-- .../intranet-tmpl/prog/en/modules/serials/serials-edit.tt | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc index a991f0ce50..dce4b8e32e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -198,8 +198,11 @@ [% END %] - - + [% IF (subfield.kohafield == 'items.dateaccessioned' && op == "additem") %] + Today's date will be saved in this field if you leave it blank.[% del %] + [% ELSE %] + + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index d1b93145f4..99ec118225 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -270,6 +270,7 @@ $(document).ready(function() { [% END %] [% IF ( iteminformatio.mandatory ) %] Required[% END %] + [% IF iteminformatio.kohafield == 'items.dateaccessioned' %] Today's date will be saved in this field if you leave it blank.[% END %] [% END %] @@ -422,6 +423,8 @@ $(document).ready(function() { [% END %] [% IF ( iteminformatio.mandatory ) %] Required[% END %] + [% IF iteminformatio.kohafield == 'items.dateaccessioned' %] Today's date will be saved in this field if you leave it blank.[% END %] + [% END %] -- 2.20.1