From 8706262a6d18ef5103fb5972ca6443b73e700e6a Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 28 Jan 2015 02:23:34 -0800 Subject: sticky customer notes, RT#29311 --- httemplate/edit/cust_main_note.cgi | 27 ++++++++++++++++++--------- httemplate/edit/process/cust_main_note.cgi | 1 + 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main_note.cgi b/httemplate/edit/cust_main_note.cgi index 61590566c..a089db2d1 100755 --- a/httemplate/edit/cust_main_note.cgi +++ b/httemplate/edit/cust_main_note.cgi @@ -18,17 +18,24 @@
% } -% if( $FS::CurrentUser::CurrentUser->option('disable_html_editor') ) { - -% } -% else { -<% include('/elements/htmlarea.html', 'field' => 'comment_html', - 'curr_value' => $comment) %> +% if ( $FS::CurrentUser::CurrentUser->option('disable_html_editor') ) { + +% } else { + <& /elements/htmlarea.html, 'field' => 'comment_html', + 'curr_value' => $comment + &> % } -

+
+ +<& /elements/checkbox.html, 'field' => 'sticky', + 'value' => 1, + 'curr_value' => $sticky, +&> +Sticky note

+ "> @@ -42,6 +49,7 @@ my $conf = new FS::Conf; my $comment; my $notenum = ''; my $classnum; +my $sticky = 0; if ( $cgi->param('error') ) { $comment = $cgi->param('comment'); $classnum = $cgi->param('classnum'); @@ -52,6 +60,7 @@ if ( $cgi->param('error') ) { die "no such note: ". $notenum unless $note; $comment = $note->comments; $classnum = $note->classnum; + $sticky = $note->sticky; } $comment =~ s/\r//g; # remove weird line breaks to protect FCKeditor diff --git a/httemplate/edit/process/cust_main_note.cgi b/httemplate/edit/process/cust_main_note.cgi index 227297eef..53e616a43 100755 --- a/httemplate/edit/process/cust_main_note.cgi +++ b/httemplate/edit/process/cust_main_note.cgi @@ -33,6 +33,7 @@ my $new = new FS::cust_main_note ( { _date => time, usernum => $FS::CurrentUser::CurrentUser->usernum, comments => $comment, + sticky => scalar( $cgi->param('sticky') ), } ); my $error; -- cgit v1.2.1