import rt 2.0.14
[freeside.git] / httemplate / view / cust_pkg.cgi
index 0e67737..09a2a7a 100755 (executable)
@@ -1,6 +1,8 @@
-<!-- $Id: cust_pkg.cgi,v 1.6 2002-01-30 14:18:09 ivan Exp $ -->
+<!-- mason kludge -->
 <%
 
+my $conf = new FS::Conf;
+
 my %uiview = ();
 my %uiadd = ();
 foreach my $part_svc ( qsearch('part_svc',{}) ) {
@@ -36,7 +38,7 @@ my $otaker = $cust_pkg->getfield('otaker');
 print <<END;
 <SCRIPT>
 function areyousure(href) {
-    if (confirm("Permanantly delete included services and cancel this package?") == true)
+    if (confirm("Permanently delete included services and cancel this package?") == true)
         window.location.href = href;
 }
 </SCRIPT>
@@ -118,18 +120,18 @@ unless ($cancel) {
         my($svcnum)=$cust_svc->svcnum;
         my($label, $value, $svcdb) = $cust_svc->label;
         print <<END;
-<TR><TD><A HREF="$uiview{$svcpart}?$svcnum">(View) $svc: $value<A></TD></TR>
+<TR><TD><A HREF="$uiview{$svcpart}?$svcnum">(View/Edit) $svc: $value<A></TD></TR>
 END
       } else {
-        print <<END;
-<TR>
-  <TD><A HREF="$uiadd{$svcpart}?pkgnum$pkgnum-svcpart$svcpart">
-      (Add) $svc</A>
-   or <A HREF="../misc/link.cgi?pkgnum$pkgnum-svcpart$svcpart">
-      (Link to existing) $svc</A>
-  </TD>
-</TR>
-END
+        print qq!<TR><TD>!.
+              qq!<A HREF="$uiadd{$svcpart}?pkgnum$pkgnum-svcpart$svcpart">!.
+              qq!(Provision) $svc</A>!;
+
+        print qq! or <A HREF="../misc/link.cgi?pkgnum$pkgnum-svcpart$svcpart">!.
+              qq!(Link to legacy) $svc</A>!
+          if $conf->exists('legacy_link');
+
+        print '</TD></TR>';
       }
 
     }
@@ -137,11 +139,13 @@ END
   }
 
   print "</TABLE><FONT SIZE=-1>",
-        "Choose (View) to view or edit an existing service<BR>",
-        "Choose (Add) to setup a new service<BR>",
-        "Choose (Link to existing) to link to a legacy (pre-Freeside) service",
-        "</FONT>"
-  ;
+        "Choose (View/Edit) to view or edit an existing service<BR>",
+        "Choose (Provision) to setup a new service<BR>";
+
+  print "Choose (Link to legacy) to link to a legacy (pre-Freeside) service"
+    if $conf->exists('legacy_link');
+
+  print "</FONT>";
 }
 
 #formatting