From 2be4212474323600cf544e014da0e96d0a564c8b Mon Sep 17 00:00:00 2001 From: Moses Hall Date: Wed, 10 Apr 2024 16:16:28 -0400 Subject: [PATCH] Fix issue with Commonwealth interface not allowing date entry for date type 'r' with unknown original date. - Add "(unknown)" scenario to metadata display - Expand logic to use "not one" instead of "equals two" as criterion for actual pub date entry. --- cgi/CRMS.pm | 2 +- cgi/partial/ADDForm.tt | 6 +++--- cgi/partial/bibdata_commonwealth.tt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cgi/CRMS.pm b/cgi/CRMS.pm index 4759c10e..ea52ef09 100755 --- a/cgi/CRMS.pm +++ b/cgi/CRMS.pm @@ -66,7 +66,7 @@ sub new return $self; } -our $VERSION = '8.6'; +our $VERSION = '8.6.1'; sub Version { return $VERSION; diff --git a/cgi/partial/ADDForm.tt b/cgi/partial/ADDForm.tt index d3f9797d..7cb50f37 100644 --- a/cgi/partial/ADDForm.tt +++ b/cgi/partial/ADDForm.tt @@ -37,9 +37,9 @@ - + [% display = "table-row" %] - [% IF u_pub || data.bibdata.extracted_dates.size != 2 %] + [% IF u_pub || data.bibdata.extracted_dates.size == 1 %] [% display = "none" %] [% END %] @@ -293,7 +293,7 @@ function toggleADD() { addField.value = actualField.value; } } else { - if (gReviewData.bibdata.extracted_dates.length > 1) { + if (gReviewData.bibdata.extracted_dates.size != 1) { actualPubDateRow.style.display = "table-row"; } } diff --git a/cgi/partial/bibdata_commonwealth.tt b/cgi/partial/bibdata_commonwealth.tt index f5da7a95..9fd1c8c3 100644 --- a/cgi/partial/bibdata_commonwealth.tt +++ b/cgi/partial/bibdata_commonwealth.tt @@ -5,8 +5,8 @@ Pub Date: 1 %]class="red"[% END %]> - [% data.bibdata.display_date %] + [% IF data.bibdata.extracted_dates.size != 1 %]class="red"[% END %]> + [% data.bibdata.display_date || '(unknown)' %]