svc_hardware and svc_dish, #11454
[freeside.git] / httemplate / view / elements / svc_edit_link.html
1 % if ( $cancel_date ) {
2 <I>Canceled <% time2str('%b %o %Y', $cancel_date) %></I>
3 % } else {
4 <SCRIPT>
5 function areyousure_delete() {
6   if (confirm("Permanently delete this service?") == true)
7     window.location.href = '<% $cancel_url %>';
8 }
9 </SCRIPT>
10 <A HREF="<% $edit_url %>">Edit this <% $label %></A> | 
11 <A HREF="javascript:areyousure_delete()">
12 Unprovision this Service</A>
13 % }
14 <%init>
15 my %opt = @_;
16 my $svc_x = $opt{'svc'} or die "'svc' required";
17 my $svcdb = $opt{'table'} || $svc_x->table;
18 my $edit_url = $opt{'edit_url'} || 
19                $p . 'edit/' . $svcdb . '.cgi?' . $svc_x->svcnum;
20 my $cancel_url = $p . 'misc/unprovision.cgi?' . $svc_x->svcnum;
21 my $cust_svc = $svc_x->cust_svc; # always exists
22 my $cancel_date = $cust_svc->pkg_cancel_date;
23 my ($label) = $cust_svc->label;
24 </%init>