<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
<INPUT TYPE="hidden" NAME="notenum" VALUE="<% $notenum %>">
-<% include('/elements/htmlarea.html', 'field' => 'comment',
+% if( $FS::CurrentUser::CurrentUser->option('disable_html_editor') ) {
+ <TEXTAREA NAME="comment_plain" ROWS="12" COLS="60"><%
+ join '', split /<br \/>| /, $comment
+ %></TEXTAREA>
+% }
+% else {
+<% include('/elements/htmlarea.html', 'field' => 'comment_html',
'curr_value' => $comment) %>
-% #<TEXTAREA NAME="comment" ROWS="12" COLS="60">
-% # <% $comment %>
-% #</TEXTAREA>
+% }
<BR><BR>
<INPUT TYPE="submit" VALUE="<% $notenum ? "Apply Changes" : "Add Note" %>">
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;
#XXX autogen
my @paramlist = qw( menu_position default_customer_view
+ disable_html_editor
email_address
snom-ip snom-username snom-password
vonage-fromnumber vonage-username vonage-password
</TR>
<TR>
- <TH ALIGN="right">Default customer view: </TD>
+ <TH ALIGN="right">Default customer view: </TH>
<TD COLSPAN=2>
<SELECT NAME="default_customer_view">
% foreach my $view ( keys %customer_views ) {
</SELECT>
</TD>
</TR>
+
+ <TR>
+ <TH ALIGN="right" COLSPAN=1>Disable HTML editor for customer notes: </TH>
+ <TD ALIGN="left" COLSPAN=2>
+ <INPUT TYPE="checkbox" NAME="disable_html_editor" VALUE="1" <% $curuser->option('disable_html_editor') ? 'CHECKED' : '' %>>
+ </TD>
+ </TR>
</TABLE>
<BR>
<% $note->otaker%>
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- <%$note->comments%>
+ <%$note->comments%>
</TD>
% if($edit) {
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $edit %></TD>