1 <% header("Edit Message catalog" ) %>
4 <% include('/elements/error.html') %>
14 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
16 my $widget = new HTML::Widgets::SelectLayers(
17 'selected_layer' => 'en_US',
18 'options' => { 'en_US'=>'en_US' },
19 'form_action' => 'process/msgcat.cgi',
20 'layer_callback' => sub {
22 my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!.
23 "<BR>Messages for locale $layer<BR>". table().
24 "<TR><TH COLSPAN=2>Code</TH>".
26 $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US';
29 #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode }
30 # qsearch('msgcat', { 'locale' => $layer } ) ) {
31 foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) {
33 '<TR><TD>'. $msgcat->msgnum. '</TD><TD>'. $msgcat->msgcode. '</TD>'.
34 '<TD><INPUT TYPE="text" SIZE=32 '.
35 qq! NAME="!. $msgcat->msgnum. '" '.
36 qq!VALUE="!. ($cgi->param($msgcat->msgnum)||$msgcat->msg). qq!"></TD>!;
37 unless ( $layer eq 'en_US' ) {
38 my $en_msgcat = qsearchs('msgcat', {
40 'msgcode' => $msgcat->msgcode,
42 $html .= '<TD>'. $en_msgcat->msg. '</TD>';
47 $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="Apply changes">';