diff options
Diffstat (limited to 'httemplate/view')
-rwxr-xr-x | httemplate/view/cust_main.cgi | 46 | ||||
-rwxr-xr-x | httemplate/view/cust_pkg.cgi | 2 | ||||
-rwxr-xr-x | httemplate/view/svc_acct.cgi | 19 | ||||
-rwxr-xr-x | httemplate/view/svc_domain.cgi | 2 | ||||
-rwxr-xr-x | httemplate/view/svc_forward.cgi | 12 |
5 files changed, 61 insertions, 20 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 479648183..0610bc324 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -241,9 +241,10 @@ print '</TD></TR></TABLE>'; if ( defined $cust_main->dbdef_table->column('comments') && $cust_main->comments ) { - print "<BR>Comments", &ntable("#cccccc"), "<TR><TD>", - &ntable("#cccccc",2), - '<TR><TD BGCOLOR="#ffffff"><PRE>', $cust_main->comments, + print "<BR>Comments". &ntable("#cccccc"). "<TR><TD>". + &ntable("#cccccc",2). + '<TR><TD BGCOLOR="#ffffff"><PRE>'. + encode_entities($cust_main->comments). '</PRE></TD></TR></TABLE></TABLE>'; } @@ -271,13 +272,35 @@ print '<BR>'. qq!<FORM ACTION="${p}edit/process/quick-charge.cgi" METHOD="POST">!. qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!. qq!Description:<INPUT TYPE="text" NAME="pkg">!. - qq! Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>!. - qq! <INPUT TYPE="submit" VALUE="One-time charge"></FORM><BR>!; + qq! Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>!. + qq! !; + +#false laziness w/ edit/part_pkg.cgi +if ( $conf->exists('enable_taxclasses') ) { + print '<SELECT NAME="taxclass">'; + my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county') + or die dbh->errstr; + $sth->execute or die $sth->errstr; + foreach my $taxclass ( map $_->[0], @{$sth->fetchall_arrayref} ) { + print qq!<OPTION VALUE="$taxclass"!; + #print ' SELECTED' if $taxclass eq $hashref->{taxclass}; + print qq!>$taxclass</OPTION>!; + } + print '</SELECT>'; +} else { + print '<INPUT TYPE="hidden" NAME="taxclass" VALUE="">'; +} + +print qq!<INPUT TYPE="submit" VALUE="One-time charge"></FORM><BR>!; print <<END; <SCRIPT> function cust_pkg_areyousure(href) { - if (confirm("Permanantly delete included services and cancel this package?") == true) + if (confirm("Permanently delete included services and cancel this package?") == true) + window.location.href = href; +} +function svc_areyousure(href) { + if (confirm("Permanently unprovision and delete this service?") == true) window.location.href = href; } </SCRIPT> @@ -382,6 +405,7 @@ foreach my $package (@packages) { #foreach my $cust_svc ( @cust_svc ) { foreach my $svcpart ( sort { $a<=>$b } keys %pkg_svc ) { my $svc = qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc'); + $svc =~ s/ / /g; my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum, 'svcpart'=>$svcpart, }); @@ -392,13 +416,13 @@ foreach my $package (@packages) { my($svcnum) = $cust_svc->svcnum; my($sview) = popurl(2). "view"; print $n2,qq!<TD><A HREF="$sview/$svcdb.cgi?$svcnum"><FONT SIZE=-1>$label</FONT></A></TD>!, - qq!<TD><A HREF="$sview/$svcdb.cgi?$svcnum"><FONT SIZE=-1>$value</FONT></A></TD>!; + qq!<TD><FONT SIZE=-1><A HREF="$sview/$svcdb.cgi?$svcnum">$value</A><BR>( <A HREF="javascript:svc_areyousure('${p}misc/unprovision.cgi?$svcnum')">Unprovision</A> )</FONT></TD>!; } else { print $n2, qq!<TD COLSPAN=2><A HREF="$uiadd{$svcpart}?pkgnum$pkgnum-svcpart$svcpart"><b><font size="+1" color="#ff0000">!. - qq!Provision $svc</A></b></font>!; + qq!Provision $svc</A></b></font>!; print qq!<BR><A HREF="../misc/link.cgi?pkgnum$pkgnum-svcpart$svcpart">!. - qq!<b><font size="+1" color="#ff0000">Link to legacy $svc</A></b></font>! + qq!<b><font size="+1" color="#ff0000">Link to legacy $svc</A></b></font>! if $conf->exists('legacy_link'); print '</TD>'; @@ -604,10 +628,10 @@ foreach my $item (sort keyfield_numerically @history) { ( $charge ? "\$".sprintf("%.2f",$charge) : '' ), "</FONT></TD>", "<TD><FONT SIZE=-1>", - ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ), + ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ), "</FONT></TD>", "<TD><FONT SIZE=-1>", - ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ), + ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ), "</FONT></TD>", "<TD><FONT SIZE=-1>", ( $refund ? "\$".sprintf("%.2f",$refund) : '' ), diff --git a/httemplate/view/cust_pkg.cgi b/httemplate/view/cust_pkg.cgi index 75fe983b4..09a2a7a8b 100755 --- a/httemplate/view/cust_pkg.cgi +++ b/httemplate/view/cust_pkg.cgi @@ -38,7 +38,7 @@ my $otaker = $cust_pkg->getfield('otaker'); print <<END; <SCRIPT> function areyousure(href) { - if (confirm("Permanantly delete included services and cancel this package?") == true) + if (confirm("Permanently delete included services and cancel this package?") == true) window.location.href = href; } </SCRIPT> diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index fd2a32547..19953bafd 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -39,16 +39,27 @@ if ( $svc_acct->domsvc ) { $domain = $mydomain; } -print header('Account View', menubar( +%> + +<SCRIPT> +function areyousure(href) { + if (confirm("Permanently delete this account?") == true) + window.location.href = href; +} +</SCRIPT> + +<%= header('Account View', menubar( ( ( $pkgnum || $custnum ) ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", ) : ( "Cancel this (unaudited) account" => - "${p}misc/cancel-unaudited.cgi?$svcnum" ) + "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')" ) ), "Main menu" => $p, -)); +)) %> + +<% #print qq!<BR><A HREF="../misc/sendconfig.cgi?$svcnum">Send account information</A>!; @@ -72,7 +83,7 @@ if ( $password =~ /^\*\w+\* (.*)$/ ) { print "<I>(login disabled)</I> "; } if ( $conf->exists('showpasswords') ) { - print "$password"; + print '<PRE>'. encode_entities($password). '</PRE>'; } else { print "<I>(hidden)</I>"; } diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi index b70ac8f90..cc3cdb6bf 100755 --- a/httemplate/view/svc_domain.cgi +++ b/httemplate/view/svc_domain.cgi @@ -46,7 +46,7 @@ my $domain = $svc_domain->domain; Service #<%= $svcnum %> <BR>Service: <B><%= $part_svc->svc %></B> <BR>Domain name: <B><%= $domain %></B> -<BR>Catch all email <A HREF="${p}misc/catchall.cgi?<%= $svcnum %>">(change)</A>: +<BR>Catch all email <A HREF="<%= ${p} %>misc/catchall.cgi?<%= $svcnum %>">(change)</A>: <%= $email ? "<B>$email</B>" : "<I>(none)<I>" %> <BR><BR><A HREF="http://www.geektools.com/cgi-bin/proxy.cgi?query=<%=$domain%>;targetnic=auto">View whois information.</A> <BR><BR> diff --git a/httemplate/view/svc_forward.cgi b/httemplate/view/svc_forward.cgi index 8d2afc823..c8d1d6213 100755 --- a/httemplate/view/svc_forward.cgi +++ b/httemplate/view/svc_forward.cgi @@ -53,9 +53,15 @@ if ($dstsvc) { } print qq!<A HREF="${p}edit/svc_forward.cgi?$svcnum">Edit this information</A>!. - "<BR>Service #$svcnum". - "<BR>Service: <B>$svc</B>". - qq!<BR>Mail to <B>$source</B> forwards to <B>$destination</B> mailbox.!. + ntable("#cccccc",2). + '<TR><TD ALIGN="right">Service number</TD>'. + qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!. + '<TR><TD ALIGN="right">Service</TD>'. + qq!<TD BGCOLOR="#ffffff">$svc</TD></TR>!. + qq!<TR><TD ALIGN="right">Email to</TD>!. + qq!<TD BGCOLOR="#ffffff">$source</TD></TR>!. + qq!<TR><TD ALIGN="right">Forwards to </TD>!. + qq!<TD BGCOLOR="#ffffff">$destination</TD></TR></TABLE>!. '<BR>'. joblisting({'svcnum'=>$svcnum}, 1). '</BODY></HTML>' ; |