X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct_pop.cgi;h=5930a38be66d57ca4aa2bf2163c5b2c66aa50b74;hp=3ba0f14396236216803a7b753eec52249c45cc8d;hb=37591b61f8ad6fc5c5acb2fd8f520d2dbe4f1539;hpb=91387f8f489e561deaf1de052d80ef800a4970a3 diff --git a/httemplate/edit/svc_acct_pop.cgi b/httemplate/edit/svc_acct_pop.cgi index 3ba0f1439..5930a38be 100755 --- a/httemplate/edit/svc_acct_pop.cgi +++ b/httemplate/edit/svc_acct_pop.cgi @@ -1,17 +1,39 @@ -<% -# +<% 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> -use strict; -use vars qw( $cgi $svc_acct_pop $action $query $hashref $p1 ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs fields); -use FS::CGI qw(header menubar popurl); -use FS::svc_acct_pop; -$cgi = new CGI; -&cgisuidsetup($cgi); +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') @@ -23,44 +45,9 @@ if ( $cgi->param('error') ) { } else { #adding $svc_acct_pop = new FS::svc_acct_pop {}; } -$action = $svc_acct_pop->popnum ? 'Edit' : 'Add'; -$hashref = $svc_acct_pop->hashref; - -$p1 = popurl(1); -print $cgi->header( @FS::CGI::header ), header("$action POP", menubar( - 'Main Menu' => popurl(2), - 'View all POPs' => popurl(2). "browse/svc_acct_pop.cgi", -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); +my $action = $svc_acct_pop->popnum ? 'Edit' : 'Add'; +my $hashref = $svc_acct_pop->hashref; -print qq!
!; +my $p1 = popurl(1); -#display - -print qq!!, - "POP #", $hashref->{popnum} ? $hashref->{popnum} : "(NEW)"; - -print < -City -State -Area Code -Exchange -Local - -END - -print qq!
!; - -print < - - -END - -%> +