projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 71289 - add contact changes to customer change history
[freeside.git]
/
httemplate
/
edit
/
cust_main_attach.cgi
diff --git
a/httemplate/edit/cust_main_attach.cgi
b/httemplate/edit/cust_main_attach.cgi
index
ebbaf3c
..
0880c76
100755
(executable)
--- a/
httemplate/edit/cust_main_attach.cgi
+++ b/
httemplate/edit/cust_main_attach.cgi
@@
-6,19
+6,22
@@
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
<INPUT TYPE="hidden" NAME="attachnum" VALUE="<% $attachnum %>">
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
<INPUT TYPE="hidden" NAME="attachnum" VALUE="<% $attachnum %>">
-<BR><BR>
-
-<TABLE BGCOLOR="#cccccc" CELLSPACING=0>
% if(defined $attach) {
% if($curuser->access_right("Download attachment")) {
<A HREF="<% $p.'view/attachment.html?'.$attachnum %>">Download this file</A><BR>
% }
% if(defined $attach) {
% if($curuser->access_right("Download attachment")) {
<A HREF="<% $p.'view/attachment.html?'.$attachnum %>">Download this file</A><BR>
% }
+% }
+
+<BR>
+<TABLE BGCOLOR="#cccccc" CELLSPACING=0>
+
+% if ( defined $attach ) {
<TR><TD> Filename </TD>
<TR><TD> Filename </TD>
-<TD><INPUT TYPE="text" NAME="file
name" SIZE=40 MAXLENGTH=255 VALUE="<% $attach->filename
%>"<% $disabled %>></TD></TR>
+<TD><INPUT TYPE="text" NAME="file
" SIZE=40 MAXLENGTH=255 VALUE="<% $cgi->param('file') || $attach->filename |h
%>"<% $disabled %>></TD></TR>
<TR><TD> Description </TD>
<TR><TD> Description </TD>
-<TD><INPUT TYPE="text" NAME="title" SIZE=40 MAXLENGTH=80 VALUE="<% $
attach->title
%>"<% $disabled %></TD></TR>
+<TD><INPUT TYPE="text" NAME="title" SIZE=40 MAXLENGTH=80 VALUE="<% $
cgi->param('title') || $attach->title |h
%>"<% $disabled %></TD></TR>
<TR><TD> MIME type </TD>
<TR><TD> MIME type </TD>
-<TD><INPUT TYPE="text" NAME="mime_type"
VALUE="<% $attach->mime_type
%>"<% $disabled %></TD></TR>
+<TD><INPUT TYPE="text" NAME="mime_type"
SIZE=40 VALUE="<% $cgi->param('mime_type') || $attach->mime_type |h
%>"<% $disabled %></TD></TR>
<TR><TD> Size </TD><TD><% $attach->size %></TD></TR>
% }
% else { # !defined $attach
<TR><TD> Size </TD><TD><% $attach->size %></TD></TR>
% }
% else { # !defined $attach
@@
-29,7
+32,7
@@
<BR>
% if(! $disabled) {
<INPUT TYPE="submit" NAME="submit"
<BR>
% if(! $disabled) {
<INPUT TYPE="submit" NAME="submit"
- VALUE="<% $attachnum ?
"Apply Changes" : "Upload File"
%>">
+ VALUE="<% $attachnum ?
emt("Apply changes") : emt("Upload File")
%>">
% }
% if(defined $attach and $curuser->access_right('Delete attachment')) {
<BR>
% }
% if(defined $attach and $curuser->access_right('Delete attachment')) {
<BR>
@@
-47,9
+50,8
@@
my $curuser = $FS::CurrentUser::CurrentUser;
my $attachnum = '';
my $attach;
my $attachnum = '';
my $attach;
-if ( $cgi->param('error') ) {
- #$comment = $cgi->param('comment');
-} elsif ( $cgi->param('attachnum') =~ /^(\d+)$/ ) {
+
+if ( $cgi->param('attachnum') =~ /^(\d+)$/ ) {
$attachnum = $1;
die "illegal query ". $cgi->keywords unless $attachnum;
$attach = qsearchs('cust_attachment', { 'attachnum' => $attachnum });
$attachnum = $1;
die "illegal query ". $cgi->keywords unless $attachnum;
$attach = qsearchs('cust_attachment', { 'attachnum' => $attachnum });