From aa3f162be908c5d2a906a3aec3321ee989e020d8 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 31 Jan 2019 16:28:39 -0300 Subject: [PATCH] Bug 21890: Handle can_reset_password on the staff interface This patch makes the staff interface handle the new flag when editing the categories. I didn't add the flag to the list of categories table because it makes it too big, but can be easily added if required by users or QA. To test: - Along with other patches from this bug, edit patron categories => SUCCESS: Notice the changes are correctly stored - Sign off :-D --- admin/categories.pl | 3 +++ .../prog/en/modules/admin/categories.tt | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/admin/categories.pl b/admin/categories.pl index b6b6975a77..ba0d11e012 100755 --- a/admin/categories.pl +++ b/admin/categories.pl @@ -92,6 +92,7 @@ elsif ( $op eq 'add_validate' ) { my $BlockExpiredPatronOpacActions = $input->param('BlockExpiredPatronOpacActions'); my $checkPrevCheckout = $input->param('checkprevcheckout'); my $default_privacy = $input->param('default_privacy'); + my $can_reset_password = $input->param('can_reset_password'); my @branches = grep { $_ ne q{} } $input->multi_param('branches'); my $is_a_modif = $input->param("is_a_modif"); @@ -122,6 +123,7 @@ elsif ( $op eq 'add_validate' ) { $category->BlockExpiredPatronOpacActions($BlockExpiredPatronOpacActions); $category->checkprevcheckout($checkPrevCheckout); $category->default_privacy($default_privacy); + $category->can_reset_password($can_reset_password); eval { $category->store; $category->replace_branch_limitations( \@branches ); @@ -148,6 +150,7 @@ elsif ( $op eq 'add_validate' ) { BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions, checkprevcheckout => $checkPrevCheckout, default_privacy => $default_privacy, + can_reset_password => $can_reset_password, }); eval { $category->store; 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 d50e40615c..9714c1fc92 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt @@ -166,6 +166,18 @@ Select All branches if this category type must to be displayed all the time. Otherwise select libraries you want to associate with this value. +
  • + + +