Bug 31095: Remove GetDebarments from members/moremember.pl
This patch removes the use of GetDebarments from members/moremember.pl and replaces template references with patrons.restrictions and the new includes introduced in the prior patch Test plan 1. Confirm that the 'Restrictions (x)' tab still appears on the patron details page. 2. Confirm that the 'Restrictions (x)' tab count is correct 3. Confirm that the 'Restrictions (x)' tab table functions 4. Confirm that the 'Restrictions (x)' tab 'Add manual restriction' form works as expected Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
2a9ad26912
commit
efd9ed271c
|
|
@ -713,7 +713,7 @@
|
|||
[% END %]
|
||||
|
||||
<li role="presentation">
|
||||
<a id="debarments-tab-link" href="#reldebarments" aria-controls="reldebarments" role="tab" data-toggle="tab">Restrictions ([% debarments.size || 0 | html %])</a>
|
||||
<a id="debarments-tab-link" href="#reldebarments" aria-controls="reldebarments" role="tab" data-toggle="tab">Restrictions ([% patron.restrictions.count | html %])</a>
|
||||
</li>
|
||||
|
||||
[% SET enrollments = patron.get_club_enrollments %]
|
||||
|
|
@ -748,7 +748,7 @@
|
|||
</div>
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE borrower_debarments.inc %]
|
||||
[% INCLUDE 'patron-restrictions-tab.inc' %]
|
||||
|
||||
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
|
||||
<div id="reserves" role="tabpanel" class="tab-pane">
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ use C4::Form::MessagingPreferences;
|
|||
use List::MoreUtils qw( uniq );
|
||||
use Scalar::Util qw( looks_like_number );
|
||||
use Koha::Patron::Attribute::Types;
|
||||
use Koha::Patron::Debarments qw( GetDebarments );
|
||||
use Koha::Patron::Restriction::Types;
|
||||
use Koha::Patron::Messages;
|
||||
use Koha::CsvProfiles;
|
||||
|
|
@ -81,12 +80,11 @@ for (qw(gonenoaddress lost borrowernotes is_debarred)) {
|
|||
}
|
||||
|
||||
$template->param(
|
||||
restriction_types => scalar Koha::Patron::Restriction::Types->keyed_on_code()
|
||||
restriction_types => scalar Koha::Patron::Restriction::Types->search()
|
||||
);
|
||||
|
||||
if ( $patron->is_debarred ) {
|
||||
$template->param(
|
||||
'debarments' => scalar GetDebarments({ borrowernumber => $borrowernumber }),
|
||||
'userdebarred' => $patron->debarred,
|
||||
'debarredcomment' => $patron->debarredcomment,
|
||||
);
|
||||
|
|
@ -281,7 +279,6 @@ $template->param(
|
|||
relatives_borrowernumbers => \@relatives,
|
||||
logged_in_user => $logged_in_user,
|
||||
files => Koha::Patron::Files->new( borrowernumber => $borrowernumber ) ->GetFilesInfo(),
|
||||
#debarments => scalar GetDebarments({ borrowernumber => $borrowernumber }),
|
||||
has_modifications => $has_modifications,
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue