From 8468ce6abd28b145bfde14a210a166cca46115dc Mon Sep 17 00:00:00 2001 From: levinse Date: Tue, 7 Dec 2010 20:38:52 +0000 Subject: added prospect support to qualifications, RT7111 --- httemplate/elements/popup_link-prospect_main.html | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 httemplate/elements/popup_link-prospect_main.html (limited to 'httemplate/elements') diff --git a/httemplate/elements/popup_link-prospect_main.html b/httemplate/elements/popup_link-prospect_main.html new file mode 100644 index 000000000..cc22e3e12 --- /dev/null +++ b/httemplate/elements/popup_link-prospect_main.html @@ -0,0 +1,42 @@ +<%doc> + +Example: + + include('/elements/init_overlib.html') + + include( '/elements/popup_link-cust_main.html', { #hashref or a list, either way + + #required + 'action' => 'content.html', # uri for content of popup which should + # be suitable for appending keywords + 'label' => 'click me', # text of tag + 'cust_main' => $cust_main # a FS::cust_main object + + #strongly recommended (you want a title, right?) + 'actionlabel => 'You clicked', # popup title + + #opt + 'width' => '540', + 'color' => '#ff0000', + 'closetext' => 'Go Away', # the value '' removes the link + ) + + +% if ( $params->{'prospect_main'} ) { +<% include('/elements/popup_link.html', $params ) %>\ +% } +<%init> + +my $params = { 'closetext' => 'Close' }; + +if (ref($_[0]) eq 'HASH') { + $params = { %$params, %{ $_[0] } }; +} else { + $params = { %$params, @_ }; +} + +$params->{'action'} .= + ( $params->{'action'} =~ /\?/ ? ';' : '?' ). + 'prospectnum='. $params->{'prospect_main'}->prospectnum; + + -- cgit v1.2.1