X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fattachments.html;h=bdd4f59170b57037da33df669f1147970f321ff0;hb=7ef2ddadbd35cad8b9e65a3682e870230e5f8c89;hp=53635fd6269385ba41c7d16122308dc7a885b959;hpb=ae898cc8e6de40fbecb30c973f91cd955434b159;p=freeside.git
diff --git a/httemplate/view/cust_main/attachments.html b/httemplate/view/cust_main/attachments.html
index 53635fd62..bdd4f5917 100755
--- a/httemplate/view/cust_main/attachments.html
+++ b/httemplate/view/cust_main/attachments.html
@@ -11,6 +11,7 @@
% }
Person |
Filename |
+ Description |
Type |
Size |
|
@@ -54,7 +55,8 @@
% my $clickjs = popup('edit/process/cust_main_attach.cgi?'.
% "custnum=$custnum;attachnum=$attachnum;".
% "purge=1",
-% 'Purge attachment');
+% 'Purge attachment',
+% 'Permanently remove this file?');
% $edit .= qq! (purge)!;
% }
% }
@@ -67,9 +69,9 @@
% }
% if($curuser->access_right('Delete attachment') ) {
% my $clickjs = popup('edit/process/cust_main_attach.cgi?'.
-% "custnum=$custnum;attachnum=$attachnum;".
-% "delete=1",
-% 'Delete attachment');
+% "custnum=$custnum;attachnum=$attachnum;delete=1",
+% 'Delete attachment',
+% 'Delete this file?');
% $edit .= qq! (delete)!;
% }
% if ($curuser->access_right('Download attachment') ) {
@@ -80,11 +82,13 @@
<% note_datestr($attach,$conf,$bgcolor) %>
- <% $attach->otaker%>
+ <% $attach->usernum ? $attach->access_user->name : $attach->otaker %>
|
<% $attach->filename %>
|
+
+ <% $attach->title %>
|
<% $attach->mime_type %>
|
@@ -105,7 +109,7 @@
my $conf = new FS::Conf;
my $curuser = $FS::CurrentUser::CurrentUser;
-
+die "access denied" if !$curuser->access_right('View attachments');
my(%opt) = @_;
my $custnum = $opt{'custnum'};
@@ -135,15 +139,16 @@ sub size_units {
}
sub popup {
- my ($url, $label) = @_;
+ my ($url, $label, $confirm) = @_;
my $onclick =
include('/elements/popup_link_onclick.html',
'action' => popurl(2).$url,
'actionlabel' => $label,
- 'width' => 616,
- 'height' => 408,
+ 'width' => 510,
+ 'height' => 315,
'frame' => 'top',
);
+ $onclick = qq!if(confirm('$confirm')) { $onclick }! if $confirm;
return qq!onclick="$onclick"!;
}