X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct_pop.cgi;h=5930a38be66d57ca4aa2bf2163c5b2c66aa50b74;hp=641aa0378eb1add0fc0625f246575465bc846b7b;hb=9d5f61a78f7cddeb65f6943f3e58326f47cc0c0b;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1 diff --git a/httemplate/edit/svc_acct_pop.cgi b/httemplate/edit/svc_acct_pop.cgi index 641aa0378..5930a38be 100755 --- a/httemplate/edit/svc_acct_pop.cgi +++ b/httemplate/edit/svc_acct_pop.cgi @@ -1,57 +1,53 @@ - -% -% -%my $svc_acct_pop; -%if ( $cgi->param('error') ) { -% $svc_acct_pop = new FS::svc_acct_pop ( { -% map { $_, scalar($cgi->param($_)) } fields('svc_acct_pop') -% } ); -%} elsif ( $cgi->keywords ) { #editing -% my($query)=$cgi->keywords; -% $query =~ /^(\d+)$/; -% $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1}); -%} else { #adding -% $svc_acct_pop = new FS::svc_acct_pop {}; -%} -%my $action = $svc_acct_pop->popnum ? 'Edit' : 'Add'; -%my $hashref = $svc_acct_pop->hashref; -% -%my $p1 = popurl(1); -%print header("$action Access Number", menubar( -% 'Main Menu' => popurl(2), -% 'View all Access Numbers' => popurl(2). "browse/svc_acct_pop.cgi", -%)); -% -%print qq!Error: !, $cgi->param('error'), -% "" -% if $cgi->param('error'); -% -%print qq!
!; -% -%#display -% -%print qq!!, -% "POP #", $hashref->{popnum} ? $hashref->{popnum} : "(NEW)"; -% -%print < -%City -%State -%Area Code -%Exchange -%Local -% -%END -% -%print qq!
!; -% -%print < -% -% -%END -% -% +<% include('/elements/header.html', "$action Access Number", menubar( + 'View all Access Numbers' => popurl(2). "browse/svc_acct_pop.cgi", + )) +%> +<% include('/elements/error.html') %> + + + + +Access Number #<% $hashref->{popnum} ? $hashref->{popnum} : "(NEW)" %> + +
+City      
+State     
+Area Code 
+Exchange  
+Local     
+
+ +
+"> + + + +<% include('/elements/footer.html') %> + +<%init> + +my $curuser = $FS::CurrentUser::CurrentUser; + +die "access denied" + unless $curuser->access_right('Dialup configuration') + || $curuser->access_right('Dialup global configuration'); + +my $svc_acct_pop; +if ( $cgi->param('error') ) { + $svc_acct_pop = new FS::svc_acct_pop ( { + map { $_, scalar($cgi->param($_)) } fields('svc_acct_pop') + } ); +} elsif ( $cgi->keywords ) { #editing + my($query)=$cgi->keywords; + $query =~ /^(\d+)$/; + $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1}); +} else { #adding + $svc_acct_pop = new FS::svc_acct_pop {}; +} +my $action = $svc_acct_pop->popnum ? 'Edit' : 'Add'; +my $hashref = $svc_acct_pop->hashref; + +my $p1 = popurl(1); + +