Bugzilla – Attachment 89851 Details for
Bug 22928
"Update child to adult patron" link no longer displayed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link
Bug-22928-bug-20226-follow-up-Fix-display-of-Updat.patch (text/plain), 2.40 KB, created by
Jonathan Druart
on 2019-05-16 14:45:45 UTC
(
hide
)
Description:
Bug 22928: (bug 20226 follow-up) Fix display of 'Update child to adult' link
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-16 14:45:45 UTC
Size:
2.40 KB
patch
obsolete
>From 2a8796c65ae43f7abe923a29adbaacfdb581d8b4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 16 May 2019 09:42:32 -0500 >Subject: [PATCH] Bug 22928: (bug 20226 follow-up) Fix display of 'Update child > to adult' link > >Looks like it is caused by bug 20226, however I am pretty sure it works when I wrote the patch. > >[% IF Categories.scalar.all(category_type => 'A').count > 0 %] > >is always wrong. > >It must be, either: > [% IF Categories.all(category_type => 'A').size > 0 %] >or > [% SET adult_categories = Categories.scalar.all(category_type => 'A') %] > [% IF adult_categories.count > 0 %] > >In the first case we are getting an array whereas in the later, a >Koha::Patrons which is preferable. > >Test plan (from 20226): >- Remove all your adult categories (categories.category_type='A') >- Create a patron with a child category >- Try to update to adult category >=> The entry does no longer appears! (This is a change in the behaviour) >- Create one adult category >- Update to adult category >=> There is a JS confirmation message, if you accept the patron will >be updated to the adult category >- Create (at least) another adult category >- Create another child >- Update to adult category >=> No more confirmation message but a popup to select the adult category >- Pick one >=> The patron has been updated to the adult category >--- > koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index a86c976846..1ab510c5b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -75,7 +75,8 @@ > [% ELSE %] > <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to delete patrons" id="deletepatron" href="#">Delete</a></li> > [% END %] >- [% IF Categories.scalar.all(category_type => 'A').count > 0 %] >+ [% SET adult_categories = Categories.scalar.all(category_type => 'A') %] >+ [% IF adult_categories.count > 0 %] > [% IF patron.is_child %] > <li><a id="updatechild" href="#">Update child to adult patron</a></li> > [% ELSE %] >-- >2.11.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 22928
:
89851
|
89862
|
89866
|
89867
|
89899
|
89900