X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcontact.html;h=308b846bcea9e28bfd87049fa427174a1e73f775;hb=59794290ab64401e73ddc1bf5a5e06e0b41c8b1a;hp=eea3694e3b9e22b9be45bce7f73331e7df843643;hpb=7bbe939d139be7edd77378cfc9a2c3ec6287749d;p=freeside.git diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index eea3694e3..308b846bc 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -1,9 +1,29 @@ -% unless ( $opt{'js_only'} ) { +% if ( $opt{'js_only'} ) { +<% $js %> +% } else { -
+ + Type + |
+% } else {
+
+% }
+%
% foreach my $field ( @fields ) {
%
% my $value = '';
@@ -13,7 +33,7 @@
% 'phonetypenum' => $1,
% });
% if ( $contact_phone ) {
-% $value = $contact_phone->phonenum;
+% $value = $contact_phone->phonenum_pretty;
% $value .= 'x'.$contact_phone->extension
% if $contact_phone->extension;
% $value = '+'. $contact_phone->countrycode. " $value"
@@ -21,25 +41,70 @@
% && $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;
+% $value = join(', ', map $_->emailaddress, $contact->contact_email);
+% } elsif ( $field eq 'password' ) {
+% $value = $contact->get('_password') ? '********' : '';
+% } elsif ( $field eq 'selfservice_access'
+% or $field eq 'comment'
+% or $field eq 'invoice_dest'
+% or $field eq 'message_dest' ) {
+% $value = $X_contact->get($field);
% } else {
% $value = $contact->get($field);
% }
- "
- <% $onchange %>
- > +% if ( $field eq 'selfservice_access' ) { + + +% #password form +% } elsif ( $field eq 'password') { + + +% } elsif ( $field eq 'invoice_dest' || $field eq 'message_dest' ) { +% my $curr_value = $cgi->param($name . '_' . $field); +% $curr_value = $value if !defined($curr_value); + <& select.html, + field => $name . '_' . $field, + curr_value => $curr_value, + options => [ '', 'Y' ], + option_labels => { '' => 'no', 'Y' => 'yes' }, + style => 'width: 100%', + &> +% } else { + + > +% } + <% $label{$field} %> +% if ( $field eq 'password' ) { + +% } |
% }