Bugzilla – Attachment 60614 Details for
Bug 12461
Add patron clubs feature
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12461 - Fix 'for=' and param issues
Bug-12461---Fix-for-and-param-issues.patch (text/plain), 7.07 KB, created by
Kyle M Hall (khall)
on 2017-02-23 14:54:51 UTC
(
hide
)
Description:
Bug 12461 - Fix 'for=' and param issues
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-02-23 14:54:51 UTC
Size:
7.07 KB
patch
obsolete
>From 4d7d68a57d1ad5ceefdf9770afbb3a10d0175dec Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 23 Feb 2017 14:15:27 +0000 >Subject: [PATCH] Bug 12461 - Fix 'for=' and param issues > >--- > clubs/clubs-add-modify.pl | 6 +++--- > clubs/patron-clubs-tab.pl | 10 +++++----- > clubs/templates-add-modify.pl | 20 ++++++++++---------- > .../prog/en/modules/circ/circulation.tt | 2 +- > .../prog/en/modules/clubs/templates-add-modify.tt | 6 +++--- > 5 files changed, 22 insertions(+), 22 deletions(-) > >diff --git a/clubs/clubs-add-modify.pl b/clubs/clubs-add-modify.pl >index 1775951..4376a30 100755 >--- a/clubs/clubs-add-modify.pl >+++ b/clubs/clubs-add-modify.pl >@@ -68,9 +68,9 @@ if ( $cgi->param('name') ) { # Update or create club > } > )->store(); > >- my @club_template_field_id = $cgi->param('club_template_field_id'); >- my @club_field_id = $cgi->param('club_field_id'); >- my @club_field = $cgi->param('club_field'); >+ my @club_template_field_id = $cgi->multi_param('club_template_field_id'); >+ my @club_field_id = $cgi->multi_param('club_field_id'); >+ my @club_field = $cgi->multi_param('club_field'); > > for ( my $i = 0 ; $i < @club_template_field_id ; $i++ ) { > my $club_template_field_id = $club_template_field_id[$i] || undef; >diff --git a/clubs/patron-clubs-tab.pl b/clubs/patron-clubs-tab.pl >index e9e2f8f..f50da65 100755 >--- a/clubs/patron-clubs-tab.pl >+++ b/clubs/patron-clubs-tab.pl >@@ -39,17 +39,17 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >-my $borrowernumber = $cgi->param('borrowernumber'); >+my $patronnumber = $cgi->param('borrowernumber'); > >-my $borrower = Koha::Patrons->find($borrowernumber); >+my $patron = Koha::Patrons->find($patronnumber); > >-my @enrollments = $borrower->get_club_enrollments(); >-my @clubs = $borrower->get_enrollable_clubs(); >+my @enrollments = $patron->get_club_enrollments(); >+my @clubs = $patron->get_enrollable_clubs(); > > $template->param( > enrollments => \@enrollments, > clubs => \@clubs, >- borrowernumber => $borrowernumber >+ borrowernumber => $patronnumber > ); > > output_html_with_http_headers( $cgi, $cookie, $template->output ); >diff --git a/clubs/templates-add-modify.pl b/clubs/templates-add-modify.pl >index a181359..f82ed85 100755 >--- a/clubs/templates-add-modify.pl >+++ b/clubs/templates-add-modify.pl >@@ -75,12 +75,12 @@ if ( $cgi->param('name') ) { # Update or create club > $id ||= $club_template->id(); > > # Update club creation fields >- my @field_id = $cgi->param('club_template_field_id'); >- my @field_name = $cgi->param('club_template_field_name'); >- my @field_description = $cgi->param('club_template_field_description'); >- my @field_authorised_value_category = $cgi->param('club_template_field_authorised_value_category'); >+ my @field_id = $cgi->multi_param('club_template_field_id'); >+ my @field_name = $cgi->multi_param('club_template_field_name'); >+ my @field_description = $cgi->multi_param('club_template_field_description'); >+ my @field_authorised_value_category = $cgi->multi_param('club_template_field_authorised_value_category'); > >- my @field_delete = $cgi->param('club_template_field_delete'); >+ my @field_delete = $cgi->multi_param('club_template_field_delete'); > > for ( my $i = 0 ; $i < @field_id ; $i++ ) { > my $field_id = $field_id[$i]; >@@ -109,12 +109,12 @@ if ( $cgi->param('name') ) { # Update or create club > } > > # Update club enrollment fields >- @field_id = $cgi->param('club_template_enrollment_field_id'); >- @field_name = $cgi->param('club_template_enrollment_field_name'); >- @field_description = $cgi->param('club_template_enrollment_field_description'); >- @field_authorised_value_category = $cgi->param('club_template_enrollment_field_authorised_value_category'); >+ @field_id = $cgi->multi_param('club_template_enrollment_field_id'); >+ @field_name = $cgi->multi_param('club_template_enrollment_field_name'); >+ @field_description = $cgi->multi_param('club_template_enrollment_field_description'); >+ @field_authorised_value_category = $cgi->multi_param('club_template_enrollment_field_authorised_value_category'); > >- @field_delete = $cgi->param('club_template_enrollment_field_delete'); >+ @field_delete = $cgi->multi_param('club_template_enrollment_field_delete'); > > for ( my $i = 0 ; $i < @field_id ; $i++ ) { > my $field_id = $field_id[$i]; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index cd43ffb..938355d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -956,7 +956,7 @@ No patron matched <span class="ex">[% message | html %]</span> > </div> > [% END %] > >-[% IF CAN_user_clubs %] >+[% IF CAN_user_clubs && ( enrollable || enrollments ) %] > <div id="clubs-tab"> > Loading... > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt >index f7d6a90..ba9189f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt >@@ -45,7 +45,7 @@ > </li> > > <li> >- <label for="name">Allow public enrollment:</label> >+ <label for="is_enrollable_from_opac">Allow public enrollment:</label> > [% IF club_template.is_enrollable_from_opac %] > <input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" /> > [% ELSE %] >@@ -55,7 +55,7 @@ > </li> > > <li> >- <label for="name">Require valid email address:</label> >+ <label for="is_email_required">Require valid email address:</label> > [% IF club_template.is_email_required %] > <input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" /> > [% ELSE %] >@@ -65,7 +65,7 @@ > </li> > > <li> >- <label for="name">Library:</label> >+ <label for="branchcode">Library:</label> > <select name="branchcode" id="club-template-branchcode"> > <option value=""> </option> > [% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %] >-- >2.1.4
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 12461
:
29105
|
30456
|
31567
|
35104
|
36098
|
36099
|
36192
|
38748
|
39181
|
43428
|
47821
|
47824
|
47825
|
47856
|
49110
|
49121
|
50422
|
50423
|
50426
|
50427
|
58818
|
58819
|
58820
|
59272
|
59273
|
60519
|
60520
|
60521
|
60610
|
60611
|
60612
|
60613
|
60614
|
60615
|
60616
|
60617
|
60618
|
60624
|
62778
|
62779
|
62813
|
62814
|
62815