Bugzilla – Attachment 168986 Details for
Bug 28924
Allow checkout fine limit to be determined by patron category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28924: Add new columns to UI and controller
Bug-28924-Add-new-columns-to-UI-and-controller.patch (text/plain), 12.15 KB, created by
Matt Blenkinsop
on 2024-07-15 14:22:25 UTC
(
hide
)
Description:
Bug 28924: Add new columns to UI and controller
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-07-15 14:22:25 UTC
Size:
12.15 KB
patch
obsolete
>From 05bd295d7126d97c70d19ff7c26561e3e5aff15f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Mon, 15 Jul 2024 14:17:40 +0000 >Subject: [PATCH] Bug 28924: Add new columns to UI and controller > >This patch adds the columns in the table and also updates the controller to allow these fields to be updated in the database from the UI form > >Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > admin/categories.pl | 101 ++++++++++-------- > .../prog/en/modules/admin/categories.tt | 30 ++++++ > 2 files changed, 86 insertions(+), 45 deletions(-) > >diff --git a/admin/categories.pl b/admin/categories.pl >index c89fce0fbaf..7f98c6c3382 100755 >--- a/admin/categories.pl >+++ b/admin/categories.pl >@@ -57,28 +57,31 @@ if ( $op eq 'add_form' ) { > } > } > elsif ( $op eq 'cud-add_validate' ) { >+ my $categorycode = $input->param('categorycode'); >+ my $description = $input->param('description'); >+ my $enrolmentperiod = $input->param('enrolmentperiod'); >+ my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef; >+ my $password_expiry_days = $input->param('password_expiry_days') || undef; >+ my $upperagelimit = $input->param('upperagelimit'); >+ my $dateofbirthrequired = $input->param('dateofbirthrequired'); >+ my $enrolmentfee = $input->param('enrolmentfee'); >+ my $reservefee = $input->param('reservefee'); >+ my $hidelostitems = $input->param('hidelostitems'); >+ my $overduenoticerequired = $input->param('overduenoticerequired'); >+ my $category_type = $input->param('category_type'); >+ my $BlockExpiredPatronOpacActions = join( ',', $input->multi_param('BlockExpiredPatronOpacActions') ); >+ my $checkPrevCheckout = $input->param('checkprevcheckout'); >+ my $can_place_ill_in_opac = $input->param('can_place_ill_in_opac') // 1; >+ my $default_privacy = $input->param('default_privacy'); >+ my $reset_password = $input->param('reset_password'); >+ my $change_password = $input->param('cud-change_password'); >+ my $exclude_from_local_holds_priority = $input->param('exclude_from_local_holds_priority'); >+ my $min_password_length = $input->param('min_password_length'); >+ my $require_strong_password = $input->param('require_strong_password'); >+ my $noissuescharge = $input->param('noissuescharge') || undef; >+ my $noissueschargeguarantees = $input->param('noissueschargeguarantees') || undef; >+ my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef; > >- my $categorycode = $input->param('categorycode'); >- my $description = $input->param('description'); >- my $enrolmentperiod = $input->param('enrolmentperiod'); >- my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef; >- my $password_expiry_days = $input->param('password_expiry_days') || undef; >- my $upperagelimit = $input->param('upperagelimit'); >- my $dateofbirthrequired = $input->param('dateofbirthrequired'); >- my $enrolmentfee = $input->param('enrolmentfee'); >- my $reservefee = $input->param('reservefee'); >- my $hidelostitems = $input->param('hidelostitems'); >- my $overduenoticerequired = $input->param('overduenoticerequired'); >- my $category_type = $input->param('category_type'); >- my $BlockExpiredPatronOpacActions = join( ',', $input->multi_param('BlockExpiredPatronOpacActions') ); >- my $checkPrevCheckout = $input->param('checkprevcheckout'); >- my $can_place_ill_in_opac = $input->param('can_place_ill_in_opac') // 1; >- my $default_privacy = $input->param('default_privacy'); >- my $reset_password = $input->param('reset_password'); >- my $change_password = $input->param('cud-change_password'); >- my $exclude_from_local_holds_priority = $input->param('exclude_from_local_holds_priority'); >- my $min_password_length = $input->param('min_password_length'); >- my $require_strong_password = $input->param('require_strong_password'); > my @branches = grep { $_ ne q{} } $input->multi_param('branches'); > my $can_be_guarantee = $input->param('can_be_guarantee'); > >@@ -113,6 +116,9 @@ elsif ( $op eq 'cud-add_validate' ) { > $category->exclude_from_local_holds_priority($exclude_from_local_holds_priority); > $category->min_password_length($min_password_length); > $category->require_strong_password($require_strong_password); >+ $category->noissuescharge($noissuescharge); >+ $category->noissueschargeguarantees($noissueschargeguarantees); >+ $category->noissueschargeguarantorswithguarantees($noissueschargeguarantorswithguarantees); > eval { > $category->store; > $category->replace_library_limits( \@branches ); >@@ -124,30 +130,35 @@ elsif ( $op eq 'cud-add_validate' ) { > } > } > else { >- my $category = Koha::Patron::Category->new({ >- categorycode => $categorycode, >- description => $description, >- enrolmentperiod => $enrolmentperiod, >- enrolmentperioddate => $enrolmentperioddate, >- password_expiry_days => $password_expiry_days, >- upperagelimit => $upperagelimit, >- dateofbirthrequired => $dateofbirthrequired, >- enrolmentfee => $enrolmentfee, >- reservefee => $reservefee, >- hidelostitems => $hidelostitems, >- overduenoticerequired => $overduenoticerequired, >- category_type => $category_type, >- can_be_guarantee => $can_be_guarantee, >- BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions, >- checkprevcheckout => $checkPrevCheckout, >- can_place_ill_in_opac => $can_place_ill_in_opac, >- default_privacy => $default_privacy, >- reset_password => $reset_password, >- change_password => $change_password, >- exclude_from_local_holds_priority => $exclude_from_local_holds_priority, >- min_password_length => $min_password_length, >- require_strong_password => $require_strong_password, >- }); >+ my $category = Koha::Patron::Category->new( >+ { >+ categorycode => $categorycode, >+ description => $description, >+ enrolmentperiod => $enrolmentperiod, >+ enrolmentperioddate => $enrolmentperioddate, >+ password_expiry_days => $password_expiry_days, >+ upperagelimit => $upperagelimit, >+ dateofbirthrequired => $dateofbirthrequired, >+ enrolmentfee => $enrolmentfee, >+ reservefee => $reservefee, >+ hidelostitems => $hidelostitems, >+ overduenoticerequired => $overduenoticerequired, >+ category_type => $category_type, >+ can_be_guarantee => $can_be_guarantee, >+ BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions, >+ checkprevcheckout => $checkPrevCheckout, >+ can_place_ill_in_opac => $can_place_ill_in_opac, >+ default_privacy => $default_privacy, >+ reset_password => $reset_password, >+ change_password => $change_password, >+ exclude_from_local_holds_priority => $exclude_from_local_holds_priority, >+ min_password_length => $min_password_length, >+ require_strong_password => $require_strong_password, >+ noissuescharge => $noissuescharge, >+ noissueschargeguarantees => $noissueschargeguarantees, >+ noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees, >+ } >+ ); > eval { > $category->store; > $category->replace_library_limits( \@branches ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >index 5f6b18fe8be..89fa8070ef2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -445,6 +445,18 @@ > </select> > <div class="hint">If <i>Yes</i>, holds placed by patrons of this category will not be given priority</div> > </li> >+ <li> >+ <label for="noissuescharge">No issues charge: </label> >+ <input type="text" name="noissuescharge" id="noissuescharge" value="[% category.noissuescharge | html %]" size="3" maxlength="3" /> >+ </li> >+ <li> >+ <label for="noissueschargeguarantees">No issues charge guarantees: </label> >+ <input type="text" name="noissueschargeguarantees" id="noissueschargeguarantees" value="[% category.noissueschargeguarantees | html %]" size="3" maxlength="3" /> >+ </li> >+ <li> >+ <label for="noissueschargeguarantorswithguarantees">No issues charge guarantors with guarantees: </label> >+ <input type="text" name="noissueschargeguarantorswithguarantees" id="noissueschargeguarantorswithguarantees" value="[% category.noissueschargeguarantorswithguarantees | html %]" size="3" maxlength="3" /> >+ </li> > </ol> > </fieldset> > >@@ -590,6 +602,9 @@ > <th scope="col">Can be guarantee</th> > <th scope="col">Default privacy</th> > <th scope="col">Exclude from local holds priority</th> >+ <th scope="col">No issues charge</th> >+ <th scope="col">No issues charge guarantees</th> >+ <th scope="col">No issues charge guarantors with guarantees</th> > <th scope="col">Actions</th> > </tr> > </thead> >@@ -727,6 +742,21 @@ > <span>No</span> > [% END %] > </td> >+ [% IF (category.noissuescharge) %] >+ <td>[% category.noissuescharge | html %]</td> >+ [% ELSE %] >+ <td>0.00</td> >+ [% END %] >+ [% IF (category.noissueschargeguarantees) %] >+ <td>[% category.noissueschargeguarantees | html %]</td> >+ [% ELSE %] >+ <td>0.00</td> >+ [% END %] >+ [% IF (category.noissueschargeguarantorswithguarantees) %] >+ <td>[% category.noissueschargeguarantorswithguarantees | html %]</td> >+ [% ELSE %] >+ <td>0.00</td> >+ [% END %] > <td class="actions"> > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=add_form&categorycode=[% category.categorycode |uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/categories.pl?op=delete_confirm&categorycode=[% category.categorycode |uri %]"><i class="fa fa-trash-can"></i> Delete</a> >-- >2.39.3 (Apple Git-146)
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 28924
:
165870
|
165871
|
165872
|
165873
|
165874
|
165875
|
165876
|
166042
|
166043
|
166044
|
166045
|
166046
|
166047
|
166048
|
166171
|
166172
|
166173
|
166174
|
166175
|
166176
|
166177
|
167719
|
167720
|
167721
|
167722
|
167723
|
167724
|
167725
|
167726
|
167727
|
167728
|
167729
|
167730
|
167731
|
167732
|
167733
|
167734
|
167735
|
167736
|
167737
|
167738
|
167739
|
167740
|
168728
|
168729
|
168730
|
168731
|
168732
|
168733
|
168734
|
168735
|
168736
|
168737
|
168738
|
168984
|
168985
| 168986 |
168987
|
168988
|
168989
|
168990
|
168991
|
168992
|
168993
|
168994
|
168995
|
169177
|
169428