select-table and select-part_pkg updates so we can use select-part_pkg as an edit...
[freeside.git] / httemplate / elements / select-part_pkg.html
1 <%doc>
2
3 Example:
4
5   include( '/elements/select-part_pkg.html',
6
7     #strongly recommended (you want your forms to be "sticky" on errors, right?)
8     'curr_value' => 'current_value',
9   
10     #opt
11     'part_pkg'   => \@records,
12
13     #select-table.html options
14   )
15
16 </%doc>
17
18 <% include( '/elements/select-table.html',
19               'table'          => 'part_pkg',
20               'name_col'       => 'pkg',
21               'empty_label'    => 'Select package', #should this be the default?
22               'label_callback' => sub { shift->pkg_comment },
23               'hashref'        => { 'disabled' => '' },
24               %opt,
25           )
26 %>
27 <%init>
28
29 my( %opt ) = @_;
30
31 $opt{'records'} = delete $opt{'part_pkg'}
32   if $opt{'part_pkg'};
33
34 </%init>