freeside/httemplate/view svc_acct.cgi,1.36,1.37

ivan ivan at pouncequick.420.am
Thu Jul 29 21:54:44 PDT 2004


Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory pouncequick:/tmp/cvs-serv8444/httemplate/view

Modified Files:
	svc_acct.cgi 
Log Message:
svcpart changes now trigger all necessary export actions, manual svcpart changing on svc_acct view, linking changes svcpart if you ask it to, closes: Bug#671, Bug#644

Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_acct.cgi,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- svc_acct.cgi	22 Mar 2004 11:05:58 -0000	1.36
+++ svc_acct.cgi	30 Jul 2004 04:54:41 -0000	1.37
@@ -108,6 +108,48 @@
 
 #print qq!<BR><A HREF="../misc/sendconfig.cgi?$svcnum">Send account information</A>!;
 
+%>
+
+<% 
+  my @part_svc = ();
+  if ( $pkgnum ) { 
+    @part_svc = grep {    $_->svcdb   eq 'svc_acct'
+                       && $_->svcpart != $part_svc->svcpart }
+                $cust_pkg->available_part_svc;
+  } else {
+    @part_svc = qsearch('part_svc', {
+      svcdb    => 'svc_acct',
+      disabled => '',
+      svcpart  => { op=>'!=', value=>$part_svc->svcpart },
+    } );
+  }
+  if ( @part_svc ) {
+%>
+  <SCRIPT TYPE="text/javascript">
+  function enable_change () {
+    if ( document.OneTrueForm.svcpart.selectedIndex > 1 ) {
+      document.OneTrueForm.submit.disabled = false;
+    } else {
+      document.OneTrueForm.submit.disabled = true;
+    }
+  }
+  </SCRIPT>
+  <FORM NAME="OneTrueForm" ACTION="<%=$p%>edit/process/cust_svc.cgi">
+  <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%= $svcnum %>">
+  <INPUT TYPE="hidden" NAME="pkgnum" VALUE="<%= $pkgnum %>">
+  <SELECT NAME="svcpart" onChange="enable_change()">
+    <OPTION VALUE="">Change service</OPTION>
+    <OPTION VALUE="">--------------</OPTION>
+    <% foreach my $part_svc ( @part_svc ) { %>
+      <OPTION VALUE="<%= $part_svc->svcpart %>"><%= $part_svc->svc %></OPTION>
+    <% } %>
+  </SELECT>
+  <INPUT NAME="submit" TYPE="submit" VALUE="Change" disabled>
+  </FORM>
+<% } %>
+
+<%
+
 print qq!<A HREF="${p}edit/svc_acct.cgi?$svcnum">Edit this information</A><BR>!.
       &ntable("#cccccc"). '<TR><TD>'. &ntable("#cccccc",2).
       "<TR><TD ALIGN=\"right\">Service number</TD>".




More information about the freeside-commits mailing list