|
Lines 57-84
if ( $op eq 'add_form' ) {
Link Here
|
| 57 |
} |
57 |
} |
| 58 |
} |
58 |
} |
| 59 |
elsif ( $op eq 'cud-add_validate' ) { |
59 |
elsif ( $op eq 'cud-add_validate' ) { |
|
|
60 |
my $categorycode = $input->param('categorycode'); |
| 61 |
my $description = $input->param('description'); |
| 62 |
my $enrolmentperiod = $input->param('enrolmentperiod'); |
| 63 |
my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef; |
| 64 |
my $password_expiry_days = $input->param('password_expiry_days') || undef; |
| 65 |
my $upperagelimit = $input->param('upperagelimit'); |
| 66 |
my $dateofbirthrequired = $input->param('dateofbirthrequired'); |
| 67 |
my $enrolmentfee = $input->param('enrolmentfee'); |
| 68 |
my $reservefee = $input->param('reservefee'); |
| 69 |
my $hidelostitems = $input->param('hidelostitems'); |
| 70 |
my $overduenoticerequired = $input->param('overduenoticerequired'); |
| 71 |
my $category_type = $input->param('category_type'); |
| 72 |
my $BlockExpiredPatronOpacActions = join( ',', $input->multi_param('BlockExpiredPatronOpacActions') ); |
| 73 |
my $checkPrevCheckout = $input->param('checkprevcheckout'); |
| 74 |
my $can_place_ill_in_opac = $input->param('can_place_ill_in_opac') // 1; |
| 75 |
my $default_privacy = $input->param('default_privacy'); |
| 76 |
my $reset_password = $input->param('reset_password'); |
| 77 |
my $change_password = $input->param('cud-change_password'); |
| 78 |
my $exclude_from_local_holds_priority = $input->param('exclude_from_local_holds_priority'); |
| 79 |
my $min_password_length = $input->param('min_password_length'); |
| 80 |
my $require_strong_password = $input->param('require_strong_password'); |
| 81 |
my $noissuescharge = $input->param('noissuescharge') || undef; |
| 82 |
my $noissueschargeguarantees = $input->param('noissueschargeguarantees') || undef; |
| 83 |
my $noissueschargeguarantorswithguarantees = $input->param('noissueschargeguarantorswithguarantees') || undef; |
| 60 |
|
84 |
|
| 61 |
my $categorycode = $input->param('categorycode'); |
|
|
| 62 |
my $description = $input->param('description'); |
| 63 |
my $enrolmentperiod = $input->param('enrolmentperiod'); |
| 64 |
my $enrolmentperioddate = $input->param('enrolmentperioddate') || undef; |
| 65 |
my $password_expiry_days = $input->param('password_expiry_days') || undef; |
| 66 |
my $upperagelimit = $input->param('upperagelimit'); |
| 67 |
my $dateofbirthrequired = $input->param('dateofbirthrequired'); |
| 68 |
my $enrolmentfee = $input->param('enrolmentfee'); |
| 69 |
my $reservefee = $input->param('reservefee'); |
| 70 |
my $hidelostitems = $input->param('hidelostitems'); |
| 71 |
my $overduenoticerequired = $input->param('overduenoticerequired'); |
| 72 |
my $category_type = $input->param('category_type'); |
| 73 |
my $BlockExpiredPatronOpacActions = join( ',', $input->multi_param('BlockExpiredPatronOpacActions') ); |
| 74 |
my $checkPrevCheckout = $input->param('checkprevcheckout'); |
| 75 |
my $can_place_ill_in_opac = $input->param('can_place_ill_in_opac') // 1; |
| 76 |
my $default_privacy = $input->param('default_privacy'); |
| 77 |
my $reset_password = $input->param('reset_password'); |
| 78 |
my $change_password = $input->param('cud-change_password'); |
| 79 |
my $exclude_from_local_holds_priority = $input->param('exclude_from_local_holds_priority'); |
| 80 |
my $min_password_length = $input->param('min_password_length'); |
| 81 |
my $require_strong_password = $input->param('require_strong_password'); |
| 82 |
my @branches = grep { $_ ne q{} } $input->multi_param('branches'); |
85 |
my @branches = grep { $_ ne q{} } $input->multi_param('branches'); |
| 83 |
my $can_be_guarantee = $input->param('can_be_guarantee'); |
86 |
my $can_be_guarantee = $input->param('can_be_guarantee'); |
| 84 |
|
87 |
|
|
Lines 113-118
elsif ( $op eq 'cud-add_validate' ) {
Link Here
|
| 113 |
$category->exclude_from_local_holds_priority($exclude_from_local_holds_priority); |
116 |
$category->exclude_from_local_holds_priority($exclude_from_local_holds_priority); |
| 114 |
$category->min_password_length($min_password_length); |
117 |
$category->min_password_length($min_password_length); |
| 115 |
$category->require_strong_password($require_strong_password); |
118 |
$category->require_strong_password($require_strong_password); |
|
|
119 |
$category->noissuescharge($noissuescharge); |
| 120 |
$category->noissueschargeguarantees($noissueschargeguarantees); |
| 121 |
$category->noissueschargeguarantorswithguarantees($noissueschargeguarantorswithguarantees); |
| 116 |
eval { |
122 |
eval { |
| 117 |
$category->store; |
123 |
$category->store; |
| 118 |
$category->replace_library_limits( \@branches ); |
124 |
$category->replace_library_limits( \@branches ); |
|
Lines 124-153
elsif ( $op eq 'cud-add_validate' ) {
Link Here
|
| 124 |
} |
130 |
} |
| 125 |
} |
131 |
} |
| 126 |
else { |
132 |
else { |
| 127 |
my $category = Koha::Patron::Category->new({ |
133 |
my $category = Koha::Patron::Category->new( |
| 128 |
categorycode => $categorycode, |
134 |
{ |
| 129 |
description => $description, |
135 |
categorycode => $categorycode, |
| 130 |
enrolmentperiod => $enrolmentperiod, |
136 |
description => $description, |
| 131 |
enrolmentperioddate => $enrolmentperioddate, |
137 |
enrolmentperiod => $enrolmentperiod, |
| 132 |
password_expiry_days => $password_expiry_days, |
138 |
enrolmentperioddate => $enrolmentperioddate, |
| 133 |
upperagelimit => $upperagelimit, |
139 |
password_expiry_days => $password_expiry_days, |
| 134 |
dateofbirthrequired => $dateofbirthrequired, |
140 |
upperagelimit => $upperagelimit, |
| 135 |
enrolmentfee => $enrolmentfee, |
141 |
dateofbirthrequired => $dateofbirthrequired, |
| 136 |
reservefee => $reservefee, |
142 |
enrolmentfee => $enrolmentfee, |
| 137 |
hidelostitems => $hidelostitems, |
143 |
reservefee => $reservefee, |
| 138 |
overduenoticerequired => $overduenoticerequired, |
144 |
hidelostitems => $hidelostitems, |
| 139 |
category_type => $category_type, |
145 |
overduenoticerequired => $overduenoticerequired, |
| 140 |
can_be_guarantee => $can_be_guarantee, |
146 |
category_type => $category_type, |
| 141 |
BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions, |
147 |
can_be_guarantee => $can_be_guarantee, |
| 142 |
checkprevcheckout => $checkPrevCheckout, |
148 |
BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions, |
| 143 |
can_place_ill_in_opac => $can_place_ill_in_opac, |
149 |
checkprevcheckout => $checkPrevCheckout, |
| 144 |
default_privacy => $default_privacy, |
150 |
can_place_ill_in_opac => $can_place_ill_in_opac, |
| 145 |
reset_password => $reset_password, |
151 |
default_privacy => $default_privacy, |
| 146 |
change_password => $change_password, |
152 |
reset_password => $reset_password, |
| 147 |
exclude_from_local_holds_priority => $exclude_from_local_holds_priority, |
153 |
change_password => $change_password, |
| 148 |
min_password_length => $min_password_length, |
154 |
exclude_from_local_holds_priority => $exclude_from_local_holds_priority, |
| 149 |
require_strong_password => $require_strong_password, |
155 |
min_password_length => $min_password_length, |
| 150 |
}); |
156 |
require_strong_password => $require_strong_password, |
|
|
157 |
noissuescharge => $noissuescharge, |
| 158 |
noissueschargeguarantees => $noissueschargeguarantees, |
| 159 |
noissueschargeguarantorswithguarantees => $noissueschargeguarantorswithguarantees, |
| 160 |
} |
| 161 |
); |
| 151 |
eval { |
162 |
eval { |
| 152 |
$category->store; |
163 |
$category->store; |
| 153 |
$category->replace_library_limits( \@branches ); |
164 |
$category->replace_library_limits( \@branches ); |