Bug 15030 - continue. The enumchron value was overwritten by 'header' even when value supplied

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>
This commit is contained in:
Blou 2015-10-22 16:49:10 -04:00 committed by Kyle M Hall
parent 1017edad1c
commit 9f460de741
1 changed files with 4 additions and 2 deletions

View File

@ -28,8 +28,10 @@ function unHideItems(index,labelindex, serialId) {
item_div = $("fieldset#" + index + " div.cataloguing_additem_itemlist div.items");
// Getting subfield with enumcron mapping
subfield_div = $(item_div).find("input[name='kohafield'][value='items.enumchron']").parent();
// Setting text field
$(subfield_div).children("input[type='text'][name='field_value']").val($("#serialseq" + serialId).val());
// Setting text field if no saved default value
if(! $(subfield_div).children("input[type='text'][name='field_value']").val() ){
$(subfield_div).children("input[type='text'][name='field_value']").val($("#serialseq" + serialId).val());
}
}
function HideItems(index,labelindex) {
subfield = document.getElementById(index);