X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fprocess%2Fnms-add_router.html;h=c3b42a8d3cdfeb3629aa52cca6f9ae34ccf1f23c;hb=cace897d9c5fbe1f80277b0cb14e85c9d2272cf1;hp=a77d897d27773bff9cf47429f42c75604bc28d00;hpb=b412c2545d8862278343adc1ef17cc297e11ad6d;p=freeside.git diff --git a/httemplate/misc/process/nms-add_router.html b/httemplate/misc/process/nms-add_router.html index a77d897d2..c3b42a8d3 100644 --- a/httemplate/misc/process/nms-add_router.html +++ b/httemplate/misc/process/nms-add_router.html @@ -1,4 +1,7 @@ -<% header('Router added') %> +<& /elements/header-popup.html, 'Router added' &> + <%init> @@ -6,12 +9,13 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring'); my $host = $cgi->param('host'); -die 'invalid host' unless $host =~ /^[0-9.a-zA-Z\-]+$/; +errorpage_popup('invalid host') unless $host =~ /^[0-9.a-zA-Z\-]+$/; my $community = $cgi->param('community'); -die 'invalid SNMP community string' unless $community =~ /^[0-9.a-zA-Z\-]*$/; +errorpage_popup('invalid SNMP community string') unless $community =~ /^[0-9.a-zA-Z\-]*$/; my $nms = new FS::NetworkMonitoringSystem; -$nms->add_router($host,$community); +my $error = $nms->add_router($host,$community); +errorpage_popup($error) if $error;