X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcontact.html;h=eea3694e3b9e22b9be45bce7f73331e7df843643;hb=c0398ef281dd091852a57a30c5a176d010c1df21;hp=38703bfef6149964918f94927bff29723ce082de;hpb=03ceab71dad1e5eb366865d304e5e459cc905ce4;p=freeside.git diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 38703bfef..eea3694e3 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -4,42 +4,44 @@
-
- > - First name - |
-
-
- > - Last name - |
-
-
- > - Title/Position - |
-
-
- > - Comment - |
+% foreach my $field ( @fields ) {
+%
+% my $value = '';
+% if ( $field =~ /^phonetypenum(\d+)$/ ) {
+% my $contact_phone = qsearchs('contact_phone', {
+% 'contactnum' => $curr_value,
+% 'phonetypenum' => $1,
+% });
+% if ( $contact_phone ) {
+% $value = $contact_phone->phonenum;
+% $value .= 'x'.$contact_phone->extension
+% if $contact_phone->extension;
+% $value = '+'. $contact_phone->countrycode. " $value"
+% if $contact_phone->countrycode
+% && $contact_phone->countrycode ne '1';
+% }
+% } elsif ( $field eq 'emailaddress' ) {
+% #XXX multiple not yet supported
+% my $contact_email = qsearchs('contact_email', {
+% 'contactnum' => $curr_value,
+% });
+% $value = $contact_email->emailaddress if $contact_email;
+% } else {
+% $value = $contact->get($field);
+% }
+
+
+ "
+ <% $onchange %>
+ > + <% $label{$field} %> + |
+% }