Bugzilla – Attachment 138443 Details for
Bug 30874
Simplify patron category handling in memberentry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30874: Replace categoryname
Bug-30874-Replace-categoryname.patch (text/plain), 3.04 KB, created by
Jonathan Druart
on 2022-08-01 07:47:21 UTC
(
hide
)
Description:
Bug 30874: Replace categoryname
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-08-01 07:47:21 UTC
Size:
3.04 KB
patch
obsolete
>From 66b35bd287ff10b8c3fc86a1c933f322d97c0ddd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 Jun 2022 09:54:25 +0200 >Subject: [PATCH] Bug 30874: Replace categoryname > >--- > .../prog/en/modules/members/memberentrygen.tt | 8 ++++---- > members/memberentry.pl | 10 +++++----- > 2 files changed, 9 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index c5f17cb6f0c..bdf59c87d3a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -20,7 +20,7 @@ > Modify patron > [% END %] > [% INCLUDE 'patron-title.inc' no_html = 1 %] >- [% IF categoryname %]([% categoryname | html %])[% END %] >+ [% IF patron_category %]([% patron_category.description | html %])[% END %] > [% END %] › Patrons › Koha > </title> > <style> >@@ -65,8 +65,8 @@ legend:hover { > [% ELSE %] > <span>Modify patron</span> > [% END %] >- [% IF categoryname %] >- ([% categoryname | html %]) >+ [% IF patron_category %] >+ ([% patron_category.description | html %]) > [% END %] > </a> > </li> >@@ -118,7 +118,7 @@ legend:hover { > <span>Modify patron</span> > [% END %] > [% INCLUDE 'patron-title.inc' %] >- [% IF categoryname %]([% categoryname | html %])[% END %] >+ [% IF patron_category %]([% patron_category.description | html %])[% END %] > </h1> > > [% IF quickadd && opadd && !check_member %] >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 23575272aa8..f849986a63d 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -177,11 +177,11 @@ if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' ) { > > my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; > my $category_type = $input->param('category_type') || ''; >-unless ($category_type or !($categorycode)){ >- my $borrowercategory = Koha::Patron::Categories->find($categorycode); >- $category_type = $borrowercategory->category_type; >- my $category_name = $borrowercategory->description; >- $template->param("categoryname"=>$category_name); >+my $category; >+if ( !$category_type && $categorycode ) { >+ $category = Koha::Patron::Categories->find($categorycode); >+ $category_type = $category->category_type; >+ $template->param( patron_category => $category ); > } > $category_type="A" unless $category_type; # FIXME we should display a error message instead of a 500 error ! > >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30874
:
135524
|
135525
|
135526
|
135527
|
135528
|
135529
|
138443
|
138444
|
138445
|
138446
|
138447
|
138545
|
138546
|
138547
|
138548
|
138549
|
138637
|
138638
|
138639
|
138640
|
138641