X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htdocs%2Fedit%2Fpart_svc.cgi;h=9baaabfe0a61aff1620a4f0ffe6f438930bf02c2;hb=d51c41b94bfa87d6c779ac666495151bf6fc3913;hp=491c013fe04ecd6c761ccda6af6941e2773e0ce5;hpb=481d87526d7137aaded7ed282983938f5515e603;p=freeside.git diff --git a/htdocs/edit/part_svc.cgi b/htdocs/edit/part_svc.cgi index 491c013fe..9baaabfe0 100755 --- a/htdocs/edit/part_svc.cgi +++ b/htdocs/edit/part_svc.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# part_svc.cgi: Add/Edit service (output form) +# $Id: part_svc.cgi,v 1.5 1998-12-30 23:03:21 ivan Exp $ # # ivan@sisd.com 97-nov-14 # @@ -8,24 +8,33 @@ # bmccane@maxbaud.net 98-apr-3 # # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 +# +# $Log: part_svc.cgi,v $ +# Revision 1.5 1998-12-30 23:03:21 ivan +# bugfixes; fields isn't exported by derived classes +# +# Revision 1.4 1998/12/17 06:17:07 ivan +# fix double // in relative URLs, s/CGI::Base/CGI/; +# +# Revision 1.3 1998/11/21 06:43:26 ivan +# visual +# use strict; -use CGI::Base; +use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearchs); -use FS::part_svc qw(fields); -use FS::CGI qw(header menubar); +use FS::Record qw(qsearchs fields); +use FS::part_svc; +use FS::CGI qw(header menubar popurl table); -my($cgi) = new CGI::Base; -$cgi->get; +my($cgi) = new CGI; &cgisuidsetup($cgi); -SendHeaders(); # one guess. - my($part_svc,$action); -if ( $cgi->var('QUERY_STRING') =~ /^(\d+)$/ ) { #editing +my($query) = $cgi->keywords; +if ( $query && $query =~ /^(\d+)$/ ) { #editing $part_svc=qsearchs('part_svc',{'svcpart'=>$1}); $action='Edit'; } else { #adding @@ -34,12 +43,11 @@ if ( $cgi->var('QUERY_STRING') =~ /^(\d+)$/ ) { #editing } my($hashref)=$part_svc->hashref; -print header("$action Service Definition", menubar( - 'Main Menu' => '../', - 'View all services' => '../browse/part_svc.cgi', -)), '
'; - - +my $p = popurl(2); +print $cgi->header, header("$action Service Definition", menubar( + 'Main Menu' => $p, + 'View all services' => "${p}browse/part_svc.cgi", +)), ''; print qq!!, "Service Part #", $hashref->{svcpart} ? $hashref->{svcpart} : "(NEW)"; @@ -47,29 +55,32 @@ print qq!!, print < Service -Table ', + map '{svcdb}). ">$_\n", qw( + svc_acct svc_domain svc_acct_sm + ); + print ""; +# svc_acct svc_domain svc_acct_sm svc_charge svc_wo + +print <Field Modifier END @@ -80,7 +91,7 @@ my(%defs)=( 'dir' => 'Home directory', 'uid' => 'UID (set to fixed and blank for dial-only)', 'slipip' => 'IP address', - 'popnum' => 'POP number', + 'popnum' => qq!POP number!, 'username' => 'Username', 'quota' => '(unimplemented)', '_password' => 'Password', @@ -106,8 +117,9 @@ my(%defs)=( ); my($svcdb); +# svc_acct svc_domain svc_acct_sm svc_charge svc_wo foreach $svcdb ( qw( - svc_acct svc_domain svc_acct_sm svc_charge svc_wo + svc_acct svc_domain svc_acct_sm ) ) { my(@rows)=map { /^${svcdb}__(.*)$/; $1 } @@ -123,21 +135,21 @@ foreach $svcdb ( qw( my($flag)=$part_svc->getfield($svcdb.'__'.$row.'_flag'); print "$ptmp$row - $defs{$svcdb}{$row}"; print qq!
Off"; + ' CHECKED'x($flag eq ''). ">Off"; print qq!Default "; print qq!Fixed "; - print qq!
!, - ""; + print qq!!, + "\n"; $ptmp=''; } } print ""; -print qq!\n

!; + qq!">!; print <