Browse Source

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

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19.05.x
Tomás Cohen Arazi 5 years ago
committed by Nick Clemens
parent
commit
e8fc66f0f6
  1. 3
      admin/categories.pl
  2. 12
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt

3
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;

12
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt

@ -165,6 +165,18 @@
<span>Select <i>All branches</i> if this category type must to be displayed all the time. Otherwise select libraries you want to associate with this value.
</span>
</li>
<li>
<label for="can_reset_password">Password reset in OPAC: </label>
<select name="can_reset_password" id="can_reset_password">
[% IF category.can_reset_password %]
<option value="0">Allowed</option>
<option value="1" selected="selected">Not allowed</option>
[% ELSE %]
<option value="0" selected="selected">Allowed</option>
<option value="1">Not allowed</option>
[% END %]
</select>
</li>
<li><label for="block_expired">Block expired patrons:</label>
<select name="BlockExpiredPatronOpacActions" id="block_expired">
[% IF not category or category.BlockExpiredPatronOpacActions == -1%]

Loading…
Cancel
Save