Bug 32373: Show patron restriction date
This is a rebased submission following bug 31095 which removed the use of GetDebarments. This patch now uses $patron->restrictions to find the date and pass it to the template Test plan: 1) Create a restriction on a patron and navigate to that patron in Checkouts or the patron details page 2) There should be a message with details about the restriction but the creation date of the restriction won't be included in the message 3) Apply patch 4) The message should now say "Restricted since DATE" as in the screenshot attached. 5) Change the 'dateformat' syspref and refresh, the date should change to reflect the syspref Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
508ad15cb7
commit
561dac9335
3 changed files with 3 additions and 1 deletions
|
@ -269,6 +269,7 @@ if ($patron) {
|
|||
$template->param(
|
||||
'userdebarred' => $patron->debarred,
|
||||
'debarredcomment' => $patron->debarredcomment,
|
||||
'debarredsince' => $patron->restrictions->search()->single->created,
|
||||
);
|
||||
|
||||
if ( $patron->debarred ne "9999-12-31" ) {
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
[% IF ( userdebarred ) %]
|
||||
<li class="userdebarred blocker">
|
||||
<span class="circ-hlt"> Restricted:</span> Patron's account is restricted
|
||||
<span class="circ-hlt"> Restricted since [% debarredsince | $KohaDates %]:</span> Patron's account is restricted
|
||||
|
||||
[% IF ( userdebarreddate ) %]
|
||||
until [% userdebarreddate | $KohaDates %]
|
||||
|
|
|
@ -87,6 +87,7 @@ if ( $patron->is_debarred ) {
|
|||
$template->param(
|
||||
'userdebarred' => $patron->debarred,
|
||||
'debarredcomment' => $patron->debarredcomment,
|
||||
'debarredsince' => $patron->restrictions->search()->single->created,
|
||||
);
|
||||
|
||||
if ( $patron->debarred ne "9999-12-31" ) {
|
||||
|
|
Loading…
Reference in a new issue