From a16d7a3b9fd3ddf7e828b325d0f542850a52c377 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Thu, 31 Mar 2011 16:54:22 -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..ba0ca0b 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}->{defaultvalue} and $tagslib->{$tag}->{$subfield}->{mandatory} ); my $itemtype; -- 1.5.6.5