summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-xhttemplate/edit/msgcat.cgi7
-rw-r--r--httemplate/edit/process/msgcat.cgi1
2 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/edit/msgcat.cgi b/httemplate/edit/msgcat.cgi
index 5d256c05b..ee9b1c6b3 100755
--- a/httemplate/edit/msgcat.cgi
+++ b/httemplate/edit/msgcat.cgi
@@ -1,11 +1,12 @@
<!-- mason kludge -->
<%
-print header("Message catalog", menubar(
+print header("Edit Message catalog", menubar(
# 'Main Menu' => $p,
)), '<BR>';
-print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !. $cgi->param('error')
+print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !. $cgi->param('error').
+ '</FONT><BR><BR>'
if $cgi->param('error');
my $widget = new HTML::Widgets::SelectLayers(
@@ -28,7 +29,7 @@ my $widget = new HTML::Widgets::SelectLayers(
'<TR><TD>'. $msgcat->msgnum. '</TD><TD>'. $msgcat->msgcode. '</TD>'.
'<TD><INPUT TYPE="text" SIZE=32 '.
qq! NAME="!. $msgcat->msgnum. '" '.
- qq!VALUE="!. $msgcat->msg. qq!"></TD>!;
+ qq!VALUE="!. ($cgi->param($msgcat->msgnum)||$msgcat->msg). qq!"></TD>!;
unless ( $layer eq 'en_US' ) {
my $en_msgcat = qsearchs('msgcat', {
'locale' => 'en_US',
diff --git a/httemplate/edit/process/msgcat.cgi b/httemplate/edit/process/msgcat.cgi
index ab30f06b5..1f94f6668 100644
--- a/httemplate/edit/process/msgcat.cgi
+++ b/httemplate/edit/process/msgcat.cgi
@@ -3,6 +3,7 @@
my $error;
foreach my $param ( grep { /^\d+$/ } $cgi->param ) {
my $old = qsearchs('msgcat', { msgnum=>$param } );
+ next if $old->msg eq $cgi->param($param); #no need to update identical records
my $new = new FS::msgcat { $old->hash };
$new->msg($cgi->param($param));
$error = $new->replace($old);