prospect add/edit: order fields more like customer add/edit, hide company in resident...
[freeside.git] / httemplate / elements / popup_link-prospect_main.html
1 <%doc>
2
3 Example:
4
5   include('/elements/init_overlib.html')
6
7   include( '/elements/popup_link-prospect_main.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 keywords
12     'label'          => 'click me',     # text of <A> tag
13     'prospect_main'      => $prospect_main      # a FS::prospect_main 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->{'prospect_main'} ) {
26 <% include('/elements/popup_link.html', $params ) %>\
27 % }
28 <%init>
29
30 my $params = { 'closetext' => 'Close' };
31
32 if (ref($_[0]) eq 'HASH') {
33   $params = { %$params, %{ $_[0] } };
34 } else {
35   $params = { %$params, @_ };
36 }
37  
38 $params->{'action'} .=
39   ( $params->{'action'} =~ /\?/ ? ';' : '?' ).
40   'prospectnum='. $params->{'prospect_main'}->prospectnum;
41
42 </%init>