6 root = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' WHERE parent_ou IS NULL ORDER BY name;';
7 q = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' WHERE parent_ou = ? ORDER BY name;';
9 org_unit_type = DBI.tie('actor.org_unit_type', 'id')
13 <script language="javascript">
14 filters["[% input_prefix %]"] = "[% table_label _ ' -- ' _ field.findvalue('label') %]";
16 var hier_[% table_alias %] = [];
18 function change_hier_[% table_alias %] ( sel ) {
19 for (var i in hier_[% table_alias %]) {
20 if (hier_[% table_alias %][i] == sel.options[sel.selectedIndex].id) {
24 sel.selectedIndex = null;
31 WRAPPER select id=input_prefix name=input_prefix onchange='change_hier_' _ table_alias _ '(this);';
33 INCLUDE option value='' content='Select One';
34 INCLUDE option value='' content='----------';
35 FOR f = DBI.query(root);
36 INCLUDE option value=f.id content=f.name;
37 INCLUDE next_level parent_ou = f.id depth;
47 FOR f = s.execute(parent_ou);
50 logme(["can_have_vols for ou_t", ,org_unit_type.$ou_t.can_have_vols]);
52 IF org_unit_type.$ou_t.can_have_vols == 1;
54 <script language="javascript">
55 hier_[% table_alias %].push("dr_[% f.id %]");
63 val = val _ ' ';
68 IF current_value == f.id;
69 selected = 'selected';
72 INCLUDE option value=f.id content=f.name content=val _ f.name id='dr_' _ f.id;
73 INCLUDE next_level parent_ou = f.id;
78 org_units = DBI.tie('actor.org_unit', 'id')
79 ou = org_units.$current_value;