diff options
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/browse/cust_main_county.cgi | 1 | ||||
-rwxr-xr-x | httemplate/browse/msgcat.cgi | 50 | ||||
-rwxr-xr-x | httemplate/browse/part_referral.cgi | 1 | ||||
-rwxr-xr-x | httemplate/browse/svc_acct_pop.cgi | 1 | ||||
-rw-r--r-- | httemplate/docs/schema.html | 8 | ||||
-rw-r--r-- | httemplate/docs/upgrade8.html | 9 | ||||
-rwxr-xr-x | httemplate/edit/svc_acct.cgi | 9 | ||||
-rw-r--r-- | httemplate/index.html | 1 | ||||
-rwxr-xr-x | httemplate/view/svc_acct.cgi | 6 |
9 files changed, 83 insertions, 3 deletions
diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi index 8fbd7faad..5df8dfae6 100755 --- a/httemplate/browse/cust_main_county.cgi +++ b/httemplate/browse/cust_main_county.cgi @@ -95,7 +95,6 @@ END print <<END; </TABLE> - </CENTER> </BODY> </HTML> END diff --git a/httemplate/browse/msgcat.cgi b/httemplate/browse/msgcat.cgi new file mode 100755 index 000000000..5dab5cfc9 --- /dev/null +++ b/httemplate/browse/msgcat.cgi @@ -0,0 +1,50 @@ +<!-- mason kludge --> +<% + +print header("Message catalog", menubar( + 'Main Menu' => $p, + 'Edit message catalog' => $p. "edit/msgcat.cgi", +)), '<BR>'; + +my $widget = new HTML::Widgets::SelectLayers( + 'selected_layer' => 'en_US', + 'options' => { 'en_US'=>'en_US' }, + 'layer_callback' => sub { + my $layer = shift; + my $html = "<BR>Messages for locale $layer<BR>". table(). + "<TR><TH COLSPAN=2>Code</TH>". + "<TH>Message</TH>"; + $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US'; + $html .= '</TR>'; + + #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } + # qsearchs('msgcat', { 'locale' => $layer } ) ) { + foreach my $msgcat ( qsearchs('msgcat', { 'locale' => $layer } ) ) { + $html .= '<TR><TD>'. $msgcat->msgnum. '</TD>'. + '<TD>'. $msgcat->msgcode. '</TD>'. + '<TD>'. $msgcat->msg. '</TD>'; + unless ( $layer eq 'en_US' ) { + my $en_msgcat = qsearchs('msgcat', { + 'locale' => 'en_US', + 'msgcode' => $msgcat->msgcode, + } ); + $html .= '<TD>'. $en_msgcat->msg. '</TD>'; + } + $html .= '</TR>'; + } + + $html .= '</TABLE>'; + $html; + }, + +); + +print $widget->html; + +print <<END; + </TABLE> + </BODY> +</HTML> +END + +%> diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi index bbae8d008..93a6976e1 100755 --- a/httemplate/browse/part_referral.cgi +++ b/httemplate/browse/part_referral.cgi @@ -30,7 +30,6 @@ print <<END; <TD COLSPAN=2><A HREF="${p}edit/part_referral.cgi"><I>Add a new advertising source</I></A></TD> </TR> </TABLE> - </CENTER> </BODY> </HTML> END diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi index fb42aa7e6..f8ee58c05 100755 --- a/httemplate/browse/svc_acct_pop.cgi +++ b/httemplate/browse/svc_acct_pop.cgi @@ -44,7 +44,6 @@ print <<END; <TD COLSPAN=5><A HREF="${p}edit/svc_acct_pop.cgi"><I>Add new Access Number</I></A></TD> </TR> </TABLE> - </CENTER> </BODY> </HTML> END diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index 192f56ba9..a7c21c7c9 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -298,6 +298,7 @@ <li>svcnum - <a href="#cust_svc">primary key</a> <li>username <li>_password + <li>sec_phrase - security phrase <li>popnum - <a href="#svc_acct_pop">Point of Presence</a> <li>uid <li>gid @@ -389,5 +390,12 @@ <li>svcnum - <a href="#svc_acct">account</a> <li>groupname </ul> + <li><a name="msgcat" href="man/FS/msgcat.html">msgcat</a> - i18n message catalog + <ul> + <li>msgnum - primary key + <li>msgcode - message code + <li>locale - locale + <li>msg - Message text + </ul> </ul> </body> diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html index 440024de2..a7b5853b3 100644 --- a/httemplate/docs/upgrade8.html +++ b/httemplate/docs/upgrade8.html @@ -179,6 +179,14 @@ CREATE TABLE radius_usergroup ( CREATE INDEX radius_usergroup1 ON radius_usergroup ( svcnum ); CREATE INDEX radius_usergroup2 ON radius_usergroup ( groupname ); +CREATE TABLE msgcat ( + msgnum int primary key, + msgcode varchar(80) not null, + locale varchar(16) not null, + msg text not null +); +CREATE INDEX msgcat1 ON msgcat ( msgcode, locale ); + ALTER TABLE svc_acct ADD domsvc integer NOT NULL; ALTER TABLE svc_domain ADD catchall integer NULL; ALTER TABLE cust_main ADD referral_custnum integer NULL; @@ -198,6 +206,7 @@ ALTER TABLE cust_credit ADD closed char(1) NULL; ALTER TABLE cust_refund ADD closed char(1) NULL; ALTER TABLE cust_bill_event ADD status varchar(80); ALTER TABLE cust_bill_event ADD statustext text NULL; +ALTER TABLE svc_acct ADD sec_phrase varchar(80) NULL; CREATE INDEX cust_main3 ON cust_main ( referral_custnum ); CREATE INDEX cust_credit_bill1 ON cust_credit_bill ( crednum ); CREATE INDEX cust_credit_bill2 ON cust_credit_bill ( invnum ); diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index 723c91c29..540d04c38 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -122,6 +122,15 @@ print &ntable("#cccccc",2), <<END; </TR> END +if ( $conf->exists('security_phrase') ) { + print <<END; + <TR><TD ALIGN="right">Security phrase</TD> + <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase" SIZE=32> + (for forgotten passwords)</TD> + </TD> +END +} + #domain my $domsvc = $svc_acct->domsvc || 0; if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'F' ) { diff --git a/httemplate/index.html b/httemplate/index.html index fecd107cc..99d8df956 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -186,6 +186,7 @@ <LI><A HREF="browse/svc_acct_pop.cgi">View/Edit Access Numbers</A> - Points of Presence <LI><A HREF="browse/part_bill_event.cgi">View/Edit invoice events</A> - Actions for overdue invoices + <LI><A HREF="browse/msgcat.cgi">View/Edit message catalog</A> - Change error messages and other customizable labels. </ul> <BR> </TD></TR> diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index b779e8774..496dab366 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -79,6 +79,12 @@ if ( $conf->exists('showpasswords') ) { print "</TR></TD>"; $password = ''; +if ( $conf->exists('security_phrase') ) { + my $sec_phrase = $svc_acct->sec_phrase; + print '<TR><TD ALIGN="right">Security phrase</TD><TD BGCOLOR="#ffffff">'. + $svc_acct->sec_phrase. '</TD></TR>; +} + my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum}); print "<TR><TD ALIGN=\"right\">Access number</TD>". "<TD BGCOLOR=\"#ffffff\">". $svc_acct_pop->text. '</TD></TR>' |