% $cgi->param('error', $error);
<% $cgi->redirect(popurl(2). 'cust_main_note.cgi?'. $cgi->query_string ) %>
%} else {
-%
<% header('Note ' . ($notenum ? 'updated' : 'added') ) %>
<SCRIPT TYPE="text/javascript">
- parent.cust_main_notes.location.reload();
- try{parent.cust_main_notes.cClick()}
- catch(err){}
- try{parent.cClick()}
- catch(err){}
+ window.top.location.reload();
</SCRIPT>
</BODY></HTML>
-%
% }
<%init>
or die "Illegal notenum: ". $cgi->param('notenum');
my $notenum = $1;
+my $comment = $cgi->param('comment_html') ||
+ join("<br />\n",
+ split "(?:\r|\n)+", $cgi->param('comment_plain')
+ );
+
my $otaker = $FS::CurrentUser::CurrentUser->name;
$otaker = $FS::CurrentUser::CurrentUser->username
if ($otaker eq "User, Legacy");
custnum => $custnum,
_date => time,
otaker => $otaker,
- comments => $cgi->param('comment'),
+ comments => $comment,
} );
my $error;