Bug 15030 - Fixes the serials fields associated with a plugin, to not overwrite the previously saved value
This fixes the remaining fields from serials-edit.pl that were seeing their previously entered values be oblitarated with each new edit. The fields associated to a plugin (dateaccessioned and barcode) were always displaying <empty> with each new edit, losing the previous effort. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> (cherry picked from commit1017edad1c) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> (cherry picked from commit18ad4150ea) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
parent
9bc4064947
commit
d7d79b2af9
|
|
@ -3080,15 +3080,18 @@ sub PrepareItemrecordDisplay {
|
|||
});
|
||||
my $pars = { dbh => $dbh, record => undef, tagslib =>$tagslib, id => $subfield_data{id}, tabloop => undef };
|
||||
$plugin->build( $pars );
|
||||
if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
|
||||
$defaultvalue = $field->subfield($subfield);
|
||||
}
|
||||
if( !$plugin->errstr ) {
|
||||
#TODO Move html to template; see report 12176/13397
|
||||
my $tab= $plugin->noclick? '-1': '';
|
||||
my $class= $plugin->noclick? ' disabled': '';
|
||||
my $title= $plugin->noclick? 'No popup': 'Tag editor';
|
||||
$subfield_data{marc_value} = qq[<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" /><a href="#" id="buttonDot_$subfield_data{id}" tabindex="$tab" class="buttonDot $class" title="$title">...</a>\n].$plugin->javascript;
|
||||
$subfield_data{marc_value} = qq[<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" value="$defaultvalue" /><a href="#" id="buttonDot_$subfield_data{id}" tabindex="$tab" class="buttonDot $class" title="$title">...</a>\n].$plugin->javascript;
|
||||
} else {
|
||||
warn $plugin->errstr;
|
||||
$subfield_data{marc_value} = qq(<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" />); # supply default input form
|
||||
$subfield_data{marc_value} = qq(<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" value="$defaultvalue" />); # supply default input form
|
||||
}
|
||||
}
|
||||
elsif ( $tag eq '' ) { # it's an hidden field
|
||||
|
|
|
|||
Loading…
Reference in New Issue