From 94970c0db3ffa38b357b6880519a8edf44435b8f Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Thu, 31 Mar 2011 16:24:01 -0400 Subject: [PATCH] Corrects the behaviour of the itemtype selectbox in addbiblio.pl If the subfield is set as mandatory with an empty default value, an empty value is added in the selectbox and this value is selected by default. Before, the first element was automatically selected, so it was easy to forget to set this mandatory value. --- cataloguing/addbiblio.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 2c0c63d..5f8bb44 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -188,7 +188,7 @@ sub build_authorized_values_list ($$$$$$$) { "select itemtype,description from itemtypes order by description"); $sth->execute; push @authorised_values, "" - unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); + unless ( $tagslib->{$tag}->{$subfield}->{default} ne '' and $tagslib->{$tag}->{$subfield}->{mandatory} ); my $itemtype; -- 1.5.6.5