libraries are now filtered on id (there are duplicate names, such as "Bookmobile")
[Evergreen.git] / Open-ILS / src / reporter / templates / widgets / lib-choose.dropdown
index 7461b50..c84eb13 100644 (file)
@@ -27,14 +27,17 @@ org_unit_type = DBI.tie('actor.org_unit_type', 'id')
 
 [%
 
-WRAPPER select name=input_prefix onchange='change_hier_' _ table_alias _ '(this);';
+WRAPPER select id=input_prefix name=input_prefix onchange='change_hier_' _ table_alias _ '(this);';
        depth = 0;
+       INCLUDE option value='' content='Select One';
+       INCLUDE option value='' content='----------';
        FOR f = DBI.query(root);
-               INCLUDE option value=f.$fieldname;
+               INCLUDE option value=f.id content=f.name;
                INCLUDE next_level parent_ou = f.id depth;
        END;
 END;
 
+
 BLOCK next_level;
        depth = depth + 1;
        x = depth;
@@ -59,7 +62,7 @@ BLOCK next_level;
                        x = x - 1;
                END;
 
-               INCLUDE option value=f.name content=val _ f.name id='dr_' _ f.id;
+               INCLUDE option value=f.id content=f.name content=val _ f.name id='dr_' _ f.id;
                INCLUDE next_level parent_ou = f.id;
        END;
 END;