[freeside-commits] freeside/httemplate/edit part_svc.cgi, 1.49,
1.50 svc_acct.cgi, 1.36, 1.37 svc_broadband.cgi, 1.8,
1.9 svc_domain.cgi, 1.11, 1.12 svc_external.cgi, 1.1,
1.2 svc_forward.cgi, 1.16, 1.17 svc_www.cgi, 1.15, 1.16
Ivan,,,
ivan at wavetail.420.am
Thu Jun 29 06:47:46 PDT 2006
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv17801/httemplate/edit
Modified Files:
part_svc.cgi svc_acct.cgi svc_broadband.cgi svc_domain.cgi
svc_external.cgi svc_forward.cgi svc_www.cgi
Log Message:
finish at least the automatic provisioning part
Index: svc_domain.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_domain.cgi,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- svc_domain.cgi 14 May 2006 16:47:30 -0000 1.11
+++ svc_domain.cgi 29 Jun 2006 13:47:44 -0000 1.12
@@ -44,14 +44,7 @@
$svcnum='';
- #set fixed and default fields from part_svc
- foreach my $part_svc_column (
- grep { $_->columnflag } $part_svc->all_part_svc_column
- ) {
- $svc_domain->setfield( $part_svc_column->columnname,
- $part_svc_column->columnvalue,
- );
- }
+ $svc_domain->set_default_and_fixed;
}
Index: svc_www.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_www.cgi,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- svc_www.cgi 26 May 2005 19:15:32 -0000 1.15
+++ svc_www.cgi 29 Jun 2006 13:47:44 -0000 1.16
@@ -42,14 +42,7 @@
$svcnum='';
- #set fixed and default fields from part_svc
- foreach my $part_svc_column (
- grep { $_->columnflag } $part_svc->all_part_svc_column
- ) {
- $svc_www->setfield( $part_svc_column->columnname,
- $part_svc_column->columnvalue,
- );
- }
+ $svc_www->set_default_and_fixed;
}
}
Index: part_svc.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_svc.cgi,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- part_svc.cgi 24 Jun 2006 16:41:44 -0000 1.49
+++ part_svc.cgi 29 Jun 2006 13:47:44 -0000 1.50
@@ -179,9 +179,10 @@
'condition' =>
sub { ref($_[0]) && $_[0]->{disable_fixed} },
},
- 'M' => { 'desc' => 'Manual selection from inventory',
- 'condition' => $inv_sub,
- },
+# need to template-ize httemplate/edit/svc_* first
+# 'M' => { 'desc' => 'Manual selection from inventory',
+# 'condition' => $inv_sub,
+# },
'A' => { 'desc' => 'Automatically fill in from inventory',
'condition' => $inv_sub,
},
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_acct.cgi,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- svc_acct.cgi 31 Jan 2006 04:26:54 -0000 1.36
+++ svc_acct.cgi 29 Jun 2006 13:47:44 -0000 1.37
@@ -68,18 +68,9 @@
}
}
- #set fixed and default fields from part_svc
- foreach my $part_svc_column (
- grep { $_->columnflag } $part_svc->all_part_svc_column
- ) {
- if ( $part_svc_column->columnname eq 'usergroup' ) {
- @groups = split(',', $part_svc_column->columnvalue);
- } else {
- $svc_acct->setfield( $part_svc_column->columnname,
- $part_svc_column->columnvalue,
- );
- }
- }
+ $svc_acct->set_default_and_fixed( {
+ 'usergroup' => sub { @groups = split(',', shift ); },
+ } );
}
@@ -274,7 +265,7 @@
<% foreach my $xid (qw( uid gid )) { %>
<%
- if ( $part_svc->part_svc_column($xid)->columnflag eq 'F'
+ if ( $part_svc->part_svc_column($xid)->columnflag =~ /^[FA]$/
|| ! $conf->exists("svc_acct-edit_$xid")
) {
%>
@@ -376,7 +367,7 @@
<% } %>
-<% if ( $part_svc->part_svc_column('slipip')->columnflag eq 'F' ) { %>
+<% if ( $part_svc->part_svc_column('slipip')->columnflag =~ /^[FA]$/ ) { %>
<INPUT TYPE="hidden" NAME="slipip" VALUE="<%= $svc_acct->slipip %>">
@@ -396,7 +387,7 @@
my $a = $2;
%>
- <% if ( $part_svc->part_svc_column($r)->columnflag eq 'F' ) { %>
+ <% if ( $part_svc->part_svc_column($r)->columnflag =~ /^[FA]$/ ) { %>
<INPUT TYPE="hidden" NAME="<%= $r %>" VALUE="<%= $svc_acct->getfield($r) %>">
Index: svc_external.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_external.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- svc_external.cgi 23 Dec 2003 02:36:38 -0000 1.1
+++ svc_external.cgi 29 Jun 2006 13:47:44 -0000 1.2
@@ -40,14 +40,7 @@
$svcnum='';
- #set fixed and default fields from part_svc
- foreach my $part_svc_column (
- grep { $_->columnflag } $part_svc->all_part_svc_column
- ) {
- $svc_external->setfield( $part_svc_column->columnname,
- $part_svc_column->columnvalue,
- );
- }
+ $svc_external->set_default_and_fixed;
}
}
Index: svc_broadband.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_broadband.cgi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- svc_broadband.cgi 31 Jan 2006 04:26:54 -0000 1.8
+++ svc_broadband.cgi 29 Jun 2006 13:47:44 -0000 1.9
@@ -47,14 +47,7 @@
$svcnum='';
- #set fixed and default fields from part_svc
- foreach my $part_svc_column (
- grep { $_->columnflag } $part_svc->all_part_svc_column
- ) {
- $svc_broadband->setfield( $part_svc_column->columnname,
- $part_svc_column->columnvalue,
- );
- }
+ $svc_broadband->set_default_and_fixed;
}
}
Index: svc_forward.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/svc_forward.cgi,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- svc_forward.cgi 31 Jan 2006 04:26:54 -0000 1.16
+++ svc_forward.cgi 29 Jun 2006 13:47:44 -0000 1.17
@@ -44,14 +44,7 @@
$svcnum='';
- #set fixed and default fields from part_svc
- foreach my $part_svc_column (
- grep { $_->columnflag } $part_svc->all_part_svc_column
- ) {
- $svc_forward->setfield( $part_svc_column->columnname,
- $part_svc_column->columnvalue,
- );
- }
+ $svc_forward->set_default_and_fixed;
}
}
More information about the freeside-commits
mailing list