[freeside-commits] freeside/httemplate/edit/process access_group.html, NONE, 1.1 access_user.html, NONE, 1.1 agent_type.cgi, 1.6, 1.7 cust_bill_pay.cgi, 1.4, 1.5 cust_credit.cgi, 1.8, 1.9 cust_credit_bill.cgi, 1.6, 1.7

Ivan,,, ivan at wavetail.420.am
Sun May 14 09:47:32 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail:/tmp/cvs-serv14201/httemplate/edit/process

Modified Files:
	agent_type.cgi cust_bill_pay.cgi cust_credit.cgi 
	cust_credit_bill.cgi 
Added Files:
	access_group.html access_user.html 
Log Message:
first part of ACL and re-skinning work and some other small stuff

Index: cust_bill_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_bill_pay.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cust_bill_pay.cgi	29 Jun 2004 04:02:45 -0000	1.4
+++ cust_bill_pay.cgi	14 May 2006 16:47:30 -0000	1.5
@@ -33,11 +33,19 @@
 my $error = $new->insert;
 
 if ( $error ) {
+
   $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "cust_bill_pay.cgi?". $cgi->query_string );
+  %><%= $cgi->redirect(popurl(2). "cust_bill_pay.cgi?". $cgi->query_string ) %><%
+
 } else {
-  print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
-}
 
+  #print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
 
-%>
+  %><%= header('Payment application sucessful') %>
+  <SCRIPT TYPE="text/javascript">
+    window.top.location.reload();
+  </SCRIPT>
+
+  </BODY></HTML>
+
+<% } %>

--- NEW FILE: access_user.html ---
<%= include( 'elements/process.html',
               'table'       => 'access_user',
               'viewall_dir' => 'browse',
               'process_m2m' => { 'link_table'   => 'access_usergroup',
                                  'target_table' => 'access_group',
                                },
           )
%>

--- NEW FILE: access_group.html ---
<%= include( 'elements/process.html',
               'table'       => 'access_group',
               'viewall_dir' => 'browse',
           )
%>

Index: agent_type.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/agent_type.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- agent_type.cgi	12 Apr 2002 13:22:03 -0000	1.6
+++ agent_type.cgi	14 May 2006 16:47:30 -0000	1.7
@@ -11,43 +11,24 @@
 
 my $error;
 if ( $typenum ) {
-  $error=$new->replace($old);
+  $error = $new->replace($old);
 } else {
-  $error=$new->insert;
-  $typenum=$new->getfield('typenum');
+  $error    = $new->insert;
+  $typenum  = $new->getfield('typenum');
 }
+#$error  ||= $new->process_m2m( );
 
 if ( $error ) {
   $cgi->param('error', $error);
   print $cgi->redirect(popurl(2). "agent_type.cgi?". $cgi->query_string );
 } else {
 
-  #false laziness w/ edit/process/part_svc.cgi
-  foreach my $part_pkg (qsearch('part_pkg',{})) {
-    my($pkgpart)=$part_pkg->getfield('pkgpart');
-
-    my($type_pkgs)=qsearchs('type_pkgs',{
-        'typenum' => $typenum,
-        'pkgpart' => $pkgpart,
-    });
-    if ( $type_pkgs && ! $cgi->param("pkgpart$pkgpart") ) {
-      my($d_type_pkgs)=$type_pkgs; #need to save $type_pkgs for below.
-      $error=$d_type_pkgs->delete;
-      die $error if $error;
-
-    } elsif ( $cgi->param("pkgpart$pkgpart")
-              && ! $type_pkgs
-    ) {
-      #ok to clobber it now (but bad form nonetheless?)
-      $type_pkgs=new FS::type_pkgs ({
-        'typenum' => $typenum,
-        'pkgpart' => $pkgpart,
-      });
-      $error= $type_pkgs->insert;
-      die $error if $error;
-    }
-
-  }
+  my $error = $new->process_m2m(
+    'link_table'   => 'type_pkgs',
+    'target_table' => 'part_pkg',
+    'params'       => scalar($cgi->Vars)
+  );
+  die $error if $error;
 
   print $cgi->redirect(popurl(3). "browse/agent_type.cgi");
 }

Index: cust_credit_bill.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_credit_bill.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cust_credit_bill.cgi	9 Dec 2005 16:58:40 -0000	1.6
+++ cust_credit_bill.cgi	14 May 2006 16:47:30 -0000	1.7
@@ -34,11 +34,19 @@
 my $error = $new->insert;
 
 if ( $error ) {
+
   $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "cust_credit_bill.cgi?". $cgi->query_string );
+  %><%= $cgi->redirect(popurl(2). "cust_credit_bill.cgi?". $cgi->query_string ) %><%
+
 } else {
-  print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
-}
 
+  #print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
 
-%>
+  %><%= header('Credit application sucessful') %>
+  <SCRIPT TYPE="text/javascript">
+    window.top.location.reload();
+  </SCRIPT>
+
+  </BODY></HTML>
+
+<% } %>

Index: cust_credit.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/cust_credit.cgi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cust_credit.cgi	6 Jul 2004 17:26:02 -0000	1.8
+++ cust_credit.cgi	14 May 2006 16:47:30 -0000	1.9
@@ -13,14 +13,23 @@
 
 if ( $error ) {
   $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "cust_credit.cgi?". $cgi->query_string );
+
+  %><%= $cgi->redirect(popurl(2). "cust_credit.cgi?". $cgi->query_string ) %><%
+
 } else {
+
   if ( $cgi->param('apply') eq 'yes' ) {
     my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum })
       or die "unknown custnum $custnum";
     $cust_main->apply_credits;
   }
-  print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
-}
+  #print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum");
 
-%>
+  %><%= header('Credit sucessful') %>
+  <SCRIPT TYPE="text/javascript">
+    window.top.location.reload();
+  </SCRIPT>
+
+  </BODY></HTML>
+
+<% } %>



More information about the freeside-commits mailing list