From 9c9a1838b54292c62e940d7e6cee5141ea8e9b5c Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 16 Mar 2010 08:37:25 +0000 Subject: [PATCH] RT#6226: fckeditor for customer notes --- httemplate/edit/cust_main_note.cgi | 10 +++++++--- httemplate/elements/htmlarea.html | 1 + httemplate/view/cust_main/notes.html | 10 ++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/httemplate/edit/cust_main_note.cgi b/httemplate/edit/cust_main_note.cgi index 6c6a1a9a0..1fdf0d9e5 100755 --- a/httemplate/edit/cust_main_note.cgi +++ b/httemplate/edit/cust_main_note.cgi @@ -8,9 +8,11 @@

- +<% include('/elements/htmlarea.html', 'field' => 'comment', + 'curr_value' => $comment) %> +% #

"> @@ -33,6 +35,8 @@ if ( $cgi->param('error') ) { $comment = $note->comments; } +$comment =~ s/\r//g; # remove weird line breaks to protect FCKeditor + $cgi->param('custnum') =~ /^(\d+)$/ or die "illeagl custnum"; my $custnum = $1; diff --git a/httemplate/elements/htmlarea.html b/httemplate/elements/htmlarea.html index f27c4b5e6..dca4328ab 100644 --- a/httemplate/elements/htmlarea.html +++ b/httemplate/elements/htmlarea.html @@ -24,6 +24,7 @@ Example: oFCKeditor.Config['SkinPath'] = '<% $p %>elements/fckeditor/editor/skins/silver/'; oFCKeditor.Height = '<% $opt{'height'} || 420 %>'; oFCKeditor.Config['StartupFocus'] = true; + oFCKeditor.Config['EnterMode'] = 'br'; oFCKeditor.Create(); diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html index 833c92e67..a6378f46a 100755 --- a/httemplate/view/cust_main/notes.html +++ b/httemplate/view/cust_main/notes.html @@ -11,6 +11,9 @@ % } Person Note +% if ($curuser->access_right('Edit customer note') ) { +   +% } % my $bgcolor1 = '#eeeeee'; @@ -34,7 +37,7 @@ % ";notenum=$notenum", % 'actionlabel' => 'Edit customer note', % 'width' => 616, -% 'height' => 408, +% 'height' => 580, % 'frame' => 'top', % ); % my $clickjs = qq!onclick="$onclick"!; @@ -50,8 +53,11 @@  <% $note->otaker%> -  <%$note->comments%><% $edit %> +  <%$note->comments%> +% if($edit) { + <% $edit %> +% } % } #end display notes -- 2.11.0