X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcontact.html;h=779905234381c54dd209e8ce822fd80bd97f9eb7;hb=6016bc83d369186275044bd8539f66a3cb03c4cb;hp=3d5177612fecb929bc0187a684f150328476508d;hpb=ded0ab5cac02f099b387de360fb6dd6bd8cbb6b4;p=freeside.git diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 3d5177612..779905234 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -31,7 +31,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" @@ -45,17 +45,49 @@ % } - " - <% $onchange %> - >
+% if ( $field eq 'selfservice_access' ) { + + +% } else { + " + <% $onchange %> + > +% } +
<% $label{$field} %> % } +% my $pwd_change_label = 'change password'; +% $pwd_change_label = 'setup password' unless $contact->_password; +% if ($curr_value) { + + + <& /elements/change_password.html, + 'contact_num' => $curr_value, + 'custnum' => $opt{'custnum'}, + 'curr_value' => '', + 'label' => $pwd_change_label, + &> + +
+ Password + +% } @@ -64,6 +96,9 @@ my( %opt ) = @_; +my $conf = new FS::Conf; +my $self_base_url = $conf->config('selfservice_server-base_url'); + my $name = $opt{'element_name'} || $opt{'field'} || 'contactnum'; my $id = $opt{'id'} || 'contactnum'; @@ -90,15 +125,16 @@ if ( $curr_value ) { my %size = ( 'title' => 12 ); tie my %label, 'Tie::IxHash', - 'first' => 'First name', - 'last' => 'Last name', - 'title' => 'Title/Position', - 'emailaddress' => 'Email', + 'first' => 'First name', + 'last' => 'Last name', + 'title' => 'Title/Position', + 'emailaddress' => 'Email', + 'selfservice_access' => 'Self-service' ; my $first = 0; foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) { - next if $phone_type->typename eq 'Home'; + next if $phone_type->typename =~ /^(Home|Fax)$/; my $f = 'phonetypenum'.$phone_type->phonetypenum; $label{$f} = $phone_type->typename. ' phone'; $size{$f} = $first++ ? 10 : 15;