X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=430c50c5fe629982e91451cc78819ea37d739e88;hp=fda4db0d920de051fb8e2c7e360db40d222a4166;hb=fa2d8d66b29628e95a8a3aad05e59cbb173f4671;hpb=0456422b9eaf771e8c27cfb4ef4a0dd7e6f926f8 diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index fda4db0d9..430c50c5f 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -46,10 +46,39 @@ function areyousure(href, message) { <% mt('Edit this customer') |h %> | % } -% if ( $curuser->access_right('Cancel customer') -% && $cust_main->ncancelled_pkgs +% if ( $curuser->access_right('Suspend customer') +% && scalar($cust_main->unsuspended_pkgs) % ) { + <& /elements/popup_link-cust_main.html, + { 'action' => $p. 'misc/suspend_cust.html', + 'label' => emt('Suspend this customer'), + 'actionlabel' => emt('Confirm Suspension'), + 'color' => '#ff9900', + 'cust_main' => $cust_main, + 'width' => 616, #make room for reasons + 'height' => 366, + } + &> | +% } + +% if ( $curuser->access_right('Unsuspend customer') +% && scalar($cust_main->suspended_pkgs) +% ) { + <& /elements/popup_link-cust_main.html, + { 'action' => $p. 'misc/unsuspend_cust.html', + 'label' => emt('Unsuspend this customer'), + 'actionlabel' => emt('Confirm Unsuspension'), + #'color' => '#ff9900', + 'cust_main' => $cust_main, + #'width' => 616, #make room for reasons + #'height' => 366, + } + &> | +% } +% if ( $curuser->access_right('Cancel customer') +% && scalar($cust_main->ncancelled_pkgs) +% ) { <& /elements/popup_link-cust_main.html, { 'action' => $p. 'misc/cancel_cust.html', 'label' => emt('Cancel this customer'), @@ -60,27 +89,23 @@ function areyousure(href, message) { 'height' => 366, } &> | - % } -% if ( $curuser->access_right('Merge customer') ) { - +% if ( $curuser->access_right('Merge customer') +% and ( scalar($cust_main->ncancelled_pkgs) +% # || we start supporting payment info merge again in some way +% ) +% ) +% { <& /elements/popup_link-cust_main.html, { 'action' => $p. 'misc/merge_cust.html', 'label' => emt('Merge this customer'), 'actionlabel' => emt('Merge customer'), 'cust_main' => $cust_main, - 'width' => 480, - 'height' => 192, + 'width' => 569, + 'height' => 210, } &> | - -% } - -% if ( $conf->exists('deletecustomers') -% && $curuser->access_right('Delete customer') -% ) { - <% mt('Delete this customer') |h %> | % } % unless ( $conf->exists('disable_customer_referrals') ) { @@ -131,11 +156,6 @@ function areyousure(href, message) {

% } -%if ( $conf->exists('maestro-status_test') ) { - <% mt('Test maestro status') |h %> -

-% } - @@ -232,9 +252,9 @@ function areyousure(href, message) { % } % if ( $view eq 'jumbo' ) { -

- <% mt('Tickets') |h %>
+
% } +
% if ( $view eq 'tickets' || $view eq 'jumbo' ) { @@ -277,7 +297,13 @@ function areyousure(href, message) { % } % if ( $view eq 'custom' ) { +% if ( $conf->config('cust_main-custom_link') ) { <& cust_main/custom.html, $cust_main &> +% } elsif ( $conf->config('cust_main-custom_content') ) { + <& cust_main/custom_content.html, $cust_main &> +% #} else { +% # warn "custom view without cust_main-custom_link or -custom_content?"; +% } % } @@ -326,7 +352,8 @@ $views{emt('Payment History')} = 'payment_history' $views{emt('Change History')} = 'change_history' if $curuser->access_right('View customer history'); $views{$conf->config('cust_main-custom_title') || emt('Custom')} = 'custom' - if $conf->config('cust_main-custom_link'); + if $conf->config('cust_main-custom_link') + || $conf->config('cust_main-custom_content'); $views{emt('Jumbo')} = 'jumbo'; my %viewname = reverse %views;