diff options
author | jeff <jeff> | 2008-03-16 23:05:27 +0000 |
---|---|---|
committer | jeff <jeff> | 2008-03-16 23:05:27 +0000 |
commit | 5ea49c83c4a5b71a1e7baf2b6a75fe50816fdce5 (patch) | |
tree | 8c7bb81c4a0e0d638c260f2c183ebefbe17c337a /httemplate/view/cust_main.cgi | |
parent | 664c32360a73c1962fefdf9da62f5e6842cee4c0 (diff) |
componentize conflicting %once subroutines (rt#3250)
Diffstat (limited to 'httemplate/view/cust_main.cgi')
-rwxr-xr-x | httemplate/view/cust_main.cgi | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 4ca777d6a..05d1c8d69 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -20,7 +20,15 @@ function areyousure(href, message) { % && $cust_main->ncancelled_pkgs % ) { - <% cust_cancel_link($cust_main) %> | + <% include( '/elements/popup_link-cust_main.html', + { 'action' => $p. 'misc/cancel_cust.html', + 'label' => 'Cancel this customer', + 'actionlabel' => 'Confirm Cancellation', + 'color' => '#ff0000', + 'cust_main' => $cust_main, + } + ) + %> | % } @@ -155,33 +163,3 @@ my $cust_main = qsearchs( { die "Customer not found!" unless $cust_main; </%init> -<%once> - - -sub cust_cancel_link { cust_popup_link( 'misc/cancel_cust.html', - 'Cancel this customer', - 'Confirm Cancellation', - '#ff0000', - @_, - ); -} - -#false laziness w/view/cust_main/packages.html - -sub cust_popup_link { - my($action, $label, $actionlabel, $color, $cust_main) = @_; - $action .= '?'. $cust_main->custnum; - popup_link($action, $label, $actionlabel, $color); -} - -sub popup_link { - my($action, $label, $actionlabel, $color) = @_; - $color ||= '#333399'; - qq!<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('$p$action', 540, 336, 'pkg_or_svc_action_popup' ), CAPTION, '$actionlabel', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '$color', CGCOLOR, '$color', CLOSETEXT, '' ); return false;">$label</A>!; - -# CLOSETEXT, '', -#WIDTH, 576, HEIGHT, 128, TEXTSIZE, 3, -#BGCOLOR, '#ff0000', CGCOLOR, '#ff0000' -} - -</%once> |