'Customer note and attachment rights' => [
'Add customer note', #NEW
'Edit customer note', #NEW
+ 'Delete customer note', #NEWEST
'View attachments', #NEW
'Browse attachments', #NEW
'Download attachment', #NEW
],
'Resend invoices' => 'Print and mail invoices',
'List customers' => 'Customers: Customer churn report',
+ 'Edit customer note' => 'Delete customer note',
);
# foreach my $old_acl ( keys %onetime ) {
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Edit customer note');
+ unless $FS::CurrentUser::CurrentUser->access_right('Delete customer note');
my ($notenum) = $cgi->keywords;
$notenum =~ /^\d+$/ or die "bad notenum '$notenum'";
or die "notenum '$notenum' not found";
$note->delete;
</%init>
-<% $cgi->redirect($p.'view/cust_main.cgi?'.$note->custnum) %>
+<% $cgi->redirect($p.'view/cust_main.cgi?custnum='.$note->custnum. ';show=notes') %>
confexists => '!cust_main-disable_notes',
acl => 'Add customer note',
width => 875,
- height => 538,
+ height => 548,
},
{
label => 'Attach file',
% "?custnum=$custnum".
% ";notenum=$notenum",
% 'actionlabel' => emt('Edit customer note'),
-% 'width' => 616,
-% 'height' => 575,
+% 'width' => 875,
+% 'height' => 548,
% 'frame' => 'top',
% );
% my $clickjs = qq!onclick="$onclick"!;
%
% my $edit = '';
-% if ($curuser->access_right('Edit customer note') ) {
+% if ( $curuser->access_right('Edit customer note') ) {
+% $edit = qq! <A HREF="javascript:void(0);" $clickjs>(!.emt('edit').')</A>';
+% }
+% if ( $curuser->access_right('Delete customer note') ) {
% my $delete_url = $fsurl.'misc/delete-note.html?'.$notenum;
-% $edit = qq! <A HREF="javascript:void(0);" $clickjs>(!.emt('edit').')</A>'.
-% qq! <A HREF="$delete_url" !.
-% qq! onclick="return confirm('Delete this note?')">!.
-% '('.emt('delete').')</A>';
+% $edit .= qq! <A HREF="$delete_url" !.
+% qq! onclick="return confirm('Delete this note?')">!.
+% '('.emt('delete').')</A>';
% }
%
<TR CLASS="grid custnote<% $note->sticky ? ' stickynote' : '' %>"