<% my $router; if ( $cgi->keywords ) { my($query) = $cgi->keywords; $query =~ /^(\d+)$/; $router = qsearchs('router', { routernum => $1 }) or print $cgi->redirect(popurl(2)."browse/router.cgi") ; } else { $router = new FS::router ( { map { $_, scalar($cgi->param($_)) } fields('router') } ); } my $routernum = $router->routernum; my $action = $routernum ? 'Edit' : 'Add'; print header("$action Router", menubar( 'Main Menu' => "$p", 'View all routers' => "${p}browse/router.cgi", )); my $p3 = popurl(3); if($cgi->param('error')) { %> Error: <%=$cgi->param('error')%> <% } %>
Router #<%=$routernum or "(NEW)"%>

Name

Custom fields:
<%=table() %> <% foreach my $field ($router->virtual_fields) { print $router->pvf($field)->widget('HTML', 'edit', $router->getfield($field)); } %> <% unless ($router->svcnum) { %>

Select the service types available on this router
<% foreach my $part_svc ( qsearch('part_svc', { svcdb => 'svc_broadband', disabled => '' }) ) { %>
$part_svc->svcpart, routernum => $routernum } ) ? ' CHECKED' : ''%> VALUE="ON"> <%=$part_svc->svcpart%>: <%=$part_svc->svc%> <% } %> <% } %>