Bugzilla – Attachment 135524 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.01 KB, created by
Jonathan Druart
on 2022-06-01 08:10:50 UTC
(
hide
)
Description:
Bug 30874: Replace categoryname
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-06-01 08:10:50 UTC
Size:
3.01 KB
patch
obsolete
>From 620ba58375e29b02effee1ec00753c1dfd3f72f4 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 e61ae4f6889..78bee54ae19 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 %] > Modify patron > [% END %] >- [% IF categoryname %] >- ([% categoryname | html %]) >+ [% IF patron_category %] >+ ([% patron_category.description | html %]) > [% END %] > </a> > </li> >@@ -118,7 +118,7 @@ legend:hover { > Modify patron > [% 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 bc27732c371..3b93a801a30 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