X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fpopup_link-cust_main.html;h=14137859f9cb11383f6f852a087ba3d5d7be02bd;hb=ce639adb2033f14b0bb6ef27354e2574dfc55ab7;hp=3b1363f49d93acc406c01127308e687036700eef;hpb=5ea49c83c4a5b71a1e7baf2b6a75fe50816fdce5;p=freeside.git
diff --git a/httemplate/elements/popup_link-cust_main.html b/httemplate/elements/popup_link-cust_main.html
index 3b1363f49..14137859f 100644
--- a/httemplate/elements/popup_link-cust_main.html
+++ b/httemplate/elements/popup_link-cust_main.html
@@ -2,10 +2,9 @@
Example:
-
-
+ include('/elements/init_overlib.html')
- include( '/elements/cust_popup_link.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
@@ -23,34 +22,25 @@ Example:
)
%doc>
+% if ( $params->{'cust_main'} ) {
+<% include('/elements/popup_link.html', $params ) %>\
+% }
<%init>
-my($params, $action, $label, $actionlabel, $color, $cust_main, $width);
-my $closetext = '';
-if (ref(@_[0]) eq 'HASH') {
- $params = shift;
- foreach (qw(action label actionlabel width color)) {
- $action = $params->{'action'} if exists $params->{'action'};
- $label = $params->{'label'} if exists $params->{'label'};
- $actionlabel = $params->{'actionlabel'} if exists $params->{'actionlabel'};
- $width = $params->{'width'} if exists $params->{'width'};
- $color = $params->{'color'} if exists $params->{'color'};
- $closetext = $params->{'closetext'} if exists $params->{'closetext'};
- $cust_main = $params->{'cust_main'} if exists $params->{'cust_main'};
- }
-}else{ # deprecated
- ($action, $label, $actionlabel, $color, $cust_main) = @_;
+
+my $params = { 'closetext' => emt('Close') };
+
+if (ref($_[0]) eq 'HASH') {
+ $params = { %$params, %{ $_[0] } };
+} else {
+ $params = { %$params, @_ };
}
+
+$params->{'action'} .=
+ ( $params->{'action'} =~ /\?/ ? ';' : '?' ).
+ 'custnum='. $params->{'cust_main'}->custnum;
-$action .= '?'. $cust_main->custnum;
+$params->{'action'} .= ";$_=".$params->{$_}
+ foreach grep $params->{$_},
+ qw( lock_pkgpart lock_locationnum qualnum svcpart );
%init>
-<% $cust_main
- ? include('/elements/popup_link.html', { 'action' => $action,
- 'label' => $label,
- 'actionlabel' => $actionlabel,
- 'color' => $color,
- 'closetext' => $closetext,
- }
- )
- : ''
-%>