[freeside-commits] freeside/httemplate/edit cust_main.cgi, 1.65, 1.66 cust_main_note.cgi, NONE, 1.1

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Oct 3 15:44:30 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv13462/httemplate/edit

Modified Files:
	cust_main.cgi 
Added Files:
	cust_main_note.cgi 
Log Message:
Enhanced customer notes

--- NEW FILE: cust_main_note.cgi ---
<% include('/elements/header-popup.html', 'Add Customer Note') %>

% if ( $cgi->param('error') ) { 
  <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
  <BR><BR>
% } 

<FORM ACTION="<% popurl(1) %>process/cust_main_note.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">


<BR><BR>
<TEXTAREA NAME="comment" ROWS="12" COLS="60">
<% $comment %>
</TEXTAREA>

<BR><BR>
<INPUT TYPE="submit" VALUE="Add note">

</FORM>
</BODY>
</HTML>

<%init>
my($custnum, $comment); 
$comment = '';

if ( $cgi->param('error') ) {
  $comment     = $cgi->param('comment');
}
$cgi->param('custnum') =~ /^(\d+)$/;
$custnum     = $1;

die "illegal query ". $cgi->keywords unless $custnum;

</%init>


Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main.cgi,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- cust_main.cgi	23 Aug 2006 22:25:37 -0000	1.65
+++ cust_main.cgi	3 Oct 2006 22:44:27 -0000	1.66
@@ -359,17 +359,20 @@
 
   <INPUT TYPE="hidden" NAME="<% $hidden %>" VALUE="">
 % } 
-
+%
+% my $ro_comments = $conf->exists('cust_main-use_comments')?'':'readonly';
+% if (!$ro_comments || $cust_main->comments) {
 
 <BR>Comments
 <% &ntable("#cccccc") %>
   <TR>
     <TD>
-      <TEXTAREA COLS=80 ROWS=5 WRAP="HARD" NAME="comments"><% $cust_main->comments %></TEXTAREA>
+      <TEXTAREA COLS=80 ROWS=5 WRAP="HARD" NAME="comments" <%$ro_comments%>><% $cust_main->comments %></TEXTAREA>
     </TD>
   </TR>
 </TABLE>
 %
+% }
 %
 %unless ( $custnum ) {
 %  # pry the wrong place for this logic.  also pretty expensive



More information about the freeside-commits mailing list