|
Lines 196-205
if ( $op eq 'cud-show' || $op eq 'show' ) {
Link Here
|
| 196 |
my @categories_option; |
196 |
my @categories_option; |
| 197 |
push @categories_option, { value => $_->categorycode, lib => $_->description } for @patron_categories; |
197 |
push @categories_option, { value => $_->categorycode, lib => $_->description } for @patron_categories; |
| 198 |
unshift @categories_option, { value => "", lib => "" }; |
198 |
unshift @categories_option, { value => "", lib => "" }; |
| 199 |
my @protected_option; |
|
|
| 200 |
push @protected_option, { value => 1, lib => "Yes" }; |
| 201 |
push @protected_option, { value => 0, lib => "No" }; |
| 202 |
unshift @protected_option, { value => "", lib => "" }; |
| 203 |
my $bsort1 = GetAuthorisedValues("Bsort1"); |
199 |
my $bsort1 = GetAuthorisedValues("Bsort1"); |
| 204 |
my @sort1_option; |
200 |
my @sort1_option; |
| 205 |
push @sort1_option, { value => $_->{authorised_value}, lib => $_->{lib} } for @$bsort1; |
201 |
push @sort1_option, { value => $_->{authorised_value}, lib => $_->{lib} } for @$bsort1; |
|
Lines 340-348
if ( $op eq 'cud-show' || $op eq 'show' ) {
Link Here
|
| 340 |
}, |
336 |
}, |
| 341 |
); |
337 |
); |
| 342 |
|
338 |
|
| 343 |
if ($logged_in_user->is_superlibrarian) { |
339 |
if ( $logged_in_user->is_superlibrarian ) { |
| 344 |
push @fields, { name => "password_expiration_date", type => "date" } ; |
340 |
push @fields, { name => "password_expiration_date", type => "date" }; |
| 345 |
push @fields, { name => "protected", type => "select", option => \@protected_option }; |
341 |
push @fields, { name => "protected", type => "bool" }; |
| 346 |
} |
342 |
} |
| 347 |
|
343 |
|
| 348 |
$template->param( 'patron_attributes_codes', \@patron_attributes_codes ); |
344 |
$template->param( 'patron_attributes_codes', \@patron_attributes_codes ); |
|
Lines 361-368
if ( $op eq 'cud-do' ) {
Link Here
|
| 361 |
qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile fax sort1 sort2 dateenrolled dateexpiry password_expiration_date borrowernotes opacnote debarred debarredcomment protected/ |
357 |
qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile fax sort1 sort2 dateenrolled dateexpiry password_expiration_date borrowernotes opacnote debarred debarredcomment protected/ |
| 362 |
) |
358 |
) |
| 363 |
{ |
359 |
{ |
| 364 |
my $value = $input->param($field) if $input->param($field) ne ''; |
360 |
my $value = $input->param($field); |
| 365 |
$infos->{$field} = $value if defined $value; |
361 |
$infos->{$field} = $value if $value; |
| 366 |
$infos->{$field} = "" if grep { $_ eq $field } @disabled; |
362 |
$infos->{$field} = "" if grep { $_ eq $field } @disabled; |
| 367 |
} |
363 |
} |
| 368 |
|
364 |
|
|
Lines 371-377
if ( $op eq 'cud-do' ) {
Link Here
|
| 371 |
} |
367 |
} |
| 372 |
|
368 |
|
| 373 |
delete $infos->{password_expiration_date} unless $logged_in_user->is_superlibrarian; |
369 |
delete $infos->{password_expiration_date} unless $logged_in_user->is_superlibrarian; |
| 374 |
delete $infos->{protected} unless $logged_in_user->is_superlibrarian; |
370 |
delete $infos->{protected} unless $logged_in_user->is_superlibrarian; |
| 375 |
|
371 |
|
| 376 |
my @errors; |
372 |
my @errors; |
| 377 |
my @borrowernumbers = $input->multi_param('borrowernumber'); |
373 |
my @borrowernumbers = $input->multi_param('borrowernumber'); |
| 378 |
- |
|
|