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') %>
30 my $curuser = $FS::CurrentUser::CurrentUser;
33 unless $curuser->access_right('Dialup configuration')
34 || $curuser->access_right('Dialup global configuration');
37 if ( $cgi->param('error') ) {
38 $svc_acct_pop = new FS::svc_acct_pop ( {
39 map { $_, scalar($cgi->param($_)) } fields('svc_acct_pop')
41 } elsif ( $cgi->keywords ) { #editing
42 my($query)=$cgi->keywords;
44 $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1});
46 $svc_acct_pop = new FS::svc_acct_pop {};
48 my $action = $svc_acct_pop->popnum ? 'Edit' : 'Add';
49 my $hashref = $svc_acct_pop->hashref;