X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fpart_svc.cgi;h=6d8a40f88455b4f01778d1c48a19e240107d6243;hb=0141b002ab937b2b3a21a92c3728bc3101f4668a;hp=befd9b24a47c3913e3783489437878f258ce846f;hpb=8fa7d60799d6d49bfe054e07b7b982c33772fb83;p=freeside.git
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi
index befd9b24a..6d8a40f88 100755
--- a/httemplate/edit/part_svc.cgi
+++ b/httemplate/edit/part_svc.cgi
@@ -1,52 +1,230 @@
-<%
-my $part_svc;
-my $clone = '';
-my $error = '';
-if ( $cgi->param('magic') eq 'process' ) {
+<& /elements/header.html, "$action Service Definition" &>
+<& /elements/menubar.html,
+ 'View all service definitions' => "${p}browse/part_svc.cgi"
+ #" onLoad=\"visualize()\""
+&>
- my $svcpart = $cgi->param('svcpart');
- my $old = qsearchs('part_svc', { 'svcpart' => $svcpart }) if $svcpart;
-
- $cgi->param( 'svc_acct__usergroup',
- join(',', $cgi->param('svc_acct__usergroup') ) );
-
- my $new = new FS::part_svc ( {
- map {
- $_, scalar($cgi->param($_));
- # } qw(svcpart svc svcdb)
- } ( fields('part_svc'),
- map { my $svcdb = $_;
- my @fields = fields($svcdb);
- push @fields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge
- map { ( $svcdb.'__'.$_, $svcdb.'__'.$_.'_flag' ) } @fields;
- } grep defined( $FS::Record::dbdef->table($_) ),
- qw( svc_acct svc_domain svc_forward svc_www svc_broadband )
- )
- } );
-
- my %exportnums =
- map { $_->exportnum => ( $cgi->param('exportnum'.$_->exportnum) || '') }
- qsearch('part_export', {} );
+<& /elements/init_overlib.html &>
+
+
- if ( $svcpart ) {
- $error = $new->replace($old, '1.3-COMPAT', [ 'usergroup' ], \%exportnums );
- } else {
- $error = $new->insert( [ 'usergroup' ], \%exportnums );
- $svcpart = $new->getfield('svcpart');
+
+
+
+