1 <% include('/elements/header.html', "$action Router", menubar(
2 'View all routers' => "${p}browse/router.cgi",
6 <% include('/elements/error.html') %>
8 <FORM ACTION="<%popurl(1)%>process/router.cgi" METHOD=POST>
9 <INPUT TYPE="hidden" NAME="table" VALUE="router">
10 <INPUT TYPE="hidden" NAME="redirect_ok" VALUE="<%$p3%>/browse/router.cgi">
11 <INPUT TYPE="hidden" NAME="redirect_error" VALUE="<%$p3%>/edit/router.cgi">
12 <INPUT TYPE="hidden" NAME="routernum" VALUE="<%$routernum%>">
13 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$router->svcnum%>">
14 Router #<%$routernum or "(NEW)"%>
16 <BR><BR>Name <INPUT TYPE="text" NAME="routername" SIZE=32 VALUE="<%$router->routername%>">
23 %foreach my $field ($router->virtual_fields) {
24 % print $router->pvf($field)->widget('HTML', 'edit',
25 % $router->getfield($field));
31 %unless ($router->svcnum) {
34 <BR><BR>Select the service types available on this router<BR>
37 % foreach my $part_svc ( qsearch('part_svc', { svcdb => 'svc_broadband',
38 % disabled => '' }) ) {
42 <INPUT TYPE="checkbox" NAME="svcpart_<%$part_svc->svcpart%>"<%
43 qsearchs('part_svc_router', { svcpart => $part_svc->svcpart,
44 routernum => $routernum } ) ? ' CHECKED' : ''%> VALUE="ON">
45 <A HREF="<%${p}%>edit/part_svc.cgi?<%$part_svc->svcpart%>">
46 <%$part_svc->svcpart%>: <%$part_svc->svc%></A>
51 <BR><BR><INPUT TYPE="submit" VALUE="Apply changes">
54 <% include('/elements/footer.html') %>
59 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
62 if ( $cgi->keywords ) {
63 my($query) = $cgi->keywords;
65 $router = qsearchs('router', { routernum => $1 })
66 or print $cgi->redirect(popurl(2)."browse/router.cgi") ;
68 $router = new FS::router ( {
69 map { $_, scalar($cgi->param($_)) } fields('router')
73 my $routernum = $router->routernum;
74 my $action = $routernum ? 'Edit' : 'Add';