RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / httemplate / elements / popup_link-cust_pkg.html
1 <%doc>
2
3 Example:
4
5   include('/elements/init_overlib.html')
6
7   include( '/elements/pkg_popup_link.html', { #hashref or a list, either way
8
9     #required
10     'action'         => 'content.html', # uri for content of popup which should
11                                         #  be suitable for appending '&stuff...'
12     'label'          => 'click me',     # text of <A> tag
13     'cust_pkg'       => $cust_pkg       # a FS::cust_pkg object
14    
15     #strongly recommended (you want a title, right?)
16     'actionlabel     => 'You clicked',  # popup title
17    
18     #opt
19     'width'          => '540',
20     'color'          => '#ff0000',
21     'closetext'      => 'Go Away',      # the value '' removes the link
22   )
23
24 </%doc>
25 % if ( $params->{'cust_pkg'} ) {
26 <% include('/elements/popup_link.html', $params ) %>\
27 % }
28 <%init>
29
30 my $params = { 'closetext' => emt('Close'),
31                'width'     => 768,
32              };
33
34 if (ref($_[0]) eq 'HASH') {
35   $params = { %$params, %{ $_[0] } };
36 } else {
37   $params = { %$params, @_ };
38 }
39
40 $params->{'action'} .=
41   ( $params->{'action'} =~ /\?/ ? ';' : '?' ).
42   'pkgnum='. $params->{'cust_pkg'}->pkgnum;
43
44 $params->{'actionlabel'} .=
45   ' package '. $params->{'cust_pkg'}->pkgnum; #XXX pkgnum?  really?
46
47 </%init>