[freeside-commits] freeside/httemplate/edit msgcat.cgi,1.3,1.4
Ivan,,,
ivan at wavetail.420.am
Tue Jan 30 12:59:16 PST 2007
- Previous message: [freeside-commits] freeside/httemplate/browse addr_block.cgi, 1.3,
1.4 agent.cgi, 1.36, 1.37 agent_type.cgi, 1.17,
1.18 cust_main_county.cgi, 1.15, 1.16 msgcat.cgi, 1.5,
1.6 part_bill_event.cgi, 1.13, 1.14 part_export.cgi, 1.5,
1.6 part_pkg.cgi, 1.36, 1.37 part_svc.cgi, 1.29,
1.30 part_virtual_field.cgi, 1.5, 1.6 rate.cgi, 1.4,
1.5 router.cgi, 1.7, 1.8 svc_acct_pop.cgi, 1.18,
1.19 access_group.html, 1.3, 1.4 access_user.html, 1.4,
1.5 inventory_class.html, 1.3, 1.4 part_referral.html, 1.5,
1.6 payment_gateway.html, 1.4, 1.5 pkg_class.html, 1.3,
1.4 reason.html, 1.1, 1.2 reason_type.html, 1.1, 1.2
- Next message: [freeside-commits] freeside/FS/FS svc_acct.pm,1.212,1.213
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv11411/edit
Modified Files:
msgcat.cgi
Log Message:
its all about control
Index: msgcat.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/msgcat.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- msgcat.cgi 23 Aug 2006 22:25:37 -0000 1.3
+++ msgcat.cgi 30 Jan 2007 20:59:14 -0000 1.4
@@ -1,59 +1,57 @@
-<!-- mason kludge -->
-%
-%
-%print header("Edit Message catalog", menubar(
-%# 'Main Menu' => $p,
-%)), '<BR>';
-%
-%print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !. $cgi->param('error').
-% '</FONT><BR><BR>'
-% if $cgi->param('error');
-%
-%my $widget = new HTML::Widgets::SelectLayers(
-% 'selected_layer' => 'en_US',
-% 'options' => { 'en_US'=>'en_US' },
-% 'form_action' => 'process/msgcat.cgi',
-% 'layer_callback' => sub {
-% my $layer = shift;
-% my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!.
-% "<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 }
-% # qsearch('msgcat', { 'locale' => $layer } ) ) {
-% foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) {
-% $html .=
-% '<TR><TD>'. $msgcat->msgnum. '</TD><TD>'. $msgcat->msgcode. '</TD>'.
-% '<TD><INPUT TYPE="text" SIZE=32 '.
-% qq! NAME="!. $msgcat->msgnum. '" '.
-% qq!VALUE="!. ($cgi->param($msgcat->msgnum)||$msgcat->msg). qq!"></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><BR><INPUT TYPE="submit" VALUE="Apply changes">';
-%
-% $html;
-% },
-%
-%);
-%
-%print $widget->html;
-%
-%print <<END;
-% </TABLE>
-% </BODY>
-%</HTML>
-%END
-%
-%
+<% header("Edit Message catalog" ) %>
+<BR>
+
+% if ( $cgi->param('error') ) {
+ <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
+ <BR><BR>
+% }
+
+<% $widget->html %>
+
+ </TABLE>
+ </BODY>
+</HTML>
+<%init>
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $widget = new HTML::Widgets::SelectLayers(
+ 'selected_layer' => 'en_US',
+ 'options' => { 'en_US'=>'en_US' },
+ 'form_action' => 'process/msgcat.cgi',
+ 'layer_callback' => sub {
+ my $layer = shift;
+ my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!.
+ "<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 }
+ # qsearch('msgcat', { 'locale' => $layer } ) ) {
+ foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) {
+ $html .=
+ '<TR><TD>'. $msgcat->msgnum. '</TD><TD>'. $msgcat->msgcode. '</TD>'.
+ '<TD><INPUT TYPE="text" SIZE=32 '.
+ qq! NAME="!. $msgcat->msgnum. '" '.
+ qq!VALUE="!. ($cgi->param($msgcat->msgnum)||$msgcat->msg). qq!"></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><BR><INPUT TYPE="submit" VALUE="Apply changes">';
+
+ $html;
+ },
+
+);
+
+</%init>
- Previous message: [freeside-commits] freeside/httemplate/browse addr_block.cgi, 1.3,
1.4 agent.cgi, 1.36, 1.37 agent_type.cgi, 1.17,
1.18 cust_main_county.cgi, 1.15, 1.16 msgcat.cgi, 1.5,
1.6 part_bill_event.cgi, 1.13, 1.14 part_export.cgi, 1.5,
1.6 part_pkg.cgi, 1.36, 1.37 part_svc.cgi, 1.29,
1.30 part_virtual_field.cgi, 1.5, 1.6 rate.cgi, 1.4,
1.5 router.cgi, 1.7, 1.8 svc_acct_pop.cgi, 1.18,
1.19 access_group.html, 1.3, 1.4 access_user.html, 1.4,
1.5 inventory_class.html, 1.3, 1.4 part_referral.html, 1.5,
1.6 payment_gateway.html, 1.4, 1.5 pkg_class.html, 1.3,
1.4 reason.html, 1.1, 1.2 reason_type.html, 1.1, 1.2
- Next message: [freeside-commits] freeside/FS/FS svc_acct.pm,1.212,1.213
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list