diff --git a/collections/reports/labelmanager.php b/collections/reports/labelmanager.php index 4e79c73d28..e670a842ce 100644 --- a/collections/reports/labelmanager.php +++ b/collections/reports/labelmanager.php @@ -106,9 +106,19 @@ function openPopup(urlStr){ return false; } - function changeFormExport(action,target){ - var f = document.selectform; - if(action == "labelsword.php" && document.getElementById('packetradio').checked == true){ + function changeFormExport(buttonElem, action, target){ + var f = buttonElem.form; + if(action == "labeldynamic.php" && buttonElem.value == "Print in Browser"){ + labelFormatSelected = false; + if(f["labelformatindex-g"] && f["labelformatindex-g"].value != "") labelFormatSelected = true; + if(f["labelformatindex-c"] && f["labelformatindex-c"].value != "") labelFormatSelected = true; + if(f["labelformatindex-u"] && f["labelformatindex-u"].value != "") labelFormatSelected = true; + if(!labelFormatSelected){ + alert("Please select a Label Format Profile"); + return false; + } + } + else if(action == "labelsword.php" && f.packetradio.checked == true){ alert("Packet labels are not yet available as a Word document"); return false; } @@ -343,37 +353,31 @@ function labelFormatChanged(selObj,catStr){