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 <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
a6466f1f3b
commit
d96fc92856
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -197,6 +197,38 @@
|
|||
[% END %]
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label for="change_password">Password change in OPAC: </label>
|
||||
<select name="change_password" id="change_password">
|
||||
[% IF category.change_password.defined %]
|
||||
[% IF category.change_password %]
|
||||
[% IF Koha.Preference('OpacPasswordChange') %]
|
||||
<option value="-1">Follow system preference OpacPasswordChange (enabled)</option>
|
||||
[% ELSE %]
|
||||
<option value="-1">Follow system preference OpacPasswordChange (disabled)</option>
|
||||
[% END %]
|
||||
<option value="1" selected="selected">Allowed</option>
|
||||
<option value="0">Not allowed</option>
|
||||
[% ELSE %]
|
||||
[% IF Koha.Preference('OpacPasswordChange') %]
|
||||
<option value="-1">Follow system preference OpacPasswordChange (enabled)</option>
|
||||
[% ELSE %]
|
||||
<option value="-1">Follow system preference OpacPasswordChange (disabled)</option>
|
||||
[% END %]
|
||||
<option value="1">Allowed</option>
|
||||
<option value="0" selected="selected">Not allowed</option>
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% IF Koha.Preference('OpacPasswordChange') %]
|
||||
<option value="-1" selected="selected">Follow system preference OpacPasswordChange (enabled)</option>
|
||||
[% ELSE %]
|
||||
<option value="-1" selected="selected">Follow system preference OpacPasswordChange (disabled)</option>
|
||||
[% END %]
|
||||
<option value="1">Allowed</option>
|
||||
<option value="0">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…
Reference in New Issue