BiblioAddsAuthorities improvement/fix

this commit restore a better behaviour :
- if ON : the librarian can enter manually an authority-linked marc field. and if it does not exist in the authorities file, it will be created automatically
- if OFF : the authority must exist in the authority file, and the librarian can't enter if manually in the MARC editor

This patch just deals with the OFF case (the ON was already here). With OFF the behaviour is now the same as in 2.2

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Paul POULAIN 2008-04-08 22:14:13 +02:00 committed by Joshua Ferraro
parent b5f7ff2e45
commit 91fca4a9ab
1 changed files with 18 additions and 1 deletions

View File

@ -342,6 +342,7 @@ sub create_input {
# it's a thesaurus / authority field
}
elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) {
if (C4::Context->preference("BiblioAddsAuthorities")) {
$subfield_data{marc_value} =
"<input type=\"text\"
id=\"".$subfield_data{id}."\"
@ -354,7 +355,23 @@ sub create_input {
\/>
<a href=\"#\" class=\"buttonDot\"
onclick=\"Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&amp;index=$subfield_data{id}','$subfield_data{id}'); return false;\" title=\"Tag Editor\">...</a>
";
";
} else {
$subfield_data{marc_value} =
"<input type=\"text\"
id=\"".$subfield_data{id}."\"
name=\"".$subfield_data{id}."\"
value=\"$value\"
class=\"input_marceditor\"
tabindex=\"1\"
size=\"67\"
maxlength=\"255\"
disabled=\"true\"
\/>
<a href=\"#\" class=\"buttonDot\"
onclick=\"Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&amp;index=$subfield_data{id}','$subfield_data{id}'); return false;\" title=\"Tag Editor\">...</a>
";
}
# it's a plugin field
}
elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) {