X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcontact.html;h=faee7ead445c627d9147fd29461e2410ea6f06de;hb=9270a9fe7ea00f5a24a9ce3b927f932db6650b23;hp=2023a6cfe0c83fa57a925cf391fc0315f2d7dd3f;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 2023a6cfe..faee7ead4 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -2,18 +2,104 @@ -
+ + Type + |
+% } else {
+
+% }
+%
% 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_pretty;
+% $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' ) {
+% $value = join(', ', map $_->emailaddress, $contact->contact_email);
+% } elsif ( $field eq 'selfservice_access'
+% or $field eq 'comment'
+% or $field eq 'invoice_dest' ) {
+% $value = $X_contact->get($field);
+% } else {
+% $value = $contact->get($field);
+% }
+
- get($field) |h %>"
- <% $onchange %>
- > - <% $label{$field} %> +% if ( $field eq 'selfservice_access' ) { + + + <& /elements/change_password.html, + 'contact_num' => $curr_value, + 'custnum' => $opt{'custnum'}, + 'curr_value' => '', + 'no_label_display' => '1', + 'noformtag' => '1', + 'pre_pwd_field_label' => $id.'_', + &> + +% } elsif ( $field eq 'invoice_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} %> |
% }