Bugzilla – Attachment 48377 Details for
Bug 14659
Allow patrons to enter card number and patron category on OPAC registration page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14659: (QA followup) switch to using Koha::Patron::Categories
Bug-14659-QA-followup-switch-to-using-KohaPatronCa.patch (text/plain), 3.33 KB, created by
Jesse Weaver
on 2016-02-25 21:40:32 UTC
(
hide
)
Description:
Bug 14659: (QA followup) switch to using Koha::Patron::Categories
Filename:
MIME Type:
Creator:
Jesse Weaver
Created:
2016-02-25 21:40:32 UTC
Size:
3.33 KB
patch
obsolete
>From 7c8723fc69b8d107770e925bbc30cfaf63c4648e Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <jweaver@bywatersolutions.com> >Date: Thu, 25 Feb 2016 14:36:04 -0700 >Subject: [PATCH] Bug 14659: (QA followup) switch to using > Koha::Patron::Categories > >Also, fix a nonsensically switched IF/ELSE. >--- > Koha/Template/Plugin/Categories.pm | 7 ++----- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 8 ++++---- > 2 files changed, 6 insertions(+), 9 deletions(-) > >diff --git a/Koha/Template/Plugin/Categories.pm b/Koha/Template/Plugin/Categories.pm >index fe8b0d7..acd94fb 100644 >--- a/Koha/Template/Plugin/Categories.pm >+++ b/Koha/Template/Plugin/Categories.pm >@@ -21,15 +21,12 @@ use Template::Plugin; > use base qw( Template::Plugin ); > > use C4::Category; >-use Koha::Database; >+use Koha::Patron::Categories; > > sub GetName { > my ( $self, $categorycode ) = @_; > >- my $schema = Koha::Database->new->schema; >- return $schema->resultset( 'Category' )->search( { >- categorycode => $categorycode, >- } )->get_column( 'description' )->next // ''; >+ return Koha::Patron::Categories->find( $categorycode )->description; > } > > sub all { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index a3d152b..a2d0315 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -128,10 +128,10 @@ > Library card number: > </label> > [% IF borrower %] >+ [% borrower.cardnumber %] >+ [% ELSE %] > <input type="text" id="borrower_cardnumber" name="borrower_cardnumber" value="[% borrower.cardnumber %]" /> > [% IF mandatory.defined('cardnumber') %]<span class="required">Required</span>[% END %] >- [% ELSE %] >- [% borrower.cardnumber %] > [% END %] > </li> > [% END %] >@@ -170,6 +170,8 @@ > Category:</label> > > [% IF borrower %] >+ [% Categories.GetName( borrower.categorycode ) %] >+ [% ELSE %] > <select id="borrower_categorycode" name="borrower_categorycode"> > [% FOREACH c IN Categories.all() %] > [% IF c.categorycode == Koha.Preference('PatronSelfRegistrationDefaultCategory') %] >@@ -179,8 +181,6 @@ > [% END %] > [% END %] > </select> >- [% ELSE %] >- [% Categories.GetName( borrower.categorycode ) %] > [% END %] > </li> > [% END %] >-- >2.7.0
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 14659
:
42252
|
43042
|
48376
|
48377
|
48480
|
48505
|
48506
|
48507