5 root = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' WHERE parent_ou IS NULL ORDER BY name;';
6 q = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' WHERE parent_ou = ? ORDER BY name;';
8 org_unit_type = DBI.tie('actor.org_unit_type', 'id')
12 <script language="javascript">
13 filters["[% input_prefix %]"] = "[% table_label _ ' -- ' _ field.findvalue('label') %]";
15 var multihier_[% table_alias %] = [];
17 function change_multihier_[% table_alias %] ( sel ) {
18 for (var i = 0; i < sel.options.length; i++) {
19 if (sel.options[i].selected) {
20 sel.options[i].selected = false;
21 for (var j in multihier_[% table_alias %]) {
22 if (multihier_[% table_alias %][j] == sel.options[i].id) {
23 sel.options[i].selected = true
34 WRAPPER select name=input_prefix multi="multi" onchange='change_multihier_' _ table_alias _ '(this);';
36 FOR f = DBI.query(root);
37 INCLUDE option value=f.id content=f.name;
38 INCLUDE next_level parent_ou = f.id depth;
46 FOR f = s.execute(parent_ou);
49 logme(["can_have_vols for ou_t", ,org_unit_type.$ou_t.can_have_vols]);
51 IF org_unit_type.$ou_t.can_have_vols == 1;
53 <script language="javascript">
54 multihier_[% table_alias %].push("mh_[% f.id %]");
62 val = val _ ' ';
66 INCLUDE option value=f.id content=f.name content=val _ f.name id='mh_' _ f.id;
67 INCLUDE next_level parent_ou = f.id;