}
if (C4::Context->preference('ExtendedPatronAttributes')) {
- patron_attributes_form($template, $borrowernumber);
+ patron_attributes_form($template, $borrowernumber, $op);
}
if (C4::Context->preference('EnhancedMessagingPreferences')) {
sub patron_attributes_form {
my $template = shift;
my $borrowernumber = shift;
+ my $op = shift;
my @types = C4::Members::AttributeTypes::GetAttributeTypes();
if (scalar(@types) == 0) {
$newentry->{auth_val_loop} = GetAuthorisedValues($attr_type->authorised_value_category(), $attr->{value});
}
$i++;
+ undef $newentry->{value} if ($attr_type->unique_id() && $op eq 'duplicate');
$newentry->{form_id} = "patron_attr_$i";
push @{$items_by_class{$attr_type->class()}}, $newentry;
}