summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-05-02 20:47:21 -0700
committerIvan Kohler <ivan@freeside.biz>2012-05-02 20:47:21 -0700
commit6aa1a0eeb1c28caf6af94a1323f69f3bb4256302 (patch)
treea3041cf14b8e08920c640fa7102c1efe5400a11c /httemplate/view
parent12555eec358d00a201f5d5321cd15c925a0cc503 (diff)
un-cancel, RT#17518
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/cust_main/packages/services.html2
-rw-r--r--httemplate/view/cust_main/packages/status.html34
2 files changed, 34 insertions, 2 deletions
diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html
index 5f458e635..c0a56d0f3 100644
--- a/httemplate/view/cust_main/packages/services.html
+++ b/httemplate/view/cust_main/packages/services.html
@@ -3,7 +3,7 @@
% ###
<TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
- <TABLE CLASS="inv" BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
+ <TABLE CLASS="inv" BORDER=0 CELLSPACING=0 CELLPADDING=2 WIDTH="100%">
<SCRIPT TYPE="text/javascript">
function clearhint_search_cust_svc(obj, str) {
if (obj.value == str) obj.value = '';
diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html
index 28df9da95..4aec90efb 100644
--- a/httemplate/view/cust_main/packages/status.html
+++ b/httemplate/view/cust_main/packages/status.html
@@ -32,7 +32,20 @@
% }
%
-% } else {
+% if ( $part_pkg->freq ) { #?
+
+ <TR>
+ <TD COLSPAN=<%$colspan%>>
+ <FONT SIZE=-1>
+% if ( $curuser->access_right('Un-cancel customer package') ) {
+ (&nbsp;<% pkg_uncancel_link($cust_pkg) %>&nbsp;)
+% }
+ <FONT>
+ </TD>
+ </TR>
+% }
+%
+% } else {
%
% if ( $cust_pkg->get('susp') ) { #status: suspended
% my $cpr = $cust_pkg->last_cust_pkg_reason('susp');
@@ -56,6 +69,8 @@
<% pkg_status_row($cust_pkg, emt('Setup'), 'setup', %opt ) %>
% }
+ <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
+
<% pkg_status_row_changed( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
<% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %>
% if ( $part_pkg->option('suspend_bill', 1) ) {
@@ -99,6 +114,8 @@
)
%>
+ <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
+
<TR>
<TD COLSPAN=<%$colspan%>>
<FONT SIZE=-1>
@@ -118,6 +135,7 @@
<% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
<% pkg_status_row_if($cust_pkg, emt('Start billing'), 'start_date', %opt) %>
+ <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
% }
%
@@ -133,6 +151,8 @@
<% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
+ <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
+
% } else {
%
% my $num_cust_svc = $cust_pkg->num_cust_svc;
@@ -166,6 +186,8 @@
<% pkg_status_row($cust_pkg, emt('Setup'), 'setup', %opt) %>
+ <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
+
% }
%
% }
@@ -467,6 +489,16 @@ sub pkg_cancel_link {
)
}
+sub pkg_uncancel_link {
+ include( '/elements/popup_link-cust_pkg.html',
+ 'action' => $p. 'misc/cancel_pkg.html?method=uncancel',
+ 'label' => emt('Un-cancel'),
+ 'actionlabel' => emt('Un-cancel'),
+ #'color' => #?
+ 'cust_pkg' => shift,
+ )
+}
+
sub pkg_expire_link {
include( '/elements/popup_link-cust_pkg.html',
'action' => $p. 'misc/cancel_pkg.html?method=expire',