Lines 80-90
elsif ( $op eq 'add_validate' ) {
Link Here
|
80 |
my $require_strong_password = $input->param('require_strong_password'); |
80 |
my $require_strong_password = $input->param('require_strong_password'); |
81 |
my @branches = grep { $_ ne q{} } $input->multi_param('branches'); |
81 |
my @branches = grep { $_ ne q{} } $input->multi_param('branches'); |
82 |
my $can_be_guarantee = $input->param('can_be_guarantee'); |
82 |
my $can_be_guarantee = $input->param('can_be_guarantee'); |
|
|
83 |
my $force_password_reset_when_set_by_staff = $input->param('force_password_reset_when_set_by_staff'); |
83 |
|
84 |
|
84 |
$reset_password = undef if $reset_password eq -1; |
85 |
$reset_password = undef if $reset_password eq -1; |
85 |
$change_password = undef if $change_password eq -1; |
86 |
$change_password = undef if $change_password eq -1; |
86 |
$min_password_length = undef unless length($min_password_length); |
87 |
$min_password_length = undef unless length($min_password_length); |
87 |
$require_strong_password = undef if $require_strong_password eq -1; |
88 |
$require_strong_password = undef if $require_strong_password eq -1; |
|
|
89 |
$force_password_reset_when_set_by_staff = undef if $force_password_reset_when_set_by_staff eq -1; |
88 |
|
90 |
|
89 |
my $is_a_modif = $input->param("is_a_modif"); |
91 |
my $is_a_modif = $input->param("is_a_modif"); |
90 |
|
92 |
|
Lines 111-116
elsif ( $op eq 'add_validate' ) {
Link Here
|
111 |
$category->exclude_from_local_holds_priority($exclude_from_local_holds_priority); |
113 |
$category->exclude_from_local_holds_priority($exclude_from_local_holds_priority); |
112 |
$category->min_password_length($min_password_length); |
114 |
$category->min_password_length($min_password_length); |
113 |
$category->require_strong_password($require_strong_password); |
115 |
$category->require_strong_password($require_strong_password); |
|
|
116 |
$category->force_password_reset_when_set_by_staff($force_password_reset_when_set_by_staff); |
114 |
eval { |
117 |
eval { |
115 |
$category->store; |
118 |
$category->store; |
116 |
$category->replace_library_limits( \@branches ); |
119 |
$category->replace_library_limits( \@branches ); |
Lines 123-149
elsif ( $op eq 'add_validate' ) {
Link Here
|
123 |
} |
126 |
} |
124 |
else { |
127 |
else { |
125 |
my $category = Koha::Patron::Category->new({ |
128 |
my $category = Koha::Patron::Category->new({ |
126 |
categorycode => $categorycode, |
129 |
categorycode => $categorycode, |
127 |
description => $description, |
130 |
description => $description, |
128 |
enrolmentperiod => $enrolmentperiod, |
131 |
enrolmentperiod => $enrolmentperiod, |
129 |
enrolmentperioddate => $enrolmentperioddate, |
132 |
enrolmentperioddate => $enrolmentperioddate, |
130 |
password_expiry_days => $password_expiry_days, |
133 |
password_expiry_days => $password_expiry_days, |
131 |
upperagelimit => $upperagelimit, |
134 |
upperagelimit => $upperagelimit, |
132 |
dateofbirthrequired => $dateofbirthrequired, |
135 |
dateofbirthrequired => $dateofbirthrequired, |
133 |
enrolmentfee => $enrolmentfee, |
136 |
enrolmentfee => $enrolmentfee, |
134 |
reservefee => $reservefee, |
137 |
reservefee => $reservefee, |
135 |
hidelostitems => $hidelostitems, |
138 |
hidelostitems => $hidelostitems, |
136 |
overduenoticerequired => $overduenoticerequired, |
139 |
overduenoticerequired => $overduenoticerequired, |
137 |
category_type => $category_type, |
140 |
category_type => $category_type, |
138 |
can_be_guarantee => $can_be_guarantee, |
141 |
can_be_guarantee => $can_be_guarantee, |
139 |
BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions, |
142 |
BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions, |
140 |
checkprevcheckout => $checkPrevCheckout, |
143 |
checkprevcheckout => $checkPrevCheckout, |
141 |
default_privacy => $default_privacy, |
144 |
default_privacy => $default_privacy, |
142 |
reset_password => $reset_password, |
145 |
reset_password => $reset_password, |
143 |
change_password => $change_password, |
146 |
change_password => $change_password, |
144 |
exclude_from_local_holds_priority => $exclude_from_local_holds_priority, |
147 |
exclude_from_local_holds_priority => $exclude_from_local_holds_priority, |
145 |
min_password_length => $min_password_length, |
148 |
min_password_length => $min_password_length, |
146 |
require_strong_password => $require_strong_password, |
149 |
require_strong_password => $require_strong_password, |
|
|
150 |
force_password_reset_when_set_by_staff => $force_password_reset_when_set_by_staff, |
147 |
}); |
151 |
}); |
148 |
eval { |
152 |
eval { |
149 |
$category->store; |
153 |
$category->store; |