2 BLOCK build_org_selector_options;
5 IF can_have_vols_only AND walker.ou_type.can_have_vols != 't';
6 disabled = 'disabled="disabled"';
7 ELSIF walker.id == value;
8 selected = 'selected="selected"';
11 <option value='[% walker.id | uri %]' [% selected %] [% disabled %]>
13 pad = walker.ou_type.depth * 2;
14 FOR idx IN [0..pad]; ' '; END;
18 [% FOR child IN walker.children;
19 PROCESS build_org_selector_options walker=child value=value;
23 # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
24 # Org Unit Selector Widget :
25 # PROCESS build_org_selector id='selector-id' name='selector-name'
26 BLOCK build_org_selector;
28 <select [% IF id %] id='[% id %]' [% END %] name='[% name %]'>
29 [% PROCESS build_org_selector_options walker=(org_unit || ctx.aou_tree) value=value %]