1 <% include('/elements/header.html', "$action Access Number", menubar(
2 'View all Access Numbers' => popurl(2). "browse/svc_acct_pop.cgi",
6 <% include('/elements/error.html') %>
8 <FORM ACTION="<%$p1%>process/svc_acct_pop.cgi" METHOD=POST>
10 <INPUT TYPE="hidden" NAME="popnum" VALUE="<% $hashref->{popnum} %>">
11 Access Number #<% $hashref->{popnum} ? $hashref->{popnum} : "(NEW)" %>
14 City <INPUT TYPE="text" NAME="city" SIZE=32 VALUE="<% $hashref->{city} %>">
15 State <INPUT TYPE="text" NAME="state" SIZE=16 MAXLENGTH=16 VALUE="<% $hashref->{state} %>">
16 Area Code <INPUT TYPE="text" NAME="ac" SIZE=4 MAXLENGTH=3 VALUE="<% $hashref->{ac} %>">
17 Exchange <INPUT TYPE="text" NAME="exch" SIZE=4 MAXLENGTH=3 VALUE="<% $hashref->{exch} %>">
18 Local <INPUT TYPE="text" NAME="loc" SIZE=5 MAXLENGTH=4 VALUE="<% $hashref->{loc} %>">
22 <INPUT TYPE="submit" VALUE="<% $hashref->{popnum} ? "Apply changes" : "Add Access Number" %>">
26 <% include('/elements/footer.html') %>
31 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
34 if ( $cgi->param('error') ) {
35 $svc_acct_pop = new FS::svc_acct_pop ( {
36 map { $_, scalar($cgi->param($_)) } fields('svc_acct_pop')
38 } elsif ( $cgi->keywords ) { #editing
39 my($query)=$cgi->keywords;
41 $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1});
43 $svc_acct_pop = new FS::svc_acct_pop {};
45 my $action = $svc_acct_pop->popnum ? 'Edit' : 'Add';
46 my $hashref = $svc_acct_pop->hashref;