X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcontact.html;h=ec4916dfabeac658ee6f9b7888437c63b1ed2e54;hb=ac07dfa491181046e8dd2881d6093da9e8d3616f;hp=3d5177612fecb929bc0187a684f150328476508d;hpb=ded0ab5cac02f099b387de360fb6dd6bd8cbb6b4;p=freeside.git diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 3d5177612..ec4916dfa 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,14 +45,30 @@ % } - " - <% $onchange %> - >
+% if ( $field eq 'selfservice_access' ) { + + +% } else { + " + <% $onchange %> + > +% } +
<% $label{$field} %> % } @@ -64,6 +80,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 +109,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;