Lines 481-493
sub ParseCgiForBorrower {
Link Here
|
481 |
|
481 |
|
482 |
sub DelUnchangedFields { |
482 |
sub DelUnchangedFields { |
483 |
my ( $borrowernumber, %new_data ) = @_; |
483 |
my ( $borrowernumber, %new_data ) = @_; |
484 |
|
484 |
# get the mandatory fields so we can get the hidden fields |
|
|
485 |
my $mandatory = GetMandatoryFields('edit'); |
485 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
486 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
486 |
my $current_data = $patron->unblessed; |
487 |
my $current_data = $patron->unblessed; |
|
|
488 |
# get the hidden fields so we don't obliterate them should they have data patrons aren't allowed to modify |
489 |
my $hidden_fields = GetHiddenFields($mandatory, 'edit'); |
490 |
|
487 |
|
491 |
|
488 |
foreach my $key ( keys %new_data ) { |
492 |
foreach my $key ( keys %new_data ) { |
489 |
if ( $current_data->{$key} eq $new_data{$key} ) { |
493 |
if ( ($current_data->{$key} eq $new_data{$key}) || $hidden_fields->{$key} ) { |
490 |
delete $new_data{$key}; |
494 |
delete $new_data{$key}; |
491 |
} |
495 |
} |
492 |
} |
496 |
} |
493 |
|
497 |
|
494 |
- |
|
|