Bug 25322: fix for not selected "relationship" defaults to father
[koha.git] / members / memberentry.pl
index cfdc060..ec6c08c 100755 (executable)
@@ -107,6 +107,10 @@ my @messages;
 ## Deal with guarantor stuff
 $template->param( relationships => scalar $patron->guarantor_relationships ) if $patron;
 
+my @relations = split /,|\|/, C4::Context->preference('borrowerRelationship');
+my $empty_relationship_allowed = grep {$_ eq ""} @relations;
+$template->param( empty_relationship_allowed => $empty_relationship_allowed );
+
 my $guarantor_id = $input->param('guarantor_id');
 my $guarantor = undef;
 $guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;