Lines 68-73
if ( $op eq 'add_validate' ) {
Link Here
|
68 |
my $min_password_length = $input->param('min_password_length'); |
68 |
my $min_password_length = $input->param('min_password_length'); |
69 |
my $require_strong_password = $input->param('require_strong_password'); |
69 |
my $require_strong_password = $input->param('require_strong_password'); |
70 |
my $article_request_fee = $input->param('article_request_fee'); |
70 |
my $article_request_fee = $input->param('article_request_fee'); |
|
|
71 |
my $article_request_limit = $input->param('article_request_limit'); |
71 |
my @branches = grep { $_ ne q{} } $input->multi_param('branches'); |
72 |
my @branches = grep { $_ ne q{} } $input->multi_param('branches'); |
72 |
|
73 |
|
73 |
$reset_password = undef if $reset_password eq -1; |
74 |
$reset_password = undef if $reset_password eq -1; |
Lines 80-85
if ( $op eq 'add_validate' ) {
Link Here
|
80 |
if ($article_request_fee < 0) { |
81 |
if ($article_request_fee < 0) { |
81 |
push @messages, {type => 'error', code => 'article_request_negative_fee' }; |
82 |
push @messages, {type => 'error', code => 'article_request_negative_fee' }; |
82 |
$op = 'add_form'; |
83 |
$op = 'add_form'; |
|
|
84 |
} elsif ($article_request_limit ne '' && $article_request_limit !~ /\d+/) { |
85 |
push @messages, {type => 'error', code => 'article_request_numeric_limit' }; |
86 |
$op = 'add_form'; |
87 |
} elsif ($article_request_limit ne '' && $article_request_limit < 0) { |
88 |
push @messages, {type => 'error', code => 'article_request_negative_limit' }; |
89 |
$op = 'add_form'; |
83 |
} else { |
90 |
} else { |
84 |
if ($enrolmentperioddate) { |
91 |
if ($enrolmentperioddate) { |
85 |
$enrolmentperioddate = output_pref( |
92 |
$enrolmentperioddate = output_pref( |
Lines 113-118
if ( $op eq 'add_validate' ) {
Link Here
|
113 |
$category->min_password_length($min_password_length); |
120 |
$category->min_password_length($min_password_length); |
114 |
$category->require_strong_password($require_strong_password); |
121 |
$category->require_strong_password($require_strong_password); |
115 |
$category->article_request_fee($article_request_fee); |
122 |
$category->article_request_fee($article_request_fee); |
|
|
123 |
$category->article_request_limit($article_request_limit); |
116 |
eval { |
124 |
eval { |
117 |
$category->store; |
125 |
$category->store; |
118 |
$category->replace_library_limits( \@branches ); |
126 |
$category->replace_library_limits( \@branches ); |
Lines 145-150
if ( $op eq 'add_validate' ) {
Link Here
|
145 |
min_password_length => $min_password_length, |
153 |
min_password_length => $min_password_length, |
146 |
require_strong_password => $require_strong_password, |
154 |
require_strong_password => $require_strong_password, |
147 |
article_request_fee => $article_request_fee, |
155 |
article_request_fee => $article_request_fee, |
|
|
156 |
article_request_limit => $article_request_limit |
148 |
}); |
157 |
}); |
149 |
eval { |
158 |
eval { |
150 |
$category->store; |
159 |
$category->store; |