LP#1422802 Fix javascript validation for visible parts
authorKathy Lussier <klussier@masslnc.org>
Thu, 25 Feb 2016 17:26:02 +0000 (12:26 -0500)
committerBen Shum <ben@evergreener.net>
Sat, 27 Feb 2016 22:50:20 +0000 (17:50 -0500)
The previous javascript validation was not working for records with just one
part. This one works better. Many thanks to Dan Wells for identifying the fix.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <ben@evergreener.net>
Open-ILS/src/templates/opac/parts/js.tt2

index e6ec184..6135a23 100644 (file)
@@ -133,7 +133,7 @@ var aou_hash = {
        return false;
     }
     function validateHoldForm() {
-      if (validateRadioSelection (document.forms["PlaceHold"]["part"]))
+      if (validateRadioSelection (document.getElementsByName("part")))
       {
         return true;
        }