[freeside-commits] branch master updated. f1f423f3cb29a9d4ca8029d8b58f0111db0f1957

Ivan ivan at 420.am
Sat Mar 24 18:48:45 PDT 2012


The branch, master has been updated
       via  f1f423f3cb29a9d4ca8029d8b58f0111db0f1957 (commit)
      from  b7e36451cf97756a020ffe984a687079d965f407 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f1f423f3cb29a9d4ca8029d8b58f0111db0f1957
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Mar 24 18:48:44 2012 -0700

    enhance contacts: contact classes, RT#16819

diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html
index 3efa232..b3e5353 100644
--- a/httemplate/elements/contact.html
+++ b/httemplate/elements/contact.html
@@ -4,6 +4,24 @@
 
   <TABLE>
     <TR>
+%     if ( @contact_class ) {
+        <TD>
+          <SELECT NAME="<%$name%>_classnum" <% $onchange %>>
+            <OPTION VALUE="">
+%           my $classnum = scalar($cgi->param($name.'_classnum'))
+%                            || $contact->classnum;
+%           foreach my $contact_class (@contact_class) {
+              <OPTION VALUE="<% $contact_class->classnum %>"
+                 <% ($contact_class->classnum == $classnum) ? 'SELECTED' : '' %>
+              ><% $contact_class->classname |h %>
+%           }
+          <SELECT><BR>
+          <FONT SIZE="-1">Type</FONT>
+        </TD>
+%     } else {
+        <INPUT TYPE="hidden" NAME="<%$name%>_classnum" VALUE="">
+%     }
+%
 %     foreach my $field ( @fields ) {
 %
 %       my $value = '';
@@ -60,6 +78,8 @@ if ( $opt{'onchange'} ) {
   $onchange = 'onChange="'. $onchange. '"';
 }
 
+my @contact_class = qsearch('contact_class', { 'disabled' => '' });
+
 my $contact;
 if ( $curr_value ) {
   $contact = qsearchs('contact', { 'contactnum' => $curr_value } );
@@ -81,7 +101,7 @@ foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
   next if $phone_type->typename eq 'Home';
   my $f = 'phonetypenum'.$phone_type->phonetypenum;
   $label{$f} = $phone_type->typename. ' phone';
-  $size{$f} = $first++ ? 11 : 15;
+  $size{$f} = $first++ ? 10 : 15;
 }
 
 $label{'comment'} = 'Comment';

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/contact.html |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list