From d96fc928560e5353a805ec079bbde26a7e8dc4ce Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 20 Feb 2019 13:36:55 -0300 Subject: [PATCH] Bug 10796: Handle can_change_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 Signed-off-by: Liz Rea Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- admin/categories.pl | 4 +++ .../prog/en/modules/admin/categories.tt | 32 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/admin/categories.pl b/admin/categories.pl index b824b9b6b6..f9144e7ced 100755 --- a/admin/categories.pl +++ b/admin/categories.pl @@ -93,9 +93,11 @@ elsif ( $op eq 'add_validate' ) { my $checkPrevCheckout = $input->param('checkprevcheckout'); my $default_privacy = $input->param('default_privacy'); my $reset_password = $input->param('reset_password'); + my $change_password = $input->param('change_password'); my @branches = grep { $_ ne q{} } $input->multi_param('branches'); $reset_password = undef if $reset_password eq -1; + $change_password = undef if $change_password eq -1; my $is_a_modif = $input->param("is_a_modif"); @@ -126,6 +128,7 @@ elsif ( $op eq 'add_validate' ) { $category->checkprevcheckout($checkPrevCheckout); $category->default_privacy($default_privacy); $category->reset_password($reset_password); + $category->change_password($change_password); eval { $category->store; $category->replace_branch_limitations( \@branches ); @@ -153,6 +156,7 @@ elsif ( $op eq 'add_validate' ) { checkprevcheckout => $checkPrevCheckout, default_privacy => $default_privacy, reset_password => $reset_password, + change_password => $change_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 5cc99d7a0b..143c1a6711 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt @@ -197,6 +197,38 @@ [% END %] +
  • + + +