diff --git a/code/web/interface/themes/responsive/MyAccount/readingHistoryEntry.tpl b/code/web/interface/themes/responsive/MyAccount/readingHistoryEntry.tpl
index c711f5eafd6..f8bee590fde 100644
--- a/code/web/interface/themes/responsive/MyAccount/readingHistoryEntry.tpl
+++ b/code/web/interface/themes/responsive/MyAccount/readingHistoryEntry.tpl
@@ -184,38 +184,50 @@
{$detail.checkOutDate|escape}
{/if}
-
- {assign var="displayDate" value=$detail.checkInDate}
- {if !empty($detail.editedCheckInDate)}
- {assign var="displayDate" value=$detail.editedCheckInDate}
- {/if}
- {if empty($detail.checkInDate) && empty($detail.editedCheckInDate)}
-
- {translate text="Currently Checked Out" isPublicFacing=true}
-
-
- {elseif $detail.checkInDate == -1 && empty($detail.editedCheckInDate)}
-
-
- {translate text="Unknown" isPublicFacing=true}
+ {if empty($disallowReturnDateEdits)}
+ {* Editable version *}
+
+ {if empty($detail.checkInDate) && empty($detail.editedCheckInDate)}
+
+ {translate text="Currently Checked Out" isPublicFacing=true}
-
- {else}
-
-
-
- {if is_numeric($displayDate)}
- {$displayDate|date_format:"%b %d, %Y"}
- {else}
- {$displayDate|escape}
- {/if}
-
-
+ {elseif $detail.checkInDate == -1 && empty($detail.editedCheckInDate)}
+
-
- {/if}
- |
+ {else}
+
+
+
+ {if is_numeric($displayDate)}
+ {$displayDate|date_format:"%b %d, %Y"}
+ {else}
+ {$displayDate|escape}
+ {/if}
+
+
+
+
+ {/if}
+ |
+ {else}
+ {* Read-only version *}
+
+ {if empty($detail.checkInDate) && empty($detail.editedCheckInDate)}
+ {translate text="Currently Checked Out" isPublicFacing=true}
+ {elseif $detail.checkInDate == -1 && empty($detail.editedCheckInDate)}
+ {translate text="Unknown" isPublicFacing=true}
+ {elseif is_numeric($displayDate)}
+ {$displayDate|date_format:"%b %d, %Y"}
+ {else}
+ {$displayDate|escape}
+ {/if}
+ |
+ {/if}
{if !empty($detail.format)}
{$detail.format|replace:',':', '}
diff --git a/code/web/interface/themes/responsive/MyAccount/readingHistoryList.tpl b/code/web/interface/themes/responsive/MyAccount/readingHistoryList.tpl
index b8aeb42d300..42601a4681a 100644
--- a/code/web/interface/themes/responsive/MyAccount/readingHistoryList.tpl
+++ b/code/web/interface/themes/responsive/MyAccount/readingHistoryList.tpl
@@ -116,5 +116,7 @@
diff --git a/code/web/release_notes/26.11.00/DIS-2978.yaml b/code/web/release_notes/26.11.00/DIS-2978.yaml
new file mode 100644
index 00000000000..c45dd961916
--- /dev/null
+++ b/code/web/release_notes/26.11.00/DIS-2978.yaml
@@ -0,0 +1,13 @@
+Jira: DIS-2827
+Type: Enhancement
+Developer: Kodi Lein (KL)
+Contributing Org: Grove For Libraries
+Sponsor: OCLS
+GroveRelease: 26.11.00
+CommunityRelease: 26.12.00
+Component: Reading History
+Description:
+ - Add option to disallow editing of reading history return dates.
+New Settings:
+ - Library Systems > ILS/Account Integration > Reading History > Disallow Editing of Return Dates
+New Permissions:
\ No newline at end of file
diff --git a/code/web/services/MyAccount/AJAX.php b/code/web/services/MyAccount/AJAX.php
index 8170cf57b7f..4c237d69309 100644
--- a/code/web/services/MyAccount/AJAX.php
+++ b/code/web/services/MyAccount/AJAX.php
@@ -4781,6 +4781,7 @@ public function getReadingHistory() : array {
$interface->assign('library', $patronHomeLibrary);
$result['showCostSavings'] = $patronHomeLibrary->enableCostSavings && $patron->enableCostSavings;
$result['costSavingsMessage'] = $user->getTotalCostSavingsMessage(true);
+ $interface->assign('disallowReturnDateEdits', $patronHomeLibrary->disallowReturnDateEdits);
$result['success'] = true;
$result['message'] = "";
diff --git a/code/web/sys/DBMaintenance/version_updates/26.11.00.php b/code/web/sys/DBMaintenance/version_updates/26.11.00.php
new file mode 100644
index 00000000000..daa1b3ffc08
--- /dev/null
+++ b/code/web/sys/DBMaintenance/version_updates/26.11.00.php
@@ -0,0 +1,55 @@
+ [
+ 'title' => '',
+ 'description' => '',
+ 'continueOnError' => false,
+ 'sql' => [
+ ''
+ ]
+ ], //name*/
+
+ //mark n
+
+ //kirstien
+
+ //kodi
+ 'disallow_reading_history_return_date_edits' => [
+ 'title' => 'Disallow reading history return date edits',
+ 'description' => 'Add setting to library table for disallowing editing of return dates in reading history.',
+ 'continueOnError' => false,
+ 'sql' => [
+ "ALTER TABLE library ADD COLUMN disallowReturnDateEdits TINYINT(1) NOT NULL DEFAULT 0"
+ ]
+ ], //disallow_reading_history_return_date_edits
+
+ //yanjun
+
+ //imani
+
+ //galen
+
+ //chloe
+
+ //pedro
+
+ //mark j
+
+ //lucas
+
+ //tomas
+
+ // stephen
+
+ //jacob - OpenFifth
+
+ //kyle - ByWater
+
+ ];
+}
diff --git a/code/web/sys/LibraryLocation/Library.php b/code/web/sys/LibraryLocation/Library.php
index a4681abe6f8..6529cce18de 100644
--- a/code/web/sys/LibraryLocation/Library.php
+++ b/code/web/sys/LibraryLocation/Library.php
@@ -214,6 +214,7 @@ class Library extends DataObject {
$displayCallNumberInCheckoutHistory;
public /** @noinspection PhpUnused */
$displayVolumeInCheckoutHistory;
+ public $disallowReturnDateEdits;
public $alwaysDisplayRenewalCount;
public $allowRenewingOutOfHoldGroupCheckouts;
@@ -3134,6 +3135,15 @@ static function getObjectStructure(string $context = ''): array {
'permissions' => ['Library ILS Connection'],
'relatedIls' => ['evergreen', 'koha'],
],
+ 'disallowReturnDateEdits' => [
+ 'property' => 'disallowReturnDateEdits',
+ 'type' => 'checkbox',
+ 'label' => 'Disallow Editing of Return Dates',
+ 'description' => 'Whether users can edit the return date of titles in their reading history within Aspen.',
+ 'hideInLists' => true,
+ 'default' => 0,
+ 'permissions' => ['Library ILS Options'],
+ ],
'forceReadingHistoryOptIn' => [
'property' => 'forceReadingHistoryOptIn',
'type' => 'checkbox',
|