From 9f460de741902a3c35e4ecaef0275608fd2f4750 Mon Sep 17 00:00:00 2001 From: Blou Date: Thu, 22 Oct 2015 16:49:10 -0400 Subject: [PATCH] Bug 15030 - continue. The enumchron value was overwritten by 'header' even when value supplied Signed-off-by: Nick Clemens Signed-off-by: Josef Moravec Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/en/modules/serials/serials-edit.tt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index b678081b48..3a2ca8fe85 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -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); -- 2.39.5